Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: LemonDropdown width options #21035

Closed
wants to merge 13 commits into from

Conversation

benjackwhite
Copy link
Contributor

@benjackwhite benjackwhite commented Mar 20, 2024

Problem

LemonDropdown currently supports "sameWidth" but thats not always perfect. What often looks best is if the width is the same as the input but with the ability to grow if needed.

Changes

  • Change the API to allow width to be an enum option
  • Adds a "min-same" option

2024-03-20 11 37 01

👉 Stay up-to-date with PostHog coding conventions for a smoother review.

Does this work well for both Cloud and self-hosted?

How did you test this code?

@posthog-bot
Copy link
Contributor

📸 UI snapshots have been updated

12 snapshot changes in total. 0 added, 12 modified, 0 deleted:

Triggered by this commit.

👉 Review this PR's diff of snapshots.

@benjackwhite benjackwhite marked this pull request as ready for review March 20, 2024 10:38
@benjackwhite benjackwhite marked this pull request as draft March 20, 2024 10:47
@posthog-bot
Copy link
Contributor

📸 UI snapshots have been updated

14 snapshot changes in total. 0 added, 14 modified, 0 deleted:

Triggered by this commit.

👉 Review this PR's diff of snapshots.

@posthog-bot
Copy link
Contributor

📸 UI snapshots have been updated

1 snapshot changes in total. 0 added, 1 modified, 0 deleted:

  • chromium: 0 added, 1 modified, 0 deleted (diff for shard 2)
  • webkit: 0 added, 0 modified, 0 deleted

Triggered by this commit.

👉 Review this PR's diff of snapshots.

@Twixes
Copy link
Member

Twixes commented Mar 20, 2024

That's a good idea. Actually for simplicity, it may be best if sameWidth becomes "same or larger". That seems to be the better behavior in pretty much all cases.

@benjackwhite
Copy link
Contributor Author

That's a good idea. Actually for simplicity, it may be best if sameWidth becomes "same or larger". That seems to be the better behavior in pretty much all cases.

Hmm yeah I can't actually see any good reason for having it be shorter than the parent... I'll do a different PR to keep the naming but with different behaviour

Copy link
Contributor

github-actions bot commented Mar 20, 2024

Size Change: +138 B (0%)

Total Size: 824 kB

ℹ️ View Unchanged
Filename Size Change
frontend/dist/toolbar.js 824 kB +138 B (0%)

compressed-size-action

@posthog-bot
Copy link
Contributor

📸 UI snapshots have been updated

1 snapshot changes in total. 0 added, 1 modified, 0 deleted:

  • chromium: 0 added, 1 modified, 0 deleted (diff for shard 2)
  • webkit: 0 added, 0 modified, 0 deleted

Triggered by this commit.

👉 Review this PR's diff of snapshots.

@benjackwhite benjackwhite deleted the fix/same-width branch March 20, 2024 12:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants