Repository navigation
fix: show the contents spine's labels at once when Go-to arms, so they get Go-to hints - #7382
Merged
Merged
Conversation
Go-to reads which controls show once the frame arming paints is drawn, and since #7332 a transparent control gets no chip. The spine's labels faded in over 0.24s from opacity 0, and that fade still stood at exactly 0 when the map was read, so the spine's links got no Go-to hints. Armed, the labels now show without a transition; hover still fades them in, and they still fade out as Go-to ends. Behavior changed: pressing g snaps the contents labels in rather than fading them. test_generated_hints_include_links_revealed_by_a_page_widget fails before this change and passes after it. Closes #7379
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.
Go-to gives no hints to the contents spine's links, and
test_generated_hints_include_links_revealed_by_a_page_widgethas failed on everymainrun since #7332. This change makes the spine show its labels at once while Go-to is armed, rather than fading them in, so they are visible when Go-to reads its map and get their chips again.Cause. #7332 meant every visible control to get a hint and a transparent one none, so it judges a control with
checkVisibility({opacityProperty: true}). Go-to reads that map once the frame arming paints has been drawn (two frames). The spine's labels rest atopacity: 0and fade to 1 over0.24swhenbody[data-lf-go-to-active]is set. I sampled the label layer every frame afterg: its computed opacity was still exactly0at 27 ms and 43 ms, when the map is read, and only started rising (0.11) in the frame after. So every label was judged unseen. Nothing reads the map again once the fade ends, so the chips never appeared, even after the test's 120 s wait.Change. In
packages/default/styles/toc.css, the Go-to reveal setstransition: none. Hover and keyboard focus still fade the labels in, and when Go-to ends they still fade out, since that transition comes from the resting rule. On screen, the only difference is that pressinggshows the labels at once instead of fading them in over 0.24 s. Every state still looks as it did before.Verification. Run alone (
uv run pytest -n0 <node-id>), the test fails onmainwith 0 of 4 chips and passes with this change. The spine's disclosure tests and the test for the contents row's marks still pass.Alternative not taken. Go-to could instead treat a control whose opacity is transitioning upward as visible, as it already waits for panel motions held in their delay (
heldUnseen,dom/motion.js). That would cover any package's reveal. But no other package's styles reveal anything underdata-lf-go-to-active, and it would add a second motion rule to the core's map timing. So the fix stays in the package that owns the fade.Closes #7379 — automated triage