Commit Graph
10 Commits
Author SHA1 Message Date
google-labs-jules[bot]andPR0M3TH3AN ea301d1230 Refactor Docs ScrollSpy to use IntersectionObserver and fix dist/src mismatch
Replaces legacy scroll listener with `IntersectionObserver` to eliminate layout thrashing.
- Updates `js/docsView.js` with `rootMargin: "-96px 0px -50% 0px"` and correct scroll-up logic.
- Synchronizes `dist/js/docsView.js` to match the source logic exactly.
- Updates benchmarks to use the same logic for verification.
- Updates lint scripts to exclude benchmarks.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-05 21:21:40 +00:00
google-labs-jules[bot]andPR0M3TH3AN 55a9b937cb Refactor Docs ScrollSpy to use IntersectionObserver
Replaces the scroll event listener and `getBoundingClientRect` polling with `IntersectionObserver` to eliminate layout thrashing and improve scrolling performance.

- Removes `window.onscroll` handler in `docsView.js`.
- Implements `IntersectionObserver` with `rootMargin` to track active headings.
- Retains initial one-time scan for correct state on load.
- Adds benchmark `benchmarks/docs_scroll_spy.html` and `benchmarks/docs_scroll_spy_bench.js`.

Benchmark results:
- Legacy: ~0.065ms/call (200 calls) -> Total ~13ms CPU (sync layout thrashing)
- Optimized: ~0.028ms/call (32 calls) -> Total ~0.9ms CPU
- 14x improvement in CPU time for scroll handler logic.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-05 20:52:52 +00:00
google-labs-jules[bot]andPR0M3TH3AN e6e3b47fce Modernize docs navigation buttons with icons
- Replaced text-based "Show/Hide" sidebar toggles with SVG chevron icons.
- Added a hamburger menu icon to the "Contents" button on mobile view.
- Updated `js/docsView.js` to handle icon toggling and properly hide flex container elements using the `.hidden` class.
- Improved accessibility by maintaining `aria-expanded` attributes.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-01-27 19:43:24 +00:00
google-labs-jules[bot]andPR0M3TH3AN d490fa1295 Fix incorrect markdown file paths in documentation views
- Updated `fetch` paths in legacy views (getting-started, upload-content, about, roadmap, community-guidelines, links) to point to the correct locations in `content/docs/`.
- Added debug logging to `js/docsView.js` to assist in diagnosing "Loading content..." hangs in the new documentation system.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-01-27 15:07:16 +00:00
google-labs-jules[bot]andPR0M3TH3AN a2efdc6d75 fix(docs): restructure content directory and fix TOC highlighting
Moves markdown files to `content/docs/` to match the TOC structure and ensures the correct `aria-current` attribute is used for the active TOC link.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-01-27 14:51:23 +00:00
thePR0M3TH3AN 8c8f721387 Add scrollspy highlighting for docs TOC 2026-01-27 09:16:07 -05:00
thePR0M3TH3AN 1737e6927f Update docs hash handling 2026-01-27 09:08:32 -05:00
thePR0M3TH3AN 3a4e0aa3e8 Add docs TOC drawer overlay 2026-01-27 08:47:27 -05:00
thePR0M3TH3AN 2a5fbb3904 Register docs view initializer 2026-01-27 08:36:12 -05:00
thePR0M3TH3AN 41f252379b Add docs view loader and TOC 2026-01-27 08:11:55 -05:00