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]>
This commit is contained in:
google-labs-jules[bot]andPR0M3TH3AN committed 2026-02-05 21:21:40 +00:00
1 parent 7acf8964af
commit ea301d1230
4 files changed
+26 -3

No files matched your search

+1
View File
@@ -26,6 +26,7 @@ const IGNORED_DIRS = new Set([
"logs",
"playwright-report",
"test-results",
"benchmarks",
]);
const DIST_SCAN_PREFIXES = new Set([