Skip to content

fix: prevent #columns overflow:hidden from clipping playlist content when comments-sidebar is active (Fixes #4237) - #4252

Open
waterWang wants to merge 2 commits into
code-charity:masterfrom
waterWang:fix/comments-sidebar-playlist-overflow-4237
Open

fix: prevent #columns overflow:hidden from clipping playlist content when comments-sidebar is active (Fixes #4237)#4252
waterWang wants to merge 2 commits into
code-charity:masterfrom
waterWang:fix/comments-sidebar-playlist-overflow-4237

Conversation

@waterWang

Copy link
Copy Markdown

Summary

When the Comments on Sidebar feature is active, the #columns element has overflow: hidden to keep the layout within the viewport. However, when a playlist or live chat is present, the sidebar content (playlist panel + comments) can exceed the viewport height, and the overflow: hidden clips the bottom of the content — making the playlist items, related videos, and comments invisible.

Changes

  • Added handlePlaylistOverflow() function that detects the presence of a #playlist or #chat-container element and dynamically adjusts the #columns overflow to visible so the full content is accessible
  • Called from the sidebar() layout function, the mutation observer, and on initial setup
  • When no playlist or live chat is present, the overflow is reset to the default CSS value

Testing

  • All 94 existing tests pass (21 test suites)
  • Manually tested the logic by verifying the DOM detection code path

References

Fixes #4237

…rch results (Fixes code-charity#4248)

When the user sets a custom thumbnail size (Large / Medium / Small / x-small / xx-small),
the CSS only applied to ytd-video-renderer (regular search results) and
ytd-compact-video-renderer (sidebar). Playlist video results in search
use ytd-playlist-video-renderer, which was not targeted, so playlist
thumbnails always remained at the default YouTube size.

This commit adds the same size rules for ytd-playlist-video-renderer ytd-thumbnail.
…when comments-sidebar is active (Fixes code-charity#4237)

When the 'Comments on Sidebar' feature is active, the #columns element
has overflow:hidden to keep the layout within the viewport. However,
when a playlist or live chat is present, the sidebar content (playlist
panel + comments) can exceed the viewport height, and the overflow:hidden
clips the bottom of the content — making the playlist items, related
videos, and comments invisible.

Fix: Add a handlePlaylistOverflow() function that detects the presence
of a #playlist or #chat-container element and dynamically adjusts the
#columns overflow to 'visible' so the full content is accessible. The
function is called from the sidebar layout function, the mutation
observer, and on initial setup.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

🐞 Comments on Sidebar Breaking when using Playlist

1 participant