FreeTube icon indicating copy to clipboard operation
FreeTube copied to clipboard

Fix: Video description collapsible and no longer hijacks page scroll

Open sabs21 opened this issue 5 months ago • 15 comments

Fix: Video description collapsible and no longer hijacks page scroll

Pull Request Type

  • [x] Bugfix
  • [x] Feature Implementation
  • [ ] Documentation
  • [ ] Other

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: image

CHANGE (Description not expanded): image

CHANGE (Description expanded): image

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:

  • Clicking 'Click to View Description' makes the description scrollable and that the button removes itself.
  • Short descriptions do not show the 'Click to View Description' button.

Desktop

  • OS: Windows 10
  • OS Version: 22H2, Build 19045.4842
  • FreeTube version: v0.21.3 Beta

Additional context

sabs21 avatar Sep 08 '24 01:09 sabs21