Skip to content

fix(website): keep sidebar scroll position across navigations#22

Merged
brnrdog merged 1 commit into
mainfrom
claude/sidebar-scroll-position-fgnqpe
Jul 25, 2026
Merged

fix(website): keep sidebar scroll position across navigations#22
brnrdog merged 1 commit into
mainfrom
claude/sidebar-scroll-position-fgnqpe

Conversation

@brnrdog

@brnrdog brnrdog commented Jul 25, 2026

Copy link
Copy Markdown
Owner

The docs rail was wrapped in View.Show, which rebuilds its children on every notification from the condition signal. The condition derives from the router location, and Computed.make re-notifies on every dependency change even when the computed value is unchanged, so navigating between spec pages tore down and re-created the whole sidebar DOM — and the freshly built

started back at scrollTop 0.

Mount the rail once and express "hidden on the landing page" as part of its existing reactive class instead, so navigation only updates the class attribute in place.

Claude-Session: https://claude.ai/code/session_01LwXbAeJqPcPHSvhRqcPmQA

The docs rail was wrapped in `View.Show`, which rebuilds its children on
every notification from the condition signal. The condition derives from
the router location, and `Computed.make` re-notifies on every dependency
change even when the computed value is unchanged, so navigating between
spec pages tore down and re-created the whole sidebar DOM — and the
freshly built <nav> started back at scrollTop 0.

Mount the rail once and express "hidden on the landing page" as part of
its existing reactive class instead, so navigation only updates the class
attribute in place.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LwXbAeJqPcPHSvhRqcPmQA
@brnrdog
brnrdog merged commit 9949fd6 into main Jul 25, 2026
1 check passed
@brnrdog
brnrdog deleted the claude/sidebar-scroll-position-fgnqpe branch July 25, 2026 22:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants