Repository navigation
Phase 33 slice B: the gallery, rebuilt to the design - #264
Merged
Merged
Conversation
Phase 33 slice B. The project page shows real thumbnails with the score on the corner, quiet at the bar and amber below it, a summary against the bar, a search field and type tabs kept in the URL, and a Live status. The page now reloads on any edit, rename, genre or type change and new state, not only when the canvas count changes. A fixture store seeds what the viewer tests need.
Test that a genre or type change reloads the gallery, keep the summary on phones, keep tab labels on one line, draw the card focus ring for the keyboard only, and correct the README's viewer claims.
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.
Second slice of Phase 33. It rebuilds the project page, the viewer's gallery, to design screen 1 (
docs/viewer-redesign/1-gallery-{light,dark}.png).What changed
?q=,?type=), so a reload or a shared link keeps them. When nothing matches, the page says so and offers a Clear button./api/canvasesrows carry each canvas'stypeandgenre. This costs about 2ms per request on 27 canvases.Fixture store
test/fixtures/viewer-store.tsseeds a temporary store with what the viewer's tests and screenshots need:It builds the store through the store's own functions rather than shipping JSON, so it follows the canvas format as it changes.
test/unit/test-viewer-fixture.tschecks what the store holds, including the two scores, so a scoring change fails there with a clear name instead of breaking a page test.Tests
test/browser/test-viewer-gallery.ts, 34 checks. They cover cards, counts, the summary and the meta line; the chips at 100, 96 and 95; search, tabs, Clear and the URL state across a reload; and that an edit, a rename, a genre change, a type change and a new state each reload the page, while nothing reloads when nothing changed. Offline and Live are checked too.test/unit/test-viewer-fixture.ts.test-viewer-panels.ts,test-empty-thumbnail.ts,test-variants.ts,test-viewer-surface.tsand the header checks intest-viewer-sidebar.ts. Each finds cards by adata-canvas-idattribute and checks the same behaviour as before: the score chip, the empty placeholder, variants folded into their base (now counted in the meta line), thumbnail sizing, and the page title.Verification
An independent verifier found no major issues. Its checks:
Its minor findings are fixed in the second commit:
The docs audit found five README sentences this slice made false; they are corrected in the same commit. The README screenshots are refreshed in slice E, as the spec plans.