Fade the strip's right edge only when content overflows - #81
Merged
Conversation
The "Also done today" chip strip and the Suggested pill band wrapped themselves in an unconditional ShaderMask, so the rightmost ~12% was always dimmed — the last chip looked faded even when the whole row fit with room to spare, and it stayed faded after scrolling to the end, exactly when there was nothing left to scroll to. Drive the fade from the strip's scroll metrics instead: paint it only while extentAfter > 0. Toggling the mask re-parents the strip, so keep the child under a GlobalKey — otherwise the Scrollable is rebuilt from scratch on each toggle and snaps back to offset 0, making the strip un-scrollable. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
# Conflicts: # docs/TEST_COVERAGE.md
… testing Two gaps the first round of fade tests left: nothing exercised scrolling back from the far right (the return trip through the mask toggle, which is what the GlobalKey exists for), and nothing covered a strip that fits at desktop width but overflows at phone width with no user interaction. Manual testing then turned up three doc claims that were simply wrong: "Done today" auto-navigates to the parent rather than leaving you in the leaf view, chip tooltips fire on hover on desktop (TooltipTriggerMode.tap governs touch only), and suggestions are recomputed on every expand, not just the first — so a Hide + Show picks up new tasks with no restart. Also teach /manual-test to recommend rather than only ask about /cleardb, and to phrase width tests as maximise/restore, since the dev window launches phone-shaped at 411x820 and dragging to an arbitrary width fights the window manager. Co-Authored-By: Claude Opus 5 (1M context) <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.
Problem
The Today tab's "Also done today" chip strip and the Suggested pill band each wrapped themselves in an unconditional
ShaderMask, fading the rightmost ~12% of the viewport. Two consequences:Fix
Drive the fade from the strip's scroll metrics instead: a new
_FadeRightEdgewidget listens toScrollMetricsNotification+ScrollNotificationand paints the mask only whileextentAfter > 0. Metrics arrive during layout, so the rebuild is deferred to a post-frame callback.One subtlety, caught by a test rather than by review: toggling the mask re-parents the strip, so without a
GlobalKeytheScrollableis rebuilt from scratch on every toggle and snaps back to offset 0 — the first swipe would undo itself and the fade could never clear. The child is kept under aKeyedSubtreewith aGlobalKeyso the live scroll position survives both re-parents.Applied to both strips, since they share the helper.
Testing
Automated — 7 fade-specific tests in
test/screens/todays_five_screen_test.dart(file now 91 tests; full suite 1566 passed / 1 skipped,flutter analyzeclean):ShaderMaskwhen the chips fit on screenShaderMaskapplied when the chips overflowextentAfter == 0)GlobalKeyis removedShaderMaskwhen it fitsShaderMaskwhen the columns overflowManual (desktop) — full
/manual-testround passed: 15 functional tests across the chip strip, the pill band, and the mask-toggle regressions, plus 6 design checks in both themes.Also in here
docs/UI_VIEWS.md— three behaviour claims found wrong while testing: "Done today" auto-navigates to the parent (no back arrow); chip tooltips fire on hover on desktop and tap on mobile; suggestions are recomputed on every expand, not just the first, so Hide + Show picks up new tasks without a restart..claude/skills/manual-test/SKILL.md— must recommend rather than merely ask about/cleardb, and phrase width tests as maximise/restore (the dev window launches phone-shaped at 411x820; un-maximising returns to the last dragged size, so only a fresh launch gives true phone width).Known, not addressed
The Suggested pill band looks ragged on a wide window with few suggestions — uneven top-row gaps from column-major widths, pills ellipsising at the ~260px cap with free width to spare, half-empty second row. Pre-existing since #78, logged as a TODO with the user's requirement that a single row shouldn't be forced into two when everything fits. Out of scope here.
🤖 Generated with Claude Code