Repository navigation
Frame pager: one width for the name, so ‹ › stay put; h k / l j step frames - #101
Merged
Merged
Conversation
…can say, so ‹ and › stay put; h or k steps to the frame before, l or j to the next Each of the pager's two cells lays a hidden twin under its text (aria-hidden), holding every name it can say (All N frames and each frame's name) or the longest place (N of N), so the cell is as wide as the widest and the name sits centred in it. The name stops at 24ch with an ellipsis and its title holds it whole. The place and its twin use tabular figures, so 10 of 13 is as wide as 13 of 13. h or k steps to the frame before and l or j to the next, from anywhere on the page but a field (input, textarea, select, contenteditable, a textbox), a menu (open or focused), the Prototype bar or Spacesheep's own UI, and never with a modifier held or after a frame's own handler took the key. The listener is on the document, bubbling, behind its own flag. The arrows' titles name the keys, and aria-keyshortcuts says them. Measured in Chromium on a 13-frame page: › at one x across all 13 frames at 1440 (340 px) and 390 (350 px), after document.fonts.ready and after resizing 1440 to 390 and back; before, it took 13 positions from 250 to 329 px at 1440. Co-authored-by: Pointman <noreply@pointman.ai> Co-authored-by: Claude <noreply@anthropic.com>
…en frame doesn't Co-authored-by: Pointman <noreply@pointman.ai> Co-authored-by: Claude <noreply@anthropic.com>
jamescalam
force-pushed
the
skill-462-fixed-pager
branch
from
December 4, 2026 09:45
547cf5a to
a7a869d
Compare
Merged
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.
The frame pager (
‹ name · n of N ▾ ›) changed width with every frame name, so›moved under the pointer while stepping through frames. This keeps the middle at one width and adds letter keys for stepping.What changed (
base.html, and the same lines instarter.html).pager-cellgrid with a hidden twin (.pager-fit,aria-hidden) laid over them. The name's twin holds every name the pager can say (All N framesand each frame's label); the place's holdsN of N. The cell takes the widest, and the name is centred in it.24ch; a longer name ends in…, and.pager-now'stitleholds it whole..pager-ofand its twin usetabular-nums, so10 of 13is as wide as13 of 13. Without the twin's figures, frames 10 to 13 were 3.4 px wider.horksteps to the frame before,lorjto the next. They're skipped in an input, textarea, select, contenteditable or textbox, in a menu (focused or open), in the Prototype bar (.tweaks) and Spacesheep's UI ([data-ss-ui]), with any modifier held, or when a frame's own handler already took the key (defaultPrevented). The listener is on the document in the bubble phase, behindssPagerHops. The arrows' titles name the keys, and they carryaria-keyshortcuts.Measured in Chromium (13-frame page, Spacesheep's canvas stood in for)
›x before (v1.2.62)›x afterdocument.fonts.readyl l j k hwith focus on the page stepped as expected. With focus in an<input>,lwas typed and the frame stayed.The overview's
All 13 frameskeeps the same width too.‹and›still move once when the first frame opens, because Back appears to the pager's left; that was already the case before this change.Tests
check.test.js: the twins' content andaria-hidden, the CSS rules, the name's title, the arrows' titles, and the keys. It also checks the keys are skipped in input, textarea and select, in the Prototype bar, with each modifier, afterdefaultPrevented, and with the menu open. Removing the field guard fails it ("typing in a input").keydown.a folder from before run records…anda page made before groups gains…) pass when run alone: one timed out under load, the other saw a stray process in the listing.