update harness docs#1405
Merged
Merged
Conversation
oss-maintainer
approved these changes
May 15, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the docs’ Mermaid “expand/zoom” behavior by replacing the previous lightweight fullscreen clone with a custom modal overlay that supports zoom controls, wheel-zoom, and drag-to-pan, and by targeting Sphinx’s .mermaid-container structure for attachment.
Changes:
- Replaces the existing Mermaid zoom wrapper/modal with a new
.mz-*implementation (new CSS, modal layout, and interaction handlers). - Adds explicit zoom controls (+/−/reset), mouse-wheel zoom, and click-drag panning inside the modal viewport.
- Updates the attachment logic to prefer
.mermaid-container(with a polling fallback) and hides sphinxcontrib-mermaid’s built-in fullscreen button.
| '.mz-viewport.mz-grabbing { cursor: grabbing; }', | ||
|
|
||
| /* SVG holder – width % controls zoom */ | ||
| '.mz-svgholder { min-width: 100%; display: inline-block; }', |
| closeBtn.title = 'Close (Esc)'; | ||
| closeBtn.setAttribute('aria-label', 'Close'); | ||
| closeBtn.className = 'mz-close'; | ||
| closeBtn.innerHTML = '×'; |
Comment on lines
+167
to
+176
| function mkBtn(html, title, cb) { | ||
| var b = document.createElement('button'); | ||
| b.className = 'mz-tbtn'; | ||
| b.innerHTML = html; b.title = title; | ||
| b.addEventListener('click', cb); | ||
| return b; | ||
| } | ||
| var btnOut = mkBtn('−', 'Zoom out (−)', function () { setScale(scale - STEP); }); | ||
| var btnReset = mkBtn('↺', 'Reset zoom', function () { setScale(1.0); }); | ||
| var btnIn = mkBtn('+', 'Zoom in (+)', function () { setScale(scale + STEP); }); |
| overlay.className = 'mz-overlay'; | ||
| overlay.appendChild(box); | ||
| document.body.appendChild(overlay); | ||
|
|
Comment on lines
1
to
3
| (function () { | ||
| 'use strict'; | ||
|
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
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.
No description provided.