-
Notifications
You must be signed in to change notification settings - Fork 49.6k
[DevTools] Custom Scrubber Design #34627
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
f2b10b7
to
878da4f
Compare
.SuspenseScrubberBeadSelected:hover { | ||
height: 0.75rem; | ||
} | ||
|
||
.SuspenseScrubberBead:hover { | ||
height: 0.75rem; | ||
} No newline at end of file |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
878da4f
to
a219591
Compare
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
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.
scrubber.mov