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
Conversation
…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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
When the Comments on Sidebar feature is active, the
#columnselement hasoverflow: hiddento 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 theoverflow: hiddenclips the bottom of the content — making the playlist items, related videos, and comments invisible.Changes
handlePlaylistOverflow()function that detects the presence of a#playlistor#chat-containerelement and dynamically adjusts the#columnsoverflow tovisibleso the full content is accessiblesidebar()layout function, the mutation observer, and on initial setupTesting
References
Fixes #4237