make the Catalog page usable on a phone - #3201
Merged
Merged
Conversation
The toolbar's four controls needed ~350px and ran off the side of a 320px viewport; the three filter dropdowns each claimed a fixed min-width they didn't have room for; and the selection bar's menus opened off-screen when anchored to a ~90px button. - Toolbar wraps to its own rows under `sm`: full-width segmented Grid/Albums toggle, then Sync/Ingest/New splitting the row evenly. - Search moved above the filters so it's reachable without scrolling. - Type chips stay on one swipeable row instead of stacking 3+ rows deep. - Filter dropdowns lay out 2-up; the fixed min-width applies from `sm` up. - Selection bar stacks its count above three equal-width actions. Its menus anchor to the button ROW under `sm` (the per-button wrappers only become `relative` at `sm`) so they span the bar, and cap at 60vh so an upward- opening menu can't run off the top in landscape. - Labels too long for a narrow button hide their tail and keep the full wording in aria-label, so the accessible name never depends on viewport width (WCAG 2.5.3 label-in-name, asserted in the suite). - Card delete confirm moves from a corner overlay to the shared InlineConfirmRow band, which names the ingredient. The overlay had to be paid for with reserved padding on the link, and a single-column phone card has no width to spare — reserving it crushed the name, and stretching the overlay instead covered the name outright, hiding the record being deleted. The band also drops a magic padding constant that was coupled to the confirm row's own height. - Bigger delete/select tap targets; album subtitle drops below the title instead of squeezing it. - Sticky bar drops `backdrop-blur` under `sm`: the fill is already 95% opaque, so the blur only cost a per-frame compositor re-sample. Apart from the delete-confirm band, desktop layout is unchanged.
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
The Catalog page didn't fit a phone. The header toolbar's four controls need ~350px and a 320px viewport gives 288px, so they ran off the side; the three filter dropdowns each claimed a fixed
min-w-[160px]they had no room for; and the selection bar's dropdown menus, anchored to a ~90px button, opened past the viewport edge.Layout
sm— a full-width segmented Grid/Albums toggle, then Sync/Ingest/New splitting the row evenly.overflow-x-auto scrollbar-hide touch-pan-x, bleeding to the screen edge) instead of stacking 3–4 rows deep and pushing the cards below the fold. They wrap as before fromsmup.sm.sm(the per-button wrappers only becomerelativeatsm) so they span the bar rather than hanging off one button, and cap at60vhso an upward-opening menu can't run off the top in landscape.min-h-[40px]across the toolbar, filters, and action bar.Accessibility
Labels too long for a narrow button hide their tail (
hidden sm:inline/hidden lg:inline) and keep the full wording inaria-label, so the accessible name never depends on viewport width. The visible text stays a prefix of it, per WCAG 2.5.3 label-in-name.Card delete confirm
Moved from a corner overlay to the shared
InlineConfirmRowband, which names the ingredient (Delete "Echo Saint"?). The overlay had to be paid for with reserved padding on the link, and a single-column phone card has no width to spare: reserving it crushed the name, and stretching the overlay instead covered the name outright — hiding the record being deleted. The band also drops a magic padding constant that was coupled to the confirm row's own height.Performance
The sticky selection bar drops
backdrop-blurundersm. Its fill is already 95% opaque, so on a phone the blur bought nothing visible while making the compositor re-sample the area behind the bar on every scroll frame over a 60-card grid.Apart from the delete-confirm band, desktop layout is unchanged.
Test plan
cd client && npm test— 477 files / 5330 tests pass, including a new case asserting that the three buttons whose labels shorten keep their fullaria-label. That assertion is load-bearing: jsdom applies no CSS, so the existing name-based queries would still pass with thearia-labeldeleted.npx eslintclean on all changed files.sm:override lands after its base rule in the cascade — includingpl-11overpx-4on the confirm band.