Skip to content

fix(filters): make sort sheet options dense like the other sheets - #516

Merged
richardthe3rd merged 1 commit into
mainfrom
claude/ship-issues-507-0t88ty
Aug 3, 2026
Merged

fix(filters): make sort sheet options dense like the other sheets#516
richardthe3rd merged 1 commit into
mainfrom
claude/ship-issues-507-0t88ty

Conversation

@richardthe3rd

Copy link
Copy Markdown
Owner

Summary

SortOptionsSheet built its options with a plain ListTile and omitted dense: true, while the category, style, and visibility sheets in the same file all pass it on their CheckboxListTiles. With no ListTileTheme anywhere in lib/, the sort tile fell back to the Material 3 default of styling its title from bodyLarge (~16sp) — a 48px row pitch against 40px everywhere else. The result read as a different, larger font in the sort picker.

Adding dense: true brings it in line.

Changes

File Change
lib/widgets/drink_filter_sheets.dart dense: true on the ListTile in SortOptionsSheet
test/widgets/drink_filter_sheets_test.dart Regression test for the row density

On the controlAffinity question in the issue

The issue asked whether the radio-vs-checkbox controlAffinity also wants aligning. It does not: ListTile has no controlAffinity parameter, and passing leading: Radio<DrinkSort>(...) already is leading affinity — consistent with the explicit ListTileControlAffinity.leading on the other sheets. No change made.

Testing

The new test asserts two things: that every sort-option ListTile is dense, and that the rendered height of a sort row equals the rendered height of a category row. The second assertion is deliberately self-calibrating against a sheet that was always dense rather than hardcoding a pixel constant, so it stays honest if Material changes its metrics.

Verified the test is a real guard — with the one-line fix stashed it fails, and passes with it restored:

00:01 +3 -1: SortOptionsSheet option rows are the same height as the other sheets (regression: #507) [E]
  Expected: true
    Actual: <null>

./bin/mise run check is green: 1314 tests pass (baseline 1313), analyzer clean, formatter clean.

Scope notes

  • Restyle only — the widget tree shape is unchanged, no restructure mixed in.
  • No goldens affected; test/goldens/ covers the brewery, drink-detail, and style screens only, no filter sheets. No golden regeneration was run.
  • Semantics wrapper and labels untouched. The issue notes this is cosmetic with no accessibility defect, and that remains true.

Not verifiable by an agent: the visual result in a real browser or on device. Worth a glance at the sort sheet next to the style sheet on the Pages preview.

Fixes #507


Generated by Claude Code

SortOptionsSheet built its options with a plain ListTile and omitted
dense: true, while the category, style, and visibility sheets all pass
it on their CheckboxListTiles. With no ListTileTheme in lib/, the sort
tile fell back to the Material 3 default of styling its title from
bodyLarge (~16sp), giving a 48px row pitch against 40px elsewhere — so
the sort picker read as a different, larger font.

Add dense: true so the row pitch and title size match. Cosmetic only;
the Semantics labels and the widget tree shape are unchanged.

The issue also asked whether controlAffinity wants aligning here. It
does not — ListTile has no controlAffinity parameter, and passing
leading: Radio already is leading affinity, matching the other sheets.

Fixes #507

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01A5nhJiJuRjtP3q7mTrsXBt
Copilot AI review requested due to automatic review settings August 3, 2026 20:21

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes an inconsistency in the filter bottom sheets by making SortOptionsSheet option rows use the same dense row styling as the category/style/visibility sheets, addressing the “Sort By sheet options render larger” regression (#507).

Changes:

  • Set dense: true on the ListTile rows used by SortOptionsSheet.
  • Add a widget regression test that verifies the sort sheet rows are dense and match the rendered row height of an already-dense category sheet row.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
lib/widgets/drink_filter_sheets.dart Makes SortOptionsSheet option rows dense to match other filter sheets’ row density.
test/widgets/drink_filter_sheets_test.dart Adds a regression test covering both the dense flag and the rendered row height parity with a dense checkbox row.

@codecov

codecov Bot commented Aug 3, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@github-actions

github-actions Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

🚀 Cloudflare Pages Preview

Your preview deployment is ready!

Preview URL: https://claude-ship-issues-507-0t88t.staging-cambeerfestival.pages.dev

This preview will be automatically updated when you push new commits to this PR.

@richardthe3rd
richardthe3rd merged commit 3d38c8f into main Aug 3, 2026
16 checks passed
@github-actions github-actions Bot mentioned this pull request Aug 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Sort By sheet options render larger than every other filter sheet

3 participants