Skip to content

Phase 33 slice C: the detail page's shell, rebuilt to the design - #265

Merged
vicmaster merged 2 commits into
masterfrom
phase-33-slice-c
Nov 24, 2026
Merged

vicmaster merged 2 commits into
masterfrom
phase-33-slice-c

Conversation

@vicmaster

Copy link
Copy Markdown
Owner

Third slice of Phase 33. It rebuilds the canvas detail page's toolbar and preview to design screens 2, 3 and 5. The inspector beside it is slice D's.

What changed

  • The toolbar. It now holds, in order:

    • a back link named after the project;
    • the canvas name and size;
    • the designed states, as links;
    • breakpoint tabs for the canvas type;
    • a Comment button with the open-comment count;
    • a More menu;
    • a Live / Offline status.

    The breakpoint tabs depend on the type: Mobile, Tablet, Desktop and Compare on web; the window widths, the artboard and Compare on desktop-app; none on a phone, which keeps its device frame. The tabs work by click and arrow keys.

  • The More menu holds View JSON, Copy canvas ID, Archive or Restore, and Delete canvas. These used to be a row of same-weight toolbar buttons, and Delete was the loudest thing on the page.

  • Delete confirms in a dialog instead of the browser's confirm() box. The dialog says the delete cannot be undone and points to archive as the safer option.

  • The preview opens fitted to the pane. It used to open at 1:1, so a 1440 canvas needed scrolling. Zoom in and out step through 50, 75, 100, 150 and 200%, and Fit returns to fitted. Choosing a breakpoint resets to fit, and Compare turns the zoom buttons off. The preview's dark theme and the phone's safe area are buttons beside the zoom. A caption under the preview names the type, the size and the designed states.

  • Narrow windows work.

    • Below 1400px the breakpoint tabs move right, so the canvas name keeps its room.
    • At 900px or less the toolbar wraps onto two rows.
    • At 720px or less the preview keeps most of the window's height and the page scrolls down to the inspector. Before, the inspector was cut off at those widths, on master too.

Tests

  • New: test/browser/test-viewer-detail.ts, 51 checks on the fixture store. It covers:
    • the toolbar for each canvas type, and the state links;
    • the arrow keys on the breakpoint tabs;
    • every zoom step, Fit, the reset on breakpoint change, and Compare;
    • the theme button on a canvas that has a dark layer;
    • the whole artboard showing at 100%;
    • every More menu action, including copying twice;
    • the delete dialog's Cancel and confirm;
    • the name and states staying visible at 1200, 1024 and 768px, and the page scrolling at 390px.
  • Fixture: the store gains a canvas with a dark token layer, so the theme check always runs.
  • Rewritten for the new markup: test-archive-view.ts, test-variants.ts, test-desktop-app.ts, test-viewer-surface.ts, test-viewer-compare.ts, test-viewer-surface-browser.ts and the dialog checks in test-viewer-components.ts. Each still covers the same behaviour:
    • the lifecycle actions, now as menu items;
    • the state links, now a nav;
    • the breakpoints for each type, now tabs;
    • the device frame and safe area;
    • Compare;
    • the dark render surviving a breakpoint switch.
  • Results: the unit tier passes 98/98, the test type-check is clean, and all five viewer browser tests pass.

Verification

An independent verifier checked every FR-C requirement and compared the pages with the design images in both themes. It found three major problems, all fixed in the second commit:

  • the canvas name and the state links disappeared below about 1200px;
  • the theme button's test could never run, because no fixture canvas had a dark layer;
  • the preview shrank to a sliver below 720px.

It also found several minor ones, fixed in the same commit:

  • the frame cut the last 2px of the artboard at 100%;
  • Copy could get stuck on "Copied";
  • pressing Escape on the menu or the dialog threw away a half-written comment;
  • the zoom buttons stayed enabled at their limits;
  • a few labels and focus states were missing.

The dialog now matches the design: 480px wide with a Close button.

The docs audit found five places in the README and GUIDELINES that described the old toolbar. They are corrected in the same commit. The README screenshots are refreshed in slice E.

Phase 33 slice C. The toolbar is a back link to the project, the name and
size, the states as a nav of links, breakpoint tabs by canvas type, Comment,
a More menu and a Live status. View JSON, Copy canvas ID, Archive or Restore
and Delete live in the menu, and Delete confirms in a dialog. The preview
opens fitted to the pane with zoom steps, and the preview theme and safe area
are tools beside the zoom.
Keep the canvas name and states visible in narrow windows, let the narrow page scroll to the inspector, show the whole artboard at 100%, test the preview theme on a canvas that has a dark layer, keep a comment draft when Escape closes a menu or dialog, and correct the README's detail-page claims.
@vicmaster
vicmaster merged commit 446971a into master Nov 24, 2026
3 checks passed
@vicmaster
vicmaster deleted the phase-33-slice-c branch November 24, 2026 17:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant