Skip to content

docs: show phone-sized diagrams on phones - #346

Merged
EivMeyer merged 2 commits into
mainfrom
docs/phone-diagrams
Oct 10, 2026
Merged

EivMeyer merged 2 commits into
mainfrom
docs/phone-diagrams

Conversation

@EivMeyer

Copy link
Copy Markdown
Contributor

Summary

On a phone the documentation now shows each diagram's phone-sized drawing in place of the wide one. Before, the wide drawing shrank to the column until its labels were unreadable, with a link to the phone-sized file underneath.

Details

  • scripts/docs_theme.py turns a diagram image followed by a link to its -mobile.svg into one <picture> that switches at 760px, the site's phone breakpoint. A page without that pair renders as before.
  • The README is unchanged, so GitHub keeps the wide drawing and the link.
  • check_links in scripts/build-docs.py now reads srcset, so a missing drawing still fails the build. That also covers the hero image's sources.

Verification

  • scripts/build-docs.sh, and test_docs_versions.py (23 pass)
  • A page whose srcset names a missing file fails the link check
  • Chrome, Firefox and WebKit at 1440, 700 and 390px: the wide drawing shows on desktop, the phone-sized one below 760px, with no horizontal overflow
  • opcore run pre-commit: Verify clean, no Sense findings; it exits requires_attention on the repository's partial Sense coverage, as on main

🤖 Generated with Claude Code

Eivind and others added 2 commits October 10, 2026 11:35
On a phone the documentation shrank each wide diagram to the column and
linked to its phone-sized drawing below. The builder now turns that
image and link into one picture that shows the phone-sized drawing up
to 760px. The README keeps its link for GitHub.

The link check now reads srcset, so a missing drawing still fails the
build.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Reading srcset inline pushed the tag handler to a cyclomatic complexity
of 12 against the limit of 10. Move the per-attribute parsing into a
helper.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@EivMeyer
EivMeyer merged commit 53cb76e into main Oct 10, 2026
16 checks passed
@EivMeyer
EivMeyer deleted the docs/phone-diagrams branch October 10, 2026 18:47
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