Repository navigation
Reuse classified direction when Reach paints scroll cues - #3721
Conversation
leaf-agent
left a comment
There was a problem hiding this comment.
The continuation cue remains visible after a declared scroller stops allowing horizontal scrolling. paintSidewaysReach now uses only the cached classification and the box widths; when overflow-x changes from auto to hidden through an inline style, the box can still have scrollWidth > clientWidth, so a child resize repaints a false data-lf-more-after. A base/candidate browser probe confirmed the base clears that cue and this head leaves it visible. The style change needs to invalidate the classification before the next paint while keeping the page-wide repaint free of per-card style reads.
leaf-agent
left a comment
There was a problem hiding this comment.
A parent can change a declared scroller's computed overflow and direction without changing the scroller's own class or style. The new watcher then leaves sideways cached: after the next layout paint, a box with overflow-x: hidden still shows data-lf-more-after, and a box inheriting rtl still carries the ltr direction mark. A base/candidate browser probe confirmed both transitions. Reclassify when an ancestor changes the styles these cues depend on, while keeping the ordinary page-wide paint free of per-card style reads.
leaf-agent
left a comment
There was a problem hiding this comment.
The test check fails in pnpm run check:browser: the committed kernel still contains the pre-format version of browser/runtime/reach.js, so the generated bundle and kernel.json are stale. I’m rebuilding those outputs and will push the repair.
94be96e to
680e6d6
Compare
Reach now reuses the computed direction it already reads while classifying each declared scroll surface. Its page-wide continuation repaint previously called
getComputedStyleagain for every sideways scroller after a drawing stroke, including all 40 unrelated cards in the regression page. A scroller's own scroll event still refreshes its direction, and layout classification refreshes it after layout changes.test_releasing_a_drawing_does_not_read_every_card_before_previewfails on the reported main CI run and passes locally after the change. The sideways continuation test also passes, including its right-to-left transition. Verification:pnpm run check,pnpm run test:runtime, and both focused browser tests. The compiled kernel is rebuilt. Refs #2775 and #3695; other failures in this run remain separate.