Mockup: iOS-style sticky note header with back and the current heading (#285) #300

Closed
kayg wants to merge 0 commits from issue/285-sticky-header into dev
Owner

Closes #285 (mockup round).

What changes (mockup only, the production editor is untouched)

  • The solid "‹ All notes" band is gone. Notes get a sticky header over the bottom bar's see-through glass (--glass-float, --glass-float-filter). On a phone it has a back chevron on the left, and the line in the middle shows where you are.
  • The line shows the last heading that has scrolled up under the header (H2, H3 or H4, the deepest wins). Once the big title has gone under, it shows the title. At the very top the header is only the chevron on clear air, and the glass fades in as the title slides under it (iOS large-title collapse).
  • When you move between sections, the line turns over in place with a short spring: it rises on the way down and drops on the way up. Jumps over more than one heading, key presses and reduced motion swap the line at once.
  • A long heading ends in an ellipsis on one line. Tapping the line goes to that heading.
  • On tablet and desktop the same header sits at the top of the editor pane, over the visible part of the page, and follows the Focus edge. There's no back button there, because the list is already beside the note.

How it's built

  • lib/noteheader/sources.ts is a tiny header-source registry, so other modes can supply their own line later. lib/noteheader/headings.ts is the heading tracker: one IntersectionObserver against the header's bottom edge, with the observed area running down without end. That way "not intersecting" means "above the line", and a jump straight to the end still flips every heading it skipped. Nothing reads layout while you scroll. NoteHeader.svelte draws it.
  • The header sits beside the page, never inside it. Inside, the page's own blur would make it the header's backdrop root.
  • The phone's note screen drops its own backdrop-filter. Its paper was solid anyway, and the filter made it the header's backdrop root. In the app at 1x I saw no visible difference from this change (before and after are on the issue), so it's a safeguard, not a fix. The first commit message overstates it.
  • The page keeps room at the top and a scroll-padding-top, so jumps stop below the header.
  • Mockup only: the Mockup pill moves to the top right on phones, clear of the line. H4 is added to the mockup's markdown. Autumn trip gets H2/H3/H4 sections, and data=huge gets "A long read" (722 blocks) for the scroll test.

Evidence is on #285: frame strips, screenshots, timings. In short: screenshots (320/360/375/390/900/1440, light and dark, sky and photo backdrop, Chromium and WebKit), frame strips and scroll timings.

Preview: https://preview.calternal.cloud/sticky-header.html#/note/autumn-trip?list=all (deployed as a side page, so it doesn't replace anyone's index.html)

🤖 Generated with Claude Code

https://claude.ai/code/session_018Yyy8fQGxPLkLa8v8NXz7T

Closes #285 (mockup round). **What changes (mockup only, the production editor is untouched)** - The solid "‹ All notes" band is gone. Notes get a sticky header over the bottom bar's see-through glass (`--glass-float`, `--glass-float-filter`). On a phone it has a back chevron on the left, and the line in the middle shows where you are. - The line shows the last heading that has scrolled up under the header (H2, H3 or H4, the deepest wins). Once the big title has gone under, it shows the title. At the very top the header is only the chevron on clear air, and the glass fades in as the title slides under it (iOS large-title collapse). - When you move between sections, the line turns over in place with a short spring: it rises on the way down and drops on the way up. Jumps over more than one heading, key presses and reduced motion swap the line at once. - A long heading ends in an ellipsis on one line. Tapping the line goes to that heading. - On tablet and desktop the same header sits at the top of the editor pane, over the visible part of the page, and follows the Focus edge. There's no back button there, because the list is already beside the note. **How it's built** - `lib/noteheader/sources.ts` is a tiny header-source registry, so other modes can supply their own line later. `lib/noteheader/headings.ts` is the heading tracker: one IntersectionObserver against the header's bottom edge, with the observed area running down without end. That way "not intersecting" means "above the line", and a jump straight to the end still flips every heading it skipped. Nothing reads layout while you scroll. `NoteHeader.svelte` draws it. - The header sits beside the page, never inside it. Inside, the page's own blur would make it the header's backdrop root. - The phone's note screen drops its own `backdrop-filter`. Its paper was solid anyway, and the filter made it the header's backdrop root. In the app at 1x I saw no visible difference from this change (before and after are on the issue), so it's a safeguard, not a fix. The first commit message overstates it. - The page keeps room at the top and a `scroll-padding-top`, so jumps stop below the header. - Mockup only: the Mockup pill moves to the top right on phones, clear of the line. H4 is added to the mockup's markdown. Autumn trip gets H2/H3/H4 sections, and `data=huge` gets "A long read" (722 blocks) for the scroll test. **Evidence** is on #285: [frame strips](https://git.kayg.org/kayg/calternal/issues/285#issuecomment-48283), [screenshots](https://git.kayg.org/kayg/calternal/issues/285#issuecomment-48285), [timings](https://git.kayg.org/kayg/calternal/issues/285#issuecomment-48287). In short: screenshots (320/360/375/390/900/1440, light and dark, sky and photo backdrop, Chromium and WebKit), frame strips and scroll timings. Preview: https://preview.calternal.cloud/sticky-header.html#/note/autumn-trip?list=all (deployed as a side page, so it doesn't replace anyone's index.html) 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_018Yyy8fQGxPLkLa8v8NXz7T
The solid "‹ All notes" band is gone. A note now has a sticky header over the
bottom bar's see-through glass: a back chevron on the left (phone) and, in the
middle, the last heading that has scrolled up under it (H2, H3 or H4, the
deepest wins), or the note's title once the big title has gone under. At the
very top it is only the chevron on clear air; the glass fades in as the title
slides under (iOS large-title collapse). Section changes turn the line over in
place with a short spring, rising on the way down and dropping on the way up;
jumps, key presses and reduced motion swap at once. A long heading ends in an
ellipsis; tapping the line goes to that heading.

- lib/noteheader: a tiny header-source plugin registry plus the heading
  tracker (one IntersectionObserver against the header's bottom edge, no
  layout reads while scrolling).
- The note runs under the header; the page keeps room at the top and a
  scroll padding so jumps stop below it.
- The phone's note screen drops its own backdrop-filter: it was the header's
  backdrop root and kept the glass from blurring the note under it.
- Mockup pill moves to the top right on phones, clear of the header line.
- Markdown H4 in the mockup; Autumn trip gets H2/H3/H4 sections, and the
  huge data set gets a long note for the scroll test.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018Yyy8fQGxPLkLa8v8NXz7T
mockup: story links for the sticky header (#285)
Some checks failed
CI / server (pull_request) Successful in 24s
CI / web (pull_request) Failing after 24s
CI / rust (pull_request) Successful in 1m44s
6d155613c7
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018Yyy8fQGxPLkLa8v8NXz7T
Author
Owner

Replaced by #326 (round 2: floating glass pills instead of the band, after kayg's feedback).

Replaced by #326 (round 2: floating glass pills instead of the band, after kayg's feedback).
kayg closed this pull request 2026-10-14 17:20:28 +00:00
Author
Owner

Landed in merge train #329.

Landed in merge train #329.
Some checks failed
CI / server (pull_request) Successful in 24s
CI / web (pull_request) Failing after 24s
CI / rust (pull_request) Successful in 1m44s

Pull request closed

Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
kayg/calternal!300
No description provided.