Repository navigation
Roasters: group pinned roasters above the directory, collapsed past three - #24
Merged
Merged
Conversation
…hree
Pinned roasters used to be partitioned to the top of the same list, so
once a visitor had more than a handful pinned the first screen was all
favourites and the directory started below the fold.
They now render as their own "Pinned roasters (N)" group above the
directory, on both the mobile card list and the desktop table:
- Up to three pins the group is always open with a static heading.
- Past three it starts collapsed, with a name preview ("Alpha, Bravo,
Charlie +2") and a chevron; the heading is a real button with
aria-expanded / aria-controls. The visitor's open/closed choice is
remembered in localStorage (usePinnedSectionOpen).
- Pinned roasters no longer repeat in the main list, which gets an
"All roasters" divider when both groups are present.
- The group honours the active filters and sort, mirrors state across
the mobile and desktop layouts, and disappears when the Pinned chip
is on (the whole list is favourites then) or the visitor is signed out.
The card and row renderers are shared by both groups so they cannot
drift apart visually. Tests cover the threshold, the persisted toggle,
filter interaction, the Pinned chip, and the signed-out case.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WQPoqZvpFtcjR76PFyVv99
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
jameshiggins
marked this pull request as ready for review
September 25, 2026 02:24
This branch was successfully 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.
Summary
Pinned roasters used to be partitioned to the top of the same list. With more than a handful pinned, the first screen was all favourites and the directory started below the fold.
They now render as their own Pinned roasters (N) group above the directory, on both the mobile card list and the desktop table.
Alpha, Bravo, Charlie +2) and a chevron. The heading is a real<button>witharia-expanded/aria-controls. The visitor's open/closed choice is remembered in localStorage (newusePinnedSectionOpenhook).The card and row renderers were extracted into shared functions so the two groups cannot drift apart visually. No visual change to the rows themselves.
Test plan
npm run lint(0 errors, 15 pre-existing warnings)npm run typechecknpm test(343 passing; 9 inRoastersPage.pins.test.jsxcover threshold, persisted toggle,?region=filtering, Pinned chip, mobile mirror, signed out)npm run build/roasterswith preview and that reopening persists across reloads🤖 Generated with Claude Code
https://claude.ai/code/session_01WQPoqZvpFtcjR76PFyVv99
Generated by Claude Code