feat(gallery): detail-page navigation, code ergonomics, image polish - #300
Merged
Merged
Conversation
Detail pages were dead ends: a reader who finished one example had to go back to the grid to find the next. They now page within their own kind (prev/next, arrow keys), list their tags as links back to the filtered index, and end with three related entries chosen by shared topic tags. Source listings gain a line-number gutter and collapse past 120 lines; every code block gets a copy button with a non-secure-context fallback and a visible failure state; README headings get stable anchors. Card images carry intrinsic dimensions so the grid no longer shifts as they load, and the lightbox only closes on backdrop, button or Esc -- clicking the image toggles native size instead. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Signed-off-by: TMHSDigital <[email protected]>
This was referenced Sep 27, 2026
TMHSDigital
added a commit
that referenced
this pull request
Sep 27, 2026
gh pr diff --name-only downloads the whole diff first and fails with HTTP 406 past 20,000 lines; a full docs/gallery regeneration crossed that on #300 and left the PR red on a check that only needed file paths. The paginated files endpoint returns paths alone and has no diff-size limit. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Signed-off-by: TMHSDigital <[email protected]>
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.
Summary
PR 1 of 3 in the website QoL pass (gallery first, then landing).
../#tag=<t>; a Related strip of 3 entries ranked by shared topic tags (showcaseexcluded), ties broken by gallery order.aria-hiddenpre;highlight_pythonuntouched); listings > 120 lines collapse with "Show all N lines" (JS-only; no-JS renders in full); copy button on every README and source block via onecopyText()with anexecCommandfallback and a visible "Copy failed" state; README h1–h3 get deduped slug ids + hover#anchors, with ids reserved against page ids.width/height(+height:auto) so the grid reserves space before load; first 4 cards eager; detail herofetchpriority="high"; lightbox closes on backdrop / Close / Esc only, image click toggles native size.Evidence
Proven by live run (local
python -m http.server -d docs, Playwright/Chromium):build_gallery.pyrun twice →diff -rqidentical (deterministic; the validate.yml drift gate will hold).bmesh-gear: 372-line source collapsed, 2 copy buttons injected, anchorsrun,exit-codes, pagerdriver-wave← →shader-node-group, related =uv-layer-grid,collision-hull-proxy,mesh-hygiene-audit..nativewithout closing; backdrop click closes; Close button closes. Copy → "Copied".bmesh-gearnavigated toshader-node-group.scrollWidth360 ≤ 375 (no horizontal overflow); key hint hidden.heightattribute overrodeaspect-ratio(cards rendered 720px tall) untilheight:autowas added.By inspection only: the
execCommandfallback path (requires a non-secure origin); showcase edge pagers (shipping-cratehas no prev,book-trolleyno next) read from generated HTML.🤖 Generated with Claude Code