Skip to content

Conversation

sebmarkbage
Copy link
Collaborator

Stacked on #34620.

This will let us use different color for different segments of the timeline.

Since we're modeling discrete steps (sometimes just a couple), a scrubber with a handle that you have to move is quite annoying and misleading. Doesn't show you how many steps there are. Therefore I went with a design that highlights each segment as its own step and you can click to jump to a step.

This is still backed by an input range for accessibility and keyboard controls.

Screenshot 2025-09-27 at 4 50 21 PM Screenshot 2025-09-27 at 4 50 45 PM
scrubber.mov

@sebmarkbage sebmarkbage requested a review from eps1lon September 27, 2025 20:56
@meta-cla meta-cla bot added the CLA Signed label Sep 27, 2025
@github-actions github-actions bot added the React Core Team Opened by a member of the React Core Team label Sep 27, 2025
Comment on lines 54 to 60
.SuspenseScrubberBeadSelected:hover {
height: 0.75rem;
}

.SuspenseScrubberBead:hover {
height: 0.75rem;
} No newline at end of file
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These should shrink when you hover over the parent. Otherwise you get a jitter when you just barely hover over the outer rim that then retracts due to hover which means it's no longer hovered. That loop goes on forever

CleanShot.2025-09-28.at.20.30.51.mp4

The larger the default font size, the more likely you get this scenario.

It felt actually counter-intuitive that it shrinks on hover. I expected expansion on hover

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm. We should make the line-height fixed there. I'll make it fixed height. I can also make it overflow hidden because the idea is that it should not pop out of the container that's the hit target. The hit target should be the outer box, not the thing animating. In fact, with a view transition it wouldn't even be a hit target.

It starts moving in the direction that it would if you clicked it. It gives a nice squeezing effect when it's in the middle so when you cut it off it cuts off the "flow" there.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh it was because the :hover was on the bead. It should be on the step like the listeners are.

@sebmarkbage sebmarkbage merged commit dce1f6c into facebook:main Sep 29, 2025
241 checks passed
EugeneChoi4 pushed a commit to EugeneChoi4/react that referenced this pull request Sep 29, 2025
Stacked on facebook#34620.

This will let us use different color for different segments of the
timeline.

Since we're modeling discrete steps (sometimes just a couple), a
scrubber with a handle that you have to move is quite annoying and
misleading. Doesn't show you how many steps there are. Therefore I went
with a design that highlights each segment as its own step and you can
click to jump to a step.

This is still backed by an input range for accessibility and keyboard
controls.

<img width="1213" height="434" alt="Screenshot 2025-09-27 at 4 50 21 PM"
src="https://github.com/user-attachments/assets/2c81753d-1b66-4434-8b1d-0a163fa22ab3"
/>
<img width="1213" height="430" alt="Screenshot 2025-09-27 at 4 50 45 PM"
src="https://github.com/user-attachments/assets/07983978-a8f6-46ed-8c51-6ec96487af66"
/>


https://github.com/user-attachments/assets/bc725f01-f0b5-40a8-bbb5-24cc4e84e86d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed React Core Team Opened by a member of the React Core Team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants