Repository navigation
fix(remix): keep outside widget state out of table headers, panel content, and sidebar slots - #340
Open
leoafarias wants to merge 2 commits into
Open
leoafarias wants to merge 2 commits into
leoafarias wants to merge 2 commits into
Conversation
…content Mix `onFocusVisible`, `onHovered`, and `onPressed` variants resolve against the nearest `WidgetStateProvider`. Two Remix parts had no scope of their own where they needed one: - A data-table header without `sortable`, including the selection header, resolved against whatever state scope encloses the table, so a table inside a focused disclosure trigger or a `Pressable` lit its header styles. - Accordion and disclosure content is mounted inside the trigger's state scope, so widgets in the panel changed when the trigger was hovered, pressed, focused, or disabled. Both now get an empty scope. The trigger's own parts and sortable headers keep resolving against their own state.
RemixSidebar published `disabled` over its whole panel, so a widget in `header` or `footer` with an `onDisabled` style lit when the sidebar was disabled, contradicting the `enabled` documentation. Header and footer now get an empty scope; the sidebar's own regions still resolve `onDisabled`. Also cover disabled accordion and disclosure content, document that the content of a non-sortable data-table header resolves widget-state variants against an empty state, and reword the changelog entries.
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: # packages/remix/CHANGELOG.md
This was referenced 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
Mix
onFocusVisible,onHovered,onPressed, andonDisabledvariants resolve against the nearestWidgetStateProvider. Three Remix parts had no scope of their own where they needed one.RemixDataTableheader withoutsortable, including the selection header, resolved against whatever state scope encloses the table. A table inside aPressableor a focused disclosure trigger lit its header styles.DataTableSpecdocs say.headeralso resolves against an empty state, so a plain Mix widget there does not react to its own hover or press. The docs now say to wrap it in its ownPressableif it should.RemixAccordionandRemixDisclosuremount the panel content inside the trigger's state scope. Widgets in the panel changed when the trigger was hovered, pressed, focused, or disabled.containerandcontentregions are unchanged.RemixSidebarpublishesdisabledover its whole panel. AnonDisabledwidget inheaderorfootertherefore lit when the sidebar was disabled, contradicting theenableddocumentation.headerandfooterboxes, still resolveonDisabled.Validation
flutter testinpackages/remix: 2844 passed.dart analyze packages/remix, rootdart format,melos run ci:checks, andmelos run docs:check: clean.triggerEffectsring still draws on the trigger while panel content stays idle.Related Issues
Unblocks re-adding the Fortal sortable-header focus ring that #328 withheld because of this leak. No issue to close.
Checklist
///).Breaking Change
Anything that styled a data-table header, accordion or disclosure content, or sidebar header or footer content from outside state was relying on the bug. That reliance is not a supported contract.