-
Notifications
You must be signed in to change notification settings - Fork 7.5k
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
fix: stop the vertical volume slider from showing up after mouse hover #5505
Conversation
…ring on it Hovering over vertical volume slider when it has opacity: 0 (i.e. when it is hidden) triggers the volume slider to transition to opacity: 1 (i.e. shown), which is undesirable - it seems like there is a "ghost" element. This change adds transform: scale(0) translate(0, 100%) property to the vertical volume control default state CSS rule, and transform: scale(1) translate(0, 0) to its :hover state. These changes only affect the behavior of the vertical volume control - the horizontal volume control remains unchanged. Furthermore, scale and translate values have been chosen to make the :hover animation feel similar to the progress bar time tooltip :hover animation. transform 0.1s has been added to the corresponding $transition-property variables. Have added !important with the scale(1) translate(0, 0) transform to make this work. Not sure if this could be avoided by reordering some of the SCSS? Fixes #5502.
💖 Thanks for opening this pull request! 💖 Things that will help get your PR across the finish line:
We get a lot of pull requests on this repo, so please be patient and we will get back to you as soon as we can. |
I think this is a UI improvement, and it appears to work across the board. However, it current breaks the way that "tabbing" between controls works. You can no longer tab to the |
@brandonocasey Thanks for your feedback! I can't recreate the tabbing problems you are describing. I have tested on my codepen example that has my improvements and I am able to tab back and forth between all the UI controls with both a vertical and horizontal volume slider. Tested on Chrome, Firefox, Edge. Can you provide any details on how I can recreate this? |
Hey @14willh, I went back and tested it again, and your right everything does work as expected. It seems like I was seeing an issue with safari 12 but after talking to @gkatsev I was just doing it wrong. |
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.
I tested that this works on IE 11, Safari, Edge, Chrome, and Firefox
With this change, the animation is really different to other animations and to the current animation of it just fading out. There's another PR for this fix #5503 which keeps the current hiding animation. |
@gkatsev I agree that there are inconsistencies between the transitions of each UI control - e.g. the playback rate menu doesn't have any transition. I'll have a play around to see if I can make them more unified without changing too much. |
@14willh please check out #5503, if that works for you, maybe we can just go with that and then you won't need to do any extra work :) |
Help is always appreciated. Thanks for the PR even if it didn't make it in. |
Description
Hovering over vertical volume slider when it has
opacity: 0
(i.e. when it is hidden) triggers the volume slider to transition toopacity: 1
(i.e. shown), which is undesirable - it seems like there is a "ghost" element.See #5502 for more
Could simply use
display:none
instead ofopacity: 0
, anddisplay: flex
instead ofopacity: 1
, but this would remove the transition animation.Specific Changes proposed
In the _volume.scss file, this change/fix adds
transform: scale(0) translate(0, 100%)
property to the vertical volume control default state SCSS rule, andtransform: scale(1) translate(0, 0)
to its:hover
state. These changes only affect the behavior of the vertical volume control - the horizontal volume control remains unchanged.transform 0.1s
has been added to the corresponding$transition-property
variables.Additionally, scale and translate values have been chosen to make the
:hover
transition feel similar to the progress bar time tooltip:hover
transition.Have appended
!important
totransform: scale(1) translate(0, 0)
to make this work. Not sure if this could be avoided by reordering some of the SCSS?Fixes #5502.
Requirements Checklist