-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
feat(ui): Add Loop, PIP, Cast, AirPlay buttons to control panel #3255
Conversation
The new version of the picture-in-picture button is now available to be placed in the control panel of the UI. Issue google#2676
The new version of the cast button is now available to be placed in the control panel of the UI.
The new version of the AirPlay button is now available to be placed in the control panel of the UI.
The new version of the loop button is now available to be placed in the control panel of the UI.
Documentation is updated to include the picture_in_picture, loop, airplay and cast buttons in the control panel.
Adds a line that was available in the overflow menu list, but was missing in the control panel list.
Removes an incorrect space in ui/loop_button.js and adds a missing one in ui/airplay_button.js.
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.
It looks great otherwise. I really only had this one complaint. Nice job!
ui/less/containers.less
Outdated
@@ -170,6 +170,11 @@ | |||
} | |||
} | |||
|
|||
/* Buttons hide certain items if they are found inside the control panel */ | |||
.shaka-controls-button-panel .display-none-if-on-control { |
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.
This class name feels weird to me. I think "shaka-overflow-menu-only" might be a better name, but I'd be happy to debate it if you disagree.
As the saying goes, there's really only one hard problem in computer science: naming things, and off-by-one errors. 😁
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 am ashamed to admit how much time it took me to understand that saying the first time I read it.
Oh well, I changed it now, let us see what other weird variable names I come up with next. 😄
Alright, I am marking this pull request as ready for review! 🎉 |
Loop "On" and "Off" buttons were "loop" and "sync_disabled". They are now changed to "repeat" and "repeat_on".
The CSS class that hides certain items if they are found inside the control panel was "display-none-if-on-control". This commit changes it to "shaka-overflow-menu-only".
All tests passed! |
Description
The present pull request provides a partial solution to #2676 (Add overflowMenuButtons to the UI bar) by making the Picture-in-picture, Loop, Cast and AirPlay buttons available in the UI control panel.
The final result is achieved using the CSS display none approach suggested by @joeyparrish, and looks as follows:
Type of change
Checklist: