Repository navigation
#158 - Style updates to website images and removal of news - #158
Conversation
Update DAQ and benchmark images to be of the same style, enlargeable, and with the same green border as other images. This also works well with light/dark themes. Removed news section from website; we can add it back in after release.
|
| Filename | Overview |
|---|---|
| docs/javascripts/landing.js | Adds initArchitectureGraphic for the new architecture overlay, fixes close-button querySelector scope, and routes Escape key to the arch overlay when it is open. |
| docs/javascripts/image-overlay.js | New file providing zoom overlay for the benchmark decision-tree image; uses a module-scoped keydownBound guard to prevent listener accumulation across MkDocs instant navigations. |
| docs/landing/overlay.html | Adds architecture-graphic-overlay dialog alongside the existing daqiri-graphic-overlay; both follow the same accessible pattern (role=dialog, aria-modal, aria-labelledby, close button). |
| docs/landing/features.html | Wraps the architecture SVG in a hero-visual-link button that triggers the new overlay; adds data-arch-open and ARIA attributes correctly. |
| docs/benchmarks/benchmarks.md | Wraps the backend decision-tree SVG in the new .img-visual-frame div with an inline zoom overlay; delegates open/close logic to image-overlay.js. |
| docs/stylesheets/extra.css | Adds .img-visual-frame utility class for the green-bordered, hover-animated image frame used on the benchmarks page. |
| docs/index.md | Removes the landing/news.html snippet include; the news section will be restored after release. |
| mkdocs.yml | Adds javascripts/image-overlay.js to extra_javascript so the benchmark zoom overlay loads site-wide. |
| .gitignore | Adds Python bytecode patterns (__pycache__/, *.pyc, *.pyo) to .gitignore. |
Reviews (4): Last reviewed commit: "#158 - fix DAQIRI overlay close button f..." | Re-trigger Greptile
| function initArchitectureGraphic() { | ||
| var root = document.querySelector(".daqiri-landing"); | ||
| if (!root) return; | ||
| var openBtn = root.querySelector("[data-arch-open]"); | ||
| var overlay = document.getElementById("architecture-graphic-overlay"); | ||
| if (!openBtn || !overlay) return; | ||
| var closeBtn = overlay.querySelector(".graphic-overlay-close"); | ||
| var prevFocus = null; | ||
|
|
||
| function open() { | ||
| prevFocus = document.activeElement; | ||
| overlay.classList.add("is-open"); | ||
| overlay.setAttribute("aria-hidden", "false"); | ||
| document.body.classList.add("graphic-overlay-open"); | ||
| if (closeBtn) closeBtn.focus(); | ||
| } | ||
| function close() { | ||
| overlay.classList.remove("is-open"); | ||
| overlay.setAttribute("aria-hidden", "true"); | ||
| document.body.classList.remove("graphic-overlay-open"); | ||
| if (prevFocus && typeof prevFocus.focus === "function") prevFocus.focus(); | ||
| } | ||
|
|
||
| bindOnce(openBtn, "click", open); | ||
| overlay.querySelectorAll("[data-arch-close]").forEach(function (el) { | ||
| bindOnce(el, "click", close); | ||
| }); | ||
| } |
There was a problem hiding this comment.
Missing Escape-key handler for architecture overlay
initArchitectureGraphic wires click handlers for open/close but never registers a keydown listener for Escape. The module-level handler added by initLandingGraphic (lines 92–99) only operates on overlayState.overlay (the daqiri-graphic-overlay) and calls closeGraphicOverlay(), so pressing Escape while the architecture overlay is open does nothing. Users who open the architecture graphic and reach for Escape — the standard modal-close affordance — will find it silently ignored.
| document.addEventListener("keydown", function (e) { | ||
| if (e.key === "Escape" && overlay.style.display === "flex") { | ||
| overlay.style.display = "none"; | ||
| document.body.style.overflow = ""; | ||
| } | ||
| }); |
There was a problem hiding this comment.
Keydown listener accumulates on repeated page visits
The document.addEventListener("keydown", …) call on line 25 is not guarded against re-registration. With MkDocs Material instant navigation, document$.subscribe(initImageOverlays) triggers initImageOverlays on every navigation. Because the benchmarks page replaces the DOM entirely, dt-thumb is a fresh element each visit and the overlayBound guard at line 10 does not prevent a new keydown listener from being appended to document. The existing landing.js avoids this with a module-level keydownBound flag — applying the same pattern here would prevent the accumulation.
Fix greptile complaints
Signed-off-by: Chloe Crozier <chloecrozier@gmail.com>
chloecrozier
left a comment
There was a problem hiding this comment.
A minor bug fix I put in, was adding the second overlay broke focus on the hero graphic since querySelector was grabbing the overlay’s close button instead of the DAQIRI one
The docs and diagrams look good to me after locally checking!
|
@greptileai review |
Update DAQ and benchmark images to be of the same style, enlargeable, and with the same green border as other images. This also works well with light/dark themes. Removed news section from website; we can add it back in after release.