-
Notifications
You must be signed in to change notification settings - Fork 864
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: Video description collapsible and no longer hijacks page scroll #5665
base: development
Are you sure you want to change the base?
Conversation
introduced a button in video descriptions shwon as 'Click to View Description' which allows the user to see the full description and scroll within the description card.
description length is based on computed css height of description container
Could you explain why you chose for 300px? Is the behavior the same as YT? If not why is this better? |
I chose 300px because that's the height/max-block-size the description was already set to (look at .videoDescription in WatchVideoDescription.css). |
My (purely visual, untested) feedback: I like YT's UI for this better, particularly that the click area is the full description box so it's easier to click, the "more" button is casual, placed inside the flow of the description, and not too strongly competing for visual attention with an underline (and at least for En-US users, in lower case), and the corresponding "less". Also like that it does so by fully unraveling it rather than just making the div scrollable. |
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
Conflicts have been resolved. A maintainer will review the pull request shortly. |
@kommunarr any additional thought on the way its implemented now? |
Sorry for the delay, that looks great @sabs21! Please merge that in. |
Head branch was pushed to by a user without write access
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.
Discovered one more issue; the "Show more" button is at the bottom of the tab order, so if a video description has links, you will have to tab through all of them to actually click the "Show more" button. It should instead be at the top of the tab order for the container. One possible solution is to use the CSS order property. Here's a video with links in the description as an example.
description links
Head branch was pushed to by a user without write access
Great idea, I wound up flipping the ordering such that the buttons came first in the HTML, then used flexbox + order to adjust physical placement while keeping the desired tab ordering. |
For other testers, here's a video with a short description, where it properly does not show the "Show more" button. issue (pre-existing, non-blocking): seeing template errors for videos with no description (ex) due to no use of the null access operator. issue: Sorry for all the different rounds of feedback, but I think this should be the last! I don't mind the "Show less" button being at the top, but it should have the same top padding as the |
Head branch was pushed to by a user without write access
As a byproduct of this change, clicking the Show more button now opens at the end of the container (i.e., scrolled all the way down) instead of at the top. |
Head branch was pushed to by a user without write access
I reverted the previous change and just added the margin to the top of the show less button |
Anyone got a video with short description for testing? Update 1: The one in one of the comments is removed |
Just got error when trying to find a video with short description |
Fix: Video description collapsible and no longer hijacks page scroll
Pull Request Type
Related issue
closes #4821
Description
Long video descriptions will now have their overflow hidden to prevent hijacking the scroll of the page. To see the full description and reintroduce the scrollbar, the user must click 'Click to View Description' shown at the bottom of the description. The 'Click to View Description' button is only shown for descriptions with a computed CSS height greater than or equal to 300 pixels.
Screenshots
CURRENT:
CHANGE (Description not expanded):
CHANGE (Description expanded):
Testing
I tested this change on a video with a long description (description exceeds CSS height of 300px) and a video with a short description. I verified:
Desktop
Additional context