-
Notifications
You must be signed in to change notification settings - Fork 872
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
Fix: Video description collapsible and no longer hijacks page scroll #5665
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
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 |
Head branch was pushed to by a user without write access
Show Less is now seen in the top of the description box but i expected it to be shown. Was this an intentional change? |
No I didn't expect that to happen, I'll work on fixing that now |
Head branch was pushed to by a user without write access
Just fixed that, my guess is that when I merged the latest development, there was some css that caused the show less button to appear at the top. |
No, that hasn't changed. You can see this same padding in a screenshot within my September 16th post #5665 (comment) |
@sabs21 sorry that this was caught after merger. Would it be possible for you to create a followup PR to address the following issues. When expanding the description it scrolls all the way to the bottom instead of starting at top 9775XGq8GD.mp4Noticed a difference on FT vs YT YT you can highlight text and open the link in the preview firefox_QCVCIbGSag.mp4This isnt possible within FT. I can only highlight all the text within the collapsed container W23TM1Suvm.mp4Not able to highlight text is minor but maybe the url is? |
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