Repository navigation
Give packages the runtime's arrow, fragment, press and write helpers - #2425
Merged
Merged
Conversation
Package widgets wrote their own copies of four runtime behaviors and missed cases. The helper surface now carries each, and every copy moves onto it: - rowArrows(node) (keyboard/bindings.js) returns the [back, ahead] arrows in the row's text direction. lf-tabs, lf-trace, lf-board, the reaction and response rows, margin entries and DISCLOSE use it. In right-to-left text the trace timeline's arrows now step the way its rail runs, a board card moves toward the column its arrow points at, and a disclosure opens with ←. - lf-trace threw in right-to-left text: Vis names its background plane vis-vertical-rtl there, which the cursor-plane query missed. - fragmentTarget(hash) is exported. lf-tabs reads Back/Forward fragments with it, so an id inside a shadow tree or a malformed escape opens the panel the landing goes to; lf-activity links only destinations Leaf's arrival can reach, and names a section by elementById as Threads does. - plainPress(event) (pointer.js) is the primary-button, no-modifier test that media, held-word, lf-shot and lf-call-diff each spelled out. - Initial producers receive keeps in their kit; activity's and the playground's producers use it, as do presentation, banner, css-anchors and the aria-keyshortcuts painter. The playground's copy button stays a native button the initial producer draws, and now announces its result through the page's live region, as wa-copy-button does. Per-tab memory stays per widget: an x-views member, activity's reading snapshot and a settled group's open bit are different facts in tabStore. Tests: a right-to-left trace steps with ← to a later point that lies to the left; a playground copy is announced on success and failure. Both fail without their fix. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
leaf-agent
approved these changes
Oct 11, 2026
max-sixty
added a commit
that referenced
this pull request
Oct 11, 2026
Main (#2425) taught the Vis rail to run right to left in RTL text and its arrows to follow it. The new time scale instead runs left to right in every text direction, as a chart's time axis does (`direction: ltr` on the timeline), and its step keys, plain and Shift, read their arrows from the scale with `rowArrows`, so they follow it if that changes. The RTL test now protects that: recording zero stands at the left in an RTL page, and → steps later. It fails without the pin. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
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.
Package widgets wrote their own copies of four runtime behaviors and missed cases (workstream #13 of the duplicate-logic sweep). The helper surface,
widget-api.js, now carries each one, and every copy moves onto it.rowArrows(node)(keyboard/bindings.js) returns the[back, ahead]arrows in the row's text direction. lf-tabs, lf-trace, lf-board, the reaction and response rows, margin entries andDISCLOSEuse it. In right-to-left text the trace timeline's arrows now step the way its rail runs, a board card moves toward the column its arrow points at, and a disclosure opens with ←. No binding moves between core and widget scopes: every site already declared both arrows, and only which one means "back" changes.vis-vertical-rtlthere, which the cursor-plane query missed.fragmentTarget(hash)is exported. lf-tabs reads Back/Forward fragments with it, so an id inside a shadow tree or a malformed escape opens the panel the landing goes to. lf-activity links only destinations Leaf's arrival can reach, and names a section withelementById, as Threads does.plainPress(event)(pointer.js) is the primary-button, no-modifier test that media, held-word, lf-shot and lf-call-diff each spelled out.keepsis now in the initial producers' kit (prepaint.js, documented inpackages.md). The activity and playground producers use it, as do presentation, banner, css-anchors and thearia-keyshortcutspainter.The playground's copy button stays a native button, because its initial producer draws it before modules load. It now announces its result through the page's live region, as
wa-copy-buttondoes. Per-tab memory stays per widget: anx-viewsmember, the activity view's saved reading and a settled group's open bit are different facts intabStore.Tests: a right-to-left trace steps with ← to a later point that lies to the left, and a playground copy is announced on success and on failure. Both fail without their fix.