Repository navigation
Keep a long side list beside the item it opens, so a walk down it never scrolls the item away - #6057
Merged
Merged
Conversation
…er scrolls the item away A side list (`lf-tabs list="side"`) given no height to fill ran its column with the page. On Max's 30-document page (the #4781 repro) the column was taller than the window. A walk down it scrolled the page to each tab and carried the open item's start off screen. A tab the user then read away from was left off screen, so the next arrow let go of it (keyboard/controller.js) and focus fell to the page. #6034 scrolled the walked tab into the window, which fixed the first drop at tab 25 but not these. The column's list now sticks in the window beside the item and scrolls on its own (packages/default/styles/tabs.css). It sticks one landing room below the sticky-header slot and ends one landing room above the floating panel's row. That is the band the root lands things in, as a column's sidebar sticks, so landing a tab in the list moves no page. A list shorter than that band keeps its height; a longer one scrolls inside it. The column's tint and rule move from the list to the set's `::before`, which spans the set's height, so the column reads as one from the frame's top to its foot while the list over it sticks. A wheel at either end of the list goes on to scroll the page. A full-height workspace's list and the row a narrow window stacks the list into are unchanged. lf-tabs.js follows the layout: - The list is a reading region whenever the theme says it holds its own height (`--lf-holds-height`), not only in a full-height workspace. - A switch made while the list sticks opens the new item at its start, as a boxed set's switch does once its strip sticks. Read down one item, press ArrowDown, and the next opens at its top. - The tablist's `aria-orientation` follows the way its names run. A side list narrowed to a row was still marked vertical. Evidence: `leaf-dev probe PAGE --viewport 1440x900 --journey WALK --base`, in Chromium and Firefox, which agree. PAGE is a column page whose body is a side list of 30 documents. LONG gives each item prose above its document, so the item is taller than the window. MAX holds only the document, as #4781's page did. WALK presses ArrowDown from the first tab to the last and ArrowUp back, then reads an item in three ways and presses ArrowDown. | | base | head | | --- | --- | --- | | open item's top at tab 25, LONG / MAX | −636 / −146 px | 22 / 22 px | | open item's top at the last tab, LONG / MAX | −856 / −291 px | 20 / 20 px | | page scroll through the walk down, LONG | 0 → 1,029 px | 0 → 151 px, then still | | focus lost on the walk down and back up | never | never | | tab 25, read back up to its item's top, ArrowDown | focus to the page | tab 26 opens | | LONG item 10 read 900 px down, ArrowDown | focus to the page | tab 11 opens at its top | | item 0 read to its end, ArrowDown | focus to the page | tab 1 opens at its top | Still open on both: scrolled past the frame's end, so what follows the set shows below it, the list leaves with the frame like any sticky box, a tab near its top goes off screen, and the next arrow lets go of it. alert-review's workspace queue (stills `side-tab-focus`, `alert-queue-tally`) draws the same pixels as on main. `test_a_side_list_longer_than_the_window_keeps_its_tab_and_open_item_in_view` replaces #6034's walk test. It also holds the open item's start in the window through the walk, and reads down an item before the next arrow; it fails on main in both engines. `test_a_tab_strip_keeps_its_open_tab_in_its_one_row` checks the orientation either side of the narrowing, and the history test drops the page CSS that made its list stick, which the theme now does.
# Conflicts: # packages/default/styles/tabs.css
… stuck to its item's end Review of the sticky side list found two ways it misled the reader. - A walk down a stuck list left the focused tab at the list's foot, over the floating panel's empty tinted room, so the list looked ended there while later tabs were hidden. The list now keeps a tab's room below a tab it lands (`scroll-padding-block-end`), so the next row shows under the open one. That room is `--lf-tab-row-h`, the height a tab in the narrow row already reserved before upgrade, now named once for both uses. - A list shorter than the window stretched to the window's height, so it left the top of the window that height before its item ended. The list now stands at the top of its cell (`align-self: start`) and sticks until the item ends. The set's `::before` still paints the column's tint and rule the full height. The `::before` keeps `grid-row: 1 / -1`: a full-height workspace's grid has two rows, and in the first alone the ground drew nothing there (stills `side-tab-focus`: 836,560 px differ with it removed, none with it kept). The walk test now holds 30 tabs, as #4781's page did, so its first check (the last tab starts out of view) holds on main too and the walk is what fails there. It also checks that the row after each tab walked down to shows.
…row shows under one walked down to The room a stuck side list kept around a tab it lands stood only at the list's foot. A walk up the list landed each tab at its top edge with no row above it, so the list looked as though it started there. The list now keeps a tab's room (`--lf-tab-row-h`) at both edges (`scroll-padding-block`). Walking down to the last tab and back up to tab 15 on the 30-document page at 1440×900, Chromium and Firefox agree: with room only at the foot (7a1c771), tab 15 lands 10 px below the list's top and tab 14 is hidden above it; now tab 15 lands at 76 px and tab 14 shows whole above it. Walking up onto the first tab of a group still brings the group's heading in with it, and the last tab of the previous group shows above that heading. The walk test now also walks up through the middle of the list (tab 29 to tab 10), checking at each step that the row it heads for shows. It also reads a four-tab list's item to near its end and checks that the list still stands beside it. With room only at the foot, the test fails at the upward check (tab 19 at a viewport ratio of 0.91); without `align-self: start`, it fails at the short list (ratio 0).
max-sixty
marked this pull request as ready for review
November 15, 2026 23:24
leaf-agent
approved these changes
Nov 15, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Max chose this look on 2026-11-15 ("Keep the list beside the item"), from before/after stills at 1440×900 and phone width. What changes on screen:
aria-orientation.A side list (
lf-tabs list="side") given no height to fill ran its column with the page. On Max's 30-document page (the #4781 repro) the column was taller than the window. A walk down it scrolled the page to each tab and carried the open item's start off screen. A tab the user then read away from was left off screen, so the next arrow let go of it (keyboard/controller.js) and focus fell to the page. #6034 scrolled the walked tab into the window, which fixed the first drop at tab 25 but not these.The column's list now sticks in the window beside the item and scrolls on its own (packages/default/styles/tabs.css). It sticks one landing room below the sticky-header slot and ends one landing room above the floating panel's row. That is the band the root lands things in, as a column's sidebar sticks, so landing a tab in the list moves no page. The list is as tall as its rows up to that band and scrolls inside it beyond that. It stands at the top of its cell, so a short list sticks until its item ends. It keeps a tab's room (
--lf-tab-row-h, the height a tab in the narrow row already reserved) above and below a tab it lands, so the rows either side of the open one show and the list doesn't look as though it starts or ends there. The column's tint and rule move from the list to the set's::before, which spans every row of the set, so the column reads as one from the frame's top to its foot while the list over it sticks. A wheel at either end of the list goes on to scroll the page. A full-height workspace's list and the row a narrow window stacks the list into are unchanged.lf-tabs.js follows the layout:
--lf-holds-height), not only in a full-height workspace.aria-orientationfollows the way its names run. A side list narrowed to a row was still marked vertical.Evidence
leaf-dev probe PAGE --viewport 1440x900 --journey WALK --base, in Chromium and Firefox, which agree. PAGE is a column page whose body is a side list of 30 documents. LONG gives each item prose above its document, so the item is taller than the window. MAX holds only the document, as #4781's page did. WALK presses ArrowDown from the first tab to the last and ArrowUp back, then reads an item in three ways and presses ArrowDown.alert-review's workspace queue (stills
side-tab-focus,alert-queue-tally) draws the same pixels as on main. The::beforekeepsgrid-row: 1 / -1: a full-height workspace's grid has two rows, and with the ground in the first alone that queue lost its column's tint (836,560 px differ).Still open, on base and head alike
Each of these leaves focus on a tab that is off screen, and the next arrow lets go of it:
Extending
focusPlace(user-place.js) so that a tab scrolled out of a side list that is itself still on screen keeps focus would fix the last two. That amends the let-go rule Max chose on 2026-11-04, so it is his call; this PR doesn't build it.Tests
test_a_side_list_longer_than_the_window_keeps_its_tab_and_open_item_in_viewreplaces #6034's walk test. It walks 30 tabs, as #4781's page held: down every tab and round, then back up through the middle of the list. At each step it holds the open item's start in the window and the row the walk heads for in view. Then it reads down an item before the next arrow, and reads a four-tab list's item to near its end with the list still beside it. On main it fails at the walk's first item-start check in both engines. With the room at the list's foot only, it fails walking up (tab 19 at a viewport ratio of 0.91); withoutalign-self: start, at the four-tab list.test_a_tab_strip_keeps_its_open_tab_in_its_one_rowchecks the orientation either side of the narrowing, and the history test drops the page CSS that made its list stick, which the theme now does.Ran 69 tests by node id (every test building a side list, a page's parts or alert-review's queue, and all of
test_tabs.py): all pass.pnpm run check:browser, pre-commit. Not verified: WebKit, dark scheme, touch at tablet width.