feat: #18 dark theme and measured bærekraft numbers #59
+94
−19
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 #18
Summary
prefers-color-scheme. The whole palette is lifted into CSS custom properties first so it swaps in one place, and the light values are byte-identical to what they replace, so nothing changes for anyone who has not asked for dark.cache-firstas the fetch policy instead of inheriting Apollo's default, so the no-request-on-a-repeat promise is something the code states rather than something we assume.Numbers
index-*.jsindex-*.cssAlbumDetailPage-*.jsAlbumDetailPage-*.cssThe
AlbumDetailPagerows are the code-split chunk from #11 and are not part of the search page payload. The detail route is therefore already code-split and this PR only measures it, which is what #18 said it should do.Requests for a typical search: one. The client has exactly one
useQuery, so a search is a singlesearchAlbumsrequest. Nothing is sent while the page is idle and nothing while the user types. Searching again for something already in the cache sends nothing.Contrast
Every text pair is AA or better and every form-control border is 3:1 or better in the dark palette.
--accent-textexists because the accent flips to a light green on dark and white on that would fail.--texton--surface--mutedon--surface--accenton--surface--accent-texton--accent--chip-texton--chip-bg--header-texton--header-bg--border-strongon--surface--focuson--surfaceAlso fixed while in the README
The milestone row still said M2 was current, and the frontend description still said the search debounces 300 ms, which has not been true since #19 made it submit-only. That line directly contradicted the sustainability claim that typing costs nothing.
Verification
pnpm format:check,pnpm lint,pnpm typecheck,pnpm test(48 client, 21 server) andpnpm builduseQueryinclient/