Fix: sidebar active state not updating while scrolling#148
Fix: sidebar active state not updating while scrolling#148sahillllllllll-bit wants to merge 2 commits intom-lab:mainfrom
Conversation
|
@robertodauria I’ve pushed a fix for the sidebar scroll active state - please review and let me know if any changes are needed. |
|
Thanks for the contribution. Closing this as it is superseded by #83, which rewrites the codebase removing Angular, jQuery, Gulp, and the old app/ directory structure. The files modified by this PR either no longer exist after that change or the change has already been made. We aim to merge #83 next week, which will give contributors a stable, modern base to work from. We'd encourage you to review #83 and open any future PRs on top of that. Additionally, this is likely a duplicate of #85. |
|
Thanks for the clarification @robertodauria . I’m also reviewing the changes in PR #83 and planning to open future contributions based on the new code structure once it's merged. |
This PR fixes an issue where the sidebar navigation active state was not updating correctly while scrolling between sections.
The original implementation relied solely on
Scrollex, which in some cases did not trigger consistently depending on browser behavior and layout rendering.Changes
scrollextrigger configuration (mode: top, improved viewport offsets)offset()for reliable section detectionactive-lockedlogic to avoid breaking click behaviorWhy This Fix Is Needed:
The previous implementation required a manual click before the active state updated correctly. This created inconsistent navigation highlighting and degraded UX.
The fallback ensures correct behavior across browsers and device
before
Screen.Recording.2026-02-20.150701.mp4
after
Screen.Recording.2026-02-20.150727.mp4