Repository navigation
docs: show phone-sized diagrams on phones - #346
Merged
Merged
Conversation
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>
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
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.pyturns a diagram image followed by a link to its-mobile.svginto one<picture>that switches at 760px, the site's phone breakpoint. A page without that pair renders as before.check_linksinscripts/build-docs.pynow readssrcset, so a missing drawing still fails the build. That also covers the hero image's sources.Verification
scripts/build-docs.sh, andtest_docs_versions.py(23 pass)srcsetnames a missing file fails the link checkopcore run pre-commit: Verify clean, no Sense findings; it exitsrequires_attentionon the repository's partial Sense coverage, as onmain🤖 Generated with Claude Code