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

feat: Change Popover to use min width when matching #21039

Merged
merged 3 commits into from
Mar 25, 2024

Conversation

benjackwhite
Copy link
Contributor

@benjackwhite benjackwhite commented Mar 20, 2024

Problem

Alternative to #21035

We typically want matching the width to allow overflow if necessary

Changes

  • Use min width instead of width when sameWidth is true.
  • Not sure how much we care about naming to make it super specific like sameWidthOrBigger

👉 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?

@benjackwhite benjackwhite requested a review from Twixes March 20, 2024 11:22
Copy link
Contributor

github-actions bot commented Mar 20, 2024

Size Change: +22 B (0%)

Total Size: 824 kB

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

compressed-size-action

Copy link
Member

@Twixes Twixes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I went through a lot of the popovers in the app and this looks great. Should actually invalidate a lot of dropdownMatchSelectWidth={false} cases, but that seems fine either way.
I agree that sameWidth is not really accurate anymore – given LemonSelect inherited the dropdownMatchSelectWidth naming from Ant, maybe matchWidth to to be a bit less strict on "same"?

# Conflicts:
#	frontend/src/lib/lemon-ui/LemonInputSelect/LemonInputSelect.tsx
@benjackwhite benjackwhite merged commit b04f787 into master Mar 25, 2024
93 checks passed
@benjackwhite benjackwhite deleted the feat/dropdown-min-width branch March 25, 2024 12:01
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.

2 participants