Files
AFFiNE/packages
DarkSky 207e250fdc feat(desktop): track the active heading in the outline rail
Each Page pane now marks its own active heading, as the Web 0.27.5
outline viewer does. The editor uses the layout and the scroll offset
of its own viewport. It selects the last laid-out heading whose center
is above the viewport center plus the heading height.

A click on an outline entry keeps that entry active until the page
scrolls again. A click on the title scrolls the page to the top.

The rail shows only on pages with at least one heading. A page with a
title lists the title first.

Inactive ticks are 20 x 2 px in black-10.
The active tick is 24 x 2 px in the primary text color. Ticks keep a
16 px pitch while they fit, then shrink to 2 px, and the rail clips the
rest.

Entries use weight 600, and the active entry uses the emphasis text
color. When the panel opens, the list centers the active entry. While
the panel stays open, only the wheel scrolls the list.

Tests: cargo test, cargo clippy, cargo fmt, check-invariants.sh,
check-l0-tier-a.mjs.
2026-12-03 16:15:42 +09:00
..