Repository navigation
fix: cap only popups that size to the space left, and keep the rule overridable - #52
Merged
Merged
Conversation
…verridable 0.3.0's embedded cap matched every popup: plain Popover content got cut at 24rem with no scrollbar, and tooltips matched too. It now targets content that caps itself at the available height, in the utilities layer so apps can override it.
Deploying flycommerce-ui with
|
| Latest commit: |
9824815
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://76f03475.flycommerce-ui.pages.dev |
| Branch Preview URL: | https://fix-embedded-popup-cap-scope.flycommerce-ui.pages.dev |
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #50, which was merged (and released in 0.3.0) before its review fixes landed.
#50's rule,
html[data-embedded] [data-radix-popper-content-wrapper] > * { max-height: 24rem }, has three problems:Popovercontent gets a cap it never had, with no scrollbar.PopoverContentsets no max-height or overflow, so a 600px filter popover inside the dashboard is cut to 384px and its content spills or squashes. Standalone it shows whole.<PopoverContent className="max-h-[32rem]">is silently ignored inside the dashboard.Fix:
[data-radix-popper-content-wrapper] > [class*="available-height"]. That's the date pickers,DropdownMenu,ContextMenu, popper-modeSelect,RichSelectandTreeSelect, which all already scroll. Plain popovers, tooltips and hover cards are untouched. A plain popover shows whole, and fix(app-bridge): grow the frame while a popup reaches past the page flycommerce-sdk#9 grows the frame to fit it.@layer utilities, next to themax-h-(…)utilities it overrides, where its higher specificity wins and an app's!max-h-*can still beat it. Not@layer components: Tailwind's utilities layer comes later and would beat the rule whatever its specificity, so the cap would never apply.Checked:
pnpm run build:csspasses, and the builtstyles.csshas the rule inside the utilities layer.The changelog entry is under Unreleased; 0.3.0's entry is unchanged.