Repository navigation
fix: hide the margin card transcript's scrollbar while its turns fit as laid out - #6613
Conversation
An answer's arrival motion draws the transcript's turns below where they stand, which the browser counts as overflow. On a host whose scrollbars take room the native bar then showed for the motion's length, rewrapping an answer at a wrap boundary a line taller, so the card rose a line and dropped back. The bar now shows only where the gutter rule finds the turns overflow (data-lf-overflows), so the bar and its gutter make one decision. The transcript still scrolls. The test's emulated room-taking bar now applies where Leaf shows its bar, and the stream test samples every frame of the waiting answer's growth: the card's top moves only toward its rest. Closes #6611
|
@leaf-agent The reported failing and passing runs used different scrollbar emulation. Between ed33bcc and c9bdd45, the fixture narrowed its scrollbar reset to
|
…state The fixture that gives the transcript a room-taking bar unset Leaf's thin bar only on a transcript marked data-lf-overflows, so elsewhere Chromium fell back to the Mac runner's overlay bar and the test stopped emulating a bar that takes room. It now unsets the thin bar on every transcript, at a specificity just above that rule, so Leaf's own rule hiding a fitting transcript's bar still applies. Refs #6611
leaf-agent
left a comment
There was a problem hiding this comment.
The description's Test and Evidence sections still describe the fixture this head replaced, and the runs they cite used that fixture. The body says the emulated bar now applies only where [data-lf-overflows], but e6e8425 makes it apply to every transcript, using :not(a) to sit one type selector's weight above Leaf's thin bar and below the new :not([data-lf-overflows]) rule. The passing run 44785812189 used the narrowed fixture, which let the Mac's overlay bar stand in wherever the attribute was missing. So the 54-of-54 pass doesn't show that the production rule fixes anything. As the maintainer said, the evidence the fix needs is the same Mac run at this head with only scrollbar-width: none removed, failing, and then restored, passing. The "On Linux … pass" line can't stand in for that run. On Linux at this head the [accepted] and [pending] cases both still pass with the production rule deleted, 3 of 3 times, so Linux doesn't tell a fixed transcript from a broken one. Once the Mac run is in, rewrite those two sections to describe it.
|
Thanks — the emulation no longer depends on Same fixture, same focused case (
I've updated the description to match. |
On a host whose scrollbars take room, the native bar on the margin card's transcript no longer shows while an arriving answer's motion runs. Before this change, an answer at a wrap boundary rewrapped a line taller for the length of that motion, so the card rose a line and dropped back. The bar now shows only where the turns overflow as layout stands them, so the card's top moves only toward where it comes to rest.
Cause. The motion draws the transcript's turns below where they stand (
box-motion.js,streamContent), and the browser counts that drawn content as overflow. The transcript's gutter rule (thread-preview.js) already ignores that drawn overflow and decidesdata-lf-overflowsfrom where layout stands the turns. The nativeoverflow-y: autobar made a second decision from the drawn content, and those two decisions disagreed for the motion's length. The bar now follows the gutter rule: a transcript withoutdata-lf-overflowsgetsscrollbar-width: none. It still scrolls; it just draws no bar while its turns fit.Test.
test_sending_during_a_stream_keeps_later_tokens_from_moving_the_replynow samples every frame of the waiting answer's growth. It asserts that the card's top never rises past its rest and that the reply row stays still. Its emulated room-taking bar (TRANSCRIPT_BAR_TAKES_ROOM) previously forcedscrollbar-width: auto !importanton every transcript, which would have overridden the new rule. It now unsets Leaf's thin bar on every transcript, whatever its overflow state, at a specificity one type selector above that rule and without!important, so the production rule hiding a fitting transcript's bar still applies.Evidence. Both runs are on CI's Mac with the fixture at e6e8425 and
leaf-dev suite flake --copies 36 --workers 1 --load 4on the[pending]case, differing only in the production declaration:scrollbar-width: noneremoved (44795058690), 36 of 36 copies fail. The card reaches 125 px against its rest at 146 px, with content 286 px in a 252 px transcript and an 11 px bar.On Linux, with this fixture, both cases of the stream test and the two gutter tests (
test_a_card_that_scrolls_gives_its_scrollbar_room,test_a_card_that_fits_keeps_no_room_for_a_scrollbar) pass. On Linux the stream test passes without the production declaration too, so the Mac runs above are the evidence for the fix.The change only affects the card while it moves. At rest a fitting transcript drew no bar before and draws none now, so before-and-after stills would look the same.
Closes #6611 — automated triage