Repository navigation
fix(remix): fit RemixSelect and RemixMenu panels to the space beside their trigger - #348
Open
leoafarias wants to merge 7 commits into
Open
leoafarias wants to merge 7 commits into
leoafarias wants to merge 7 commits into
Conversation
…e their trigger OverlayPositioner laid its child out with the whole overlay as the maximum height, so a panel taller than the room above or below its trigger slid over the trigger instead of fitting beside it. Add constrainToAvailableHeight to OverlayPositioner, AnchoredOverlay, NakedSelect, and NakedMenu. When set, a panel placed above or below the anchor is capped at the space on that side after sideOffset and collisionPadding. With collision avoidance on, the cap is the larger side, so the existing flip lands on it; without, it is the preferred side. Left and right placements are not capped. The option defaults to false, so panels that cannot scroll keep today's layout.
…their trigger A long select list or menu is laid out as tall as the whole overlay, so it slides over its trigger even though it now scrolls. Pass constrainToAvailableHeight to NakedSelect and to the root NakedMenu so the panel is capped at the room above or below the trigger and opens on the side with more room. Submenus keep the room the overlay has.
…n its defaults The option is new public API with a false default, so it belongs under Features. Drop the unexported AnchoredOverlay from the entry and say that the larger side bounds the layout while the panel stays on the preferred side when it fits there. The select and menu tests now leave the argument out to pin the default, and a positioner test turns the option on and off to cover shouldRelayout.
…anels-fit-beside-trigger
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
leoafarias
added a commit
that referenced
this pull request
Oct 27, 2026
This branch has not been deployed
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.
Description
A long
RemixSelectlist orRemixMenunow scrolls (#341, #345), but its panel was still laid out as tall as the whole overlay, so it slid over its trigger.RemixSelectand the rootRemixMenunow passconstrainToAvailableHeight: truetoNakedSelectandNakedMenu(#347).sideOffsetandcollisionPadding, and opens on the side with more room.docs/components/select.mdx"Long lists" anddocs/components/menu.mdx"Long menus" describe this. The CHANGELOG has a Fixes entry.Known limitation, tracked as a follow-up: positioning does not subtract safe-area or keyboard insets, so on mobile a long panel can extend under the keyboard.
Validation
constrainToAvailableHeightlines: a long select and a long menu, each near the top and near the bottom of the screen. The two short-panel tests are guards.dart analyze, format,melos run ci:checks, andmelos run docs:check: clean.Continuation:
a6d6a0ddafixes the shared Vanilla consumer fixture exposed by this change. The old overlay entry stretched the select trigger to the full viewport, leaving no space beside it. A scopedCenterinside that entry restores its natural size; the original option callback assertion stays and hit-testability is checked before tapping. Exact failure reproduced, then 4 focused tests pass. No production changes. Fresh CI on this head is green. The strict complete local gate also passes on combinedf40536ba9(final integration plus all three adoption heads), including every fresh-consumer leg, with no generated/tree drift.Merge note
Stacked on #345, with #347's naked_ui commits merged in, so this diff shows them until #347 lands. Merge after naked_ui 1.3.0 (which includes #347) is released. The naked_ui release PR raises remix's
naked_uifloor, and then this PR's diff is the Remix opt-in alone.Related Issues
Needs #341, #345, and #347.
Checklist
///).Breaking Change