fix(explore): make the whole collapsed rail expand on tap#131
Merged
Conversation
A collapsed pane could not be re-opened by a real mouse: the expand chevron was a centered 16px IconButton, so only that tiny icon was tappable. Collapsing (a full-width 28px header bar) was easy; expanding (the small rail icon) usually missed — and when both panes collapsed, the right rail ballooned to a wide blank region that ignored clicks everywhere but the icon. Widget tests missed it because `tester.tap` hits the widget centre — exactly where the icon is. Make the entire collapsed rail an `InkWell(onTap: onToggle)` so a tap anywhere re-expands it. Tests (both no-mock, real fixture, pointer path): - collapse both panes, then both expand chevrons work; - a tap *off* the icon (top of the rail, via tapAt) still expands — verified red under the old icon-only target, green after. Adds a discovered-note on small-hit-target bugs that `tester.tap` hides. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.
Summary
A collapsed pane couldn't be re-opened by a real mouse — "I can collapse, but afterwards expand is not possible." The expand chevron was a centered 16px
IconButton, so only that tiny icon was tappable. Collapsing lives in a full-width 28px header bar (easy); expanding was the small rail icon (usually missed). When both panes collapse it's worst: the right rail balloons to a wide blank region (leftW = rail,rightW = w - rail - divW) that ignores clicks everywhere but the icon.Fix. Make the entire collapsed rail an
InkWell(onTap: onToggle), chevron centered for affordance, so a tap anywhere in the rail re-expands it.Why tests missed it.
tester.tap(find.bySemanticsLabel(...))hits the widget's centre — exactly where the icon is — so every collapse/expand test passed while real off-icon clicks failed.Test plan
test/crm/both_panes_collapse_test.dart(no-mock, real fixture, pointer path):collapse both panes, then both expand chevrons work;a tap anywhere in the collapsed rail re-expands it (not just the icon)— usestapAtat an offset away from the centered icon; verified red under the old icon-only target, green after.flutter analyzeclean; full suite green (97 tests). Addsdocs/notes/discovered/2026-05-31-collapsed-rail-tiny-hit-target.md.🤖 Generated with Claude Code