Repository navigation
web UI: style filters and favorites screens - #57
Merged
Merged
Conversation
Restyle /filters and /favorites with #35's design tokens: page-title + label-rule headers, section-title for subsections, .card rows on favorites (matching the halls/home list treatment), .empty-state for empty lists, .btn-primary Save and .btn-ghost Remove, and chip-style checkboxes on /filters that fill maroon when checked for a clear on/off state. Extends filters.spec.ts and favorites.spec.ts (write-first, confirmed red against the unstyled pages, green after) to assert the new visual behavior directly via toHaveCSS rather than class names: a checked allergen chip's background actually changes, favorite rows get a card surface distinct from the page background, and the empty state renders with a dashed border. Native checkbox/button roles and accessible names are unchanged, so the existing assertions (getByRole("checkbox", { name: "Milk" }), the favorite star's text-content contract, Remove's accessible name) keep passing as-is. Filters and favorites remain device-only (localStorage/IndexedDB) — no Supabase calls, no auth gate.
3 tasks
4 tasks done
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.
Closes #40
What changed
Restyled
web/src/routes/filters/+page.svelteandweb/src/routes/favorites/+page.svelteusing only the landed component classes/tokens fromweb/src/app.css(.page-title,.section-title,.label-rule,.card,.empty-state,.btn/.btn-primary/.btn-ghost/.btn-sm,.badge) plus Tailwind utilities built from the existing@themetokens. Noapp.cssedits, no new colors..empty-statefor the no-data case,.btn-primarySave,.badgefor the "Saved" status. Each allergen/diet-tag checkbox is wrapped in a chip-style<label>that fills maroon (bg-maroon-600 text-paper-50) when checked vs. an outlinedborder-ink-900/25chip when not — the issue calls out that filters need "clear on/off states," so this is a real visual, not just decoration on the same 1px checkbox..cardrows matching the treatment already established on/and/halls/[slug](same list-row pattern),.empty-statefor empty lists,.btn-ghost btn-smRemove (per app.css's own stated intent: "low-stakes/destructive-lite").Native checkbox/button roles and accessible names are unchanged:
getByRole("checkbox", { name: "Milk" }), the favorite star's glyph-only text-content contract on the hall/home pages, and the Remove button's accessible name all still resolve exactly as before.Both are device-only per CLAUDE.md's data-residency table —
FoodPreferencesinlocalStorage,Favorites in IndexedDB viaIndexedDbFavoritesStorage. No Supabase calls added, no auth gate.Red/green evidence (strict TDD)
Extended
web/e2e/filters.spec.tsandweb/e2e/favorites.spec.tswrite-first with new assertions for the new visual behavior, usingtoHaveCSS(not class-name matching, so the test verifies an actual rendered difference, not a string in an attribute).Red — ran
PORT=4303 npx playwright test filters.spec.ts favorites.spec.tsagainst the unstyled pages, before any.sveltechanges:Green — after restyling both pages, same command:
Verification
PORT=4303 npx playwright test(full suite, all 17 specs, including sibling-ownedshell.spec.ts,halls-menu.spec.ts,rank.spec.ts,vertical-slice.spec.ts): 17 passed, confirming this restyle didn't regressshell.spec.ts'sproveHydrated()(which also depends on the favorite star's text-content contract) or any concurrently-landing sibling work.pnpm --filter web check: 0 errors, 0 warnings (396 files).pnpm --filter web build(aftercp web/.env.example web/.env): succeeds; only the expected pre-existingadapter-auto"could not detect a supported production environment" notice, not an error.PORT=4303 vite dev, screenshotted via Playwright's own chromium since no system Chrome was available in this sandbox): confirmed the maroon page-title/label-rule header, chip-style checkboxes with a visibly filled checked state, and the dashed.empty-statepanel on/favoritesall render as intended.Acceptance criteria (from #40)
npx playwright testpasses unchanged — extended, not modified in place; all pre-existing assertions (checkbox accessible names, Saved status text, star button text-content contract, Remove button name) still pass as writtenpnpm --filter web checkclean, CI passes (checked locally; CI to confirm)Scope
Touched only:
web/src/routes/filters/+page.svelte,web/src/routes/favorites/+page.svelte,web/e2e/filters.spec.ts,web/e2e/favorites.spec.ts. Noapp.css, no+layout.svelte, no other route dirs, no other e2e specs, nohalls/files.Not merging — leaving for review per dispatch instructions.