-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
UI improvement: fix overflow menu overlapping other controls #3220
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -34,8 +34,8 @@ | |
/* Where the menu appears. */ | ||
position: absolute; | ||
z-index: 2; | ||
right: 15px; | ||
bottom: 30px; | ||
right: 3%; | ||
bottom: 4.4em; | ||
|
||
/* The buttons inside the menu. */ | ||
button { | ||
|
@@ -67,13 +67,6 @@ | |
padding-left: 10px; | ||
padding-right: 10px; | ||
} | ||
|
||
/* If the seekbar is missing, this is positioned lower. | ||
* TODO: Solve with flex layout instead? */ | ||
&.shaka-low-position { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Any specific reason we have to remove this style? It might break the current behavior with no seekbar. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this style was actually present because the bottom property was set to static 30px which had to be changed when there was no seekbar , but now as I changed the bottom property to the 4em (relative measurement) it is not needed as it automatically gives required margin from bottom making sure it is above the controls even without the seekbar, I verified that the change doesn't break the current behavior. below are the images of UI without seek bar. before these changes : after these changes : And you are right, the optimal and permanent solution would be to use a flex layout for the overflow menu to let it float above the control panel, but these changes should work as a good temporary solution. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thank you for verifying that! There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sure sir, I'll try to implement the flex layout and see if it works. |
||
/* TODO(b/116651454): eliminate hard-coded offsets */ | ||
bottom: 15px; | ||
} | ||
} | ||
|
||
/* The span elements inside the top-level overflow menu contain single lines | ||
|
@@ -112,6 +105,17 @@ | |
} | ||
} | ||
|
||
.shaka-video-container:fullscreen { | ||
/* When in fulscreen mode, add a bottom margin to overflow menu so that it | ||
* doesn't overlap with other buttons. */ | ||
.shaka-controls-container { | ||
.shaka-overflow-menu { | ||
/* TODO: eliminate hard-coded offsets */ | ||
bottom: 6em; | ||
} | ||
} | ||
} | ||
|
||
/* This is a button within each submenu that takes you back to the main overflow | ||
* menu. */ | ||
.shaka-back-to-overflow-button { | ||
|
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.
Any specific reason we need to change the "right" property?
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.
the right property is set to static 15px, so I changed the right property to % based relative measurements (as relative measurements are more preferred over static ones) , this way the right property adapts to the container size in normal as well as fullscreen mode.
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.
We'll need to double check how it looks on different sized screens (shrink and grow the browser window, and try device emulation in Chrome, and also on large screens like TV). If we have it in px, most likely means that it wasn't working with % for one of those use cases.
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 these changes on the browser in all possible screen sizes, also tried device emulation on chrome ( both small and large screen sizes ) and it works perfectly fine in all cases without any issue.
for surety, you can do a check for these changes from your side.
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.
Thank you for testing!