youtube
youtube copied to clipboard
fix(comments-sidebar): expand player in cinema mode with sidebar layout
Summary
- Sync cinema mode state to an
it-cinema-modehtml attribute and trigger layout recalculation on toggle - Skip inline player width constraints in comments sidebar while cinema mode is active
- Hide the reserved sidebar column in cinema mode so the player can use the full horizontal space
Related issue
Fixes #3973
Test plan
- [ ] Enable comments sidebar and open a livestream with chat visible
- [ ] Snap the browser window to half-screen width
- [ ] Enable cinema mode and confirm the player expands horizontally with no empty sidebar gap
- [ ] Disable cinema mode and confirm the sidebar layout returns to normal
- [ ] Run
npm test -- tests/unit/comments-sidebar.test.js
thank you very much! @Vaibhav-Chodankar
can be shorter and or more conditional and or solve more issues at once
compare: https://github.com/code-charity/youtube/pull/3958