Skip to content

docs: frame the screenshots, and let a reader enlarge one - #7008

Merged
gustavosbarreto merged 3 commits into
masterfrom
docs/shot-frame
Sep 1, 2026
Merged

docs: frame the screenshots, and let a reader enlarge one#7008
gustavosbarreto merged 3 commits into
masterfrom
docs/shot-frame

Conversation

@gustavosbarreto

Copy link
Copy Markdown
Member

The console is dark and so are the docs, so a screenshot of it landed on a background the same colour as itself and stopped reading as a picture. Every screenshot now carries an edge of its own.

A <Shot> gets a little more than an edge: it is framed as the window it is, with a bar naming the console route it was taken at. The route is already declared on the tag, and it answers the question a screenshot always raises — where do I go to see this myself.

Clicking any screenshot opens it at up to 1600px in a modal dialog, because a console table rendered at column width is legible only so far. Markdown images are given a tab stop and Enter, which a plain <img> does not have; the <Shot> frame was already a button.

@gustavosbarreto
gustavosbarreto requested a review from a team as a code owner September 1, 2026 19:28
@github-actions

github-actions Bot commented Sep 1, 2026

Copy link
Copy Markdown

Claude finished @gustavosbarreto's task in 1m 58s —— View job


Code Review Complete

Reviewed 3 files (Astro component, layout script, global CSS) across code quality, accessibility, and correctness. 1 inline issue posted (1 medium).

Additional notes

The single finding is that .prose img (JS in DocsLayout.astro and the border rule in global.css) also matches the <Shot> component's inner <img>, because <Shot> renders inside <article class="prose">. That contradicts the code's own comment and gives every screenshot a duplicate tab stop plus a nested role="button". Details are in the inline comment. The dialog/modal, zoom sizing, prefers-reduced-motion handling, and lazy loading all look correct.


To request another review round, comment /review.
· docs/shot-frame

Comment thread ui/apps/docs/src/layouts/DocsLayout.astro
A screenshot of the console sits on the same near-black the docs use, so
it bled into the page and read as part of it. Each one now carries an
edge of its own, and a <Shot> is framed as the window it is: a bar
naming the console route it was taken at, which is where the reader
would go to see the same thing.

Clicking any screenshot opens it at up to 1600px in a modal dialog, since
a console table at column width is only readable so far. Markdown images
get a tab stop and Enter, which a plain <img> does not have.
The bar naming the console route sat on top of every screenshot and
earned less than it cost. The frame is the whole treatment now.

The enlarged image closes the way the rest of the web does: a click
anywhere, including on the image itself, plus a close button in the
corner and Escape. The script also stopped marking a framed screenshot
as a button, which nested one button inside another.
The design system resets `dialog` with `all: unset`, which takes the
browser's `dialog:not([open]) { display: none }` with it, so closing the
dialog cleared its state and left the image drawn over the page.

The scroll lock goes with it: `body:has(dialog[open])` in the design
system already does that job.
@gustavosbarreto

Copy link
Copy Markdown
Member Author

/review

@github-actions

github-actions Bot commented Sep 1, 2026

Copy link
Copy Markdown

Claude finished @gustavosbarreto's task in 1m 8s —— View job


Code Review Complete

Reviewed 3 files across code quality, security, testing, language patterns, and architecture — no new issues found. The code looks good as-is.

The one finding from the previous round — .prose img also matching the <Shot> component's inner image — is fully resolved: the JS selectors carry :not([data-shot-zoom] img) (DocsLayout.astro:532, :540) and the CSS border/zoom rules now do too (global.css). The delegated click/keydown handling, dialog showModal/close, backdrop, viewport-relative sizing, prefers-reduced-motion, and lazy loading all check out.
· docs/shot-frame

@gustavosbarreto
gustavosbarreto merged commit e863fbd into master Sep 1, 2026
40 checks passed
@gustavosbarreto
gustavosbarreto deleted the docs/shot-frame branch September 1, 2026 21:49
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