feat: Add option to collapse the Transcript panel#3802
Conversation
- Change transcript setting from boolean to enum (normal, collapsed, hidden) - Add collapse functionality when 'collapsed' option is selected - Update appearance.js to handle new states - Update core.js to collapse transcript when set to 'collapsed' state
|
@wahajahmed010 Thank you for the pr, can you share any screenshots or a screen recording? |
|
Hi @rajanarahul93! Here's a description of the UI behavior since this is a browser extension: Before: The Transcript setting was a simple on/off toggle (switch). After: The Transcript setting is now a dropdown with three options:
The change is in The collapsed behavior works by:
This gives users a middle ground between always-expanded transcripts and no transcript at all — they can expand it on demand without it taking up the full sidebar. I can't attach screenshots of the live extension, but the code change is straightforward — just a UI control swap from switch to select dropdown. |
Description
This PR adds an option to collapse the Transcript panel while keeping it visible, addressing issue #3800.
Changes
Menu UI
transcriptsetting from a boolean switch to a select dropdown with options:normal- Shows and expands the transcript panelcollapsed- Shows the transcript panel in a collapsed statehidden- Hides the transcript panel completelyCode Changes
menu/skeleton-parts/appearance.jsto use select componentjs&css/web-accessible/www.youtube.com/appearance.jsto handle new statesjs&css/web-accessible/core.jsto collapse transcript panel when collapsed state is setTechnical Details
The implementation follows the same pattern as the existing
livechatsetting, which also has a select dropdown with multiple states. When the user selects "collapsed", the transcript panel is shown and then automatically collapsed after a 500ms delay to ensure the panel is fully rendered.Testing
Please test by:
normal- Transcript should be visible and expandedcollapsed- Transcript should be visible but collapsedhidden- Transcript should be hiddenAI Disclosure: This pull request was partially assisted by AI. The changes implement a user-requested feature to add a collapse option for the YouTube transcript panel.