Skip to content

Drop the contents map's fixed track; every sidebar track sticks - #7486

Merged
max-sixty merged 1 commit into
mainfrom
toc-scroll-gap
Nov 28, 2026
Merged

max-sixty merged 1 commit into
mainfrom
toc-scroll-gap

Conversation

@max-sixty

Copy link
Copy Markdown
Owner

Removes the fixed positioning the Layout gave a narrow sidebar track (the contents map's spine) where the sidebar was the page's main with no header or footer, along with --lf-sidebar-spans-page and the four rules that read the page's header and footer to set it. Every sidebar track now sticks.

Since #7473 a page narrows its own sidebar for the spine, so the fixed track held still on none of the maintainer's 37 sidebar pages with a map; holding the open outline still too would stand it 40px above the page's first line on arrival. The maintainer chose to drop it.

What changes for a user: on a spine page with no header or footer, such as Leaf's site, the map opens level with the page's first line, rises 40px before it sticks, and moves with the rubber band in Firefox and Chrome, as outline pages already do. The decision is recorded in the layouts.css header.

Tests: the two browser tests of the fixed track's conditions go; the spine test now expects sticky. Focused track tests pass in Chromium and Firefox.

This was written by Claude Code on behalf of max-sixty

The Layout fixed a narrow sidebar track in the window where the sidebar was the page's `main` with no header or footer, so the contents map's spine held still through the rubber band, which moves a stuck sticky box with the page in Firefox and Chrome. Since #7473 a page narrows its own sidebar for the spine, and none of the maintainer's 37 sidebar pages with a map met every condition. Holding the open outline still too stood it 40px above the page's first line on arrival. The maintainer chose to drop the fixed track.

What a user sees differently: on a spine page with no header or footer, such as Leaf's site, the map opens level with the page's first line, rises 40px with the page before it sticks, and moves with the bounce at either end, as outline pages already do.

Removed: the fixed rule, `--lf-sidebar-spans-page` and the four rules that set it from the page's header and footer, and the two browser tests that held them (a header above the map keeps it below the header; an element an extension appends to `body` leaves the track fixed). The spine test now expects a sticky track.
@max-sixty
max-sixty merged commit 88cbe82 into main Nov 28, 2026
7 checks passed
@max-sixty
max-sixty deleted the toc-scroll-gap branch November 28, 2026 04:46
leaf-agent added a commit that referenced this pull request Nov 28, 2026
…stands still (#7507)

`test_the_lens_follows_the_scroll_in_every_engine` failed in Chromium,
Firefox and WebKit on the assertion that the map stands still in the
window (`AssertionError: [96, 56, 56]`). The lens itself followed the
scroll the whole time. That assertion passed. #7486 dropped the contents
map's fixed track, and its description says a spine page with no header
or footer now shows the map level with the page's first line, and the
map rises 40px before it sticks. The test's map positions match that
exactly: 96px at the top, then 56px once stuck. So the test's
expectation is stale, and the code is behaving as the maintainer chose.

The test now asserts that the map stands still once its track sticks,
from the middle of the document to its foot. The lens assertion is
unchanged. Run by node id with `--run-main -n0`: the test fails in all
three engines on `main` (`99fcb95a3`) and passes in all three with this
change. The neighbouring sticking-track and spine tests also pass.

Closes #7501 — automated triage

Co-authored-by: leaf-agent <[email protected]>
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