Repository navigation
fix(remix): scroll a long RemixSelect list - #341
Open
leoafarias wants to merge 2 commits into
Open
leoafarias wants to merge 2 commits into
leoafarias wants to merge 2 commits into
Conversation
A RemixSelect list taller than its overlay, or than a maxHeight on the content or menu container, overflowed the option column instead of scrolling. The options now scroll inside a scroll view nested within both containers, so their padding, decoration, and constraints stay in place. A list that fits still shrinks to its options.
Scroll notifications from the option list bubbled to the host page, so a Material 3 AppBar elevated while the list scrolled and stayed elevated after the select closed. The notifications now stop at the options, including the scroll metrics notifications that hosts also treat as scrolling. The list also follows Flutter's own menus: no overscroll stretch, no bounce on iOS and macOS, clamping at both ends, and the desktop scrollbar stays. Document the scrolling and the maxHeight that caps it, and note in the changelog that menuContainer's main-axis alignment and maximal main-axis size no longer distribute free vertical space.
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
# Conflicts: # docs/components/select.mdx # packages/remix/CHANGELOG.md
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
RemixSelectlist taller than its overlay, or taller than amaxHeighton the content or menu container, overflowed the option column (A RenderFlex overflowed by N pixels) instead of scrolling. The Vanilla preset sets a 320 pxmaxHeightand documents that the panel scrolls, but it did not.The options now scroll inside a
SingleChildScrollViewnested within both thecontentcontainer and themenuContainerbox.maxHeighton either one is honored.The scroll view behaves like Flutter's own menus and does not leak into the host page:
primary: false, so the overlay does not attach to the page's primary scroll controller.AppBarelevated while the list scrolled and stayed elevated after the select closed.The options column now sizes to its content inside the scroll view, so
mainAxisAlignmentandmainAxisSize.maxonmenuContainerno longer distribute free vertical space. The changelog notes this.No public API changes.
docs/components/select.mdxgains a short "Long lists" section.Validation
New
Long listsgroup inselect_widget_test.dart(14 tests). It covers:maxHeight;AppBar;Each test fails when its piece of the fix is reverted.
packages/remixfull suite: 2847 passed.registry_sourcesuite: 1390 passed.dart analyze packages/remix, rootdart format,melos run ci:checks, andmelos run docs:checkall pass.The existing
applies custom styletest asserted onColumnBox.styleSpec. It now asserts the observable layout: the padding wraps the scrollable.Merged onto the integration branch (chore: integration check for the follow-up stack (do not merge) #339), the select tests and the Vanilla, Fortal, and HeroUI select tests pass.
Known follow-ups, intentionally not in this PR:
RemixMenuhas the same no-scroll overflow (menu_widget.dart).naked_uiAnchoredOverlay._focusBoundary). A separate naked_ui PR fixes it.Merge note
After #331 lands, the focus-ring note in
docs/components/select.mdxmust also say that the scroll viewport clips an outside row ring once the list scrolls. Today the note says an outside ring is cropped only when the panel setsclipBehavior.Related Issues
None.
Checklist
///).Breaking Change
mainAxisAlignmentandmainAxisSize.maxonmenuContainerno longer distribute free vertical space, because the options column now sizes to its content inside the scroll view. No shipped preset relies on it.