From 2a8656ed2ee9f06df8eb9607e15d75204da52052 Mon Sep 17 00:00:00 2001 From: germanocaumo Date: Mon, 8 Dec 2025 12:47:29 -0300 Subject: [PATCH 1/2] feat(layout): hide presentation according to layout.xml new events This adds support to the new event saying when the presenter minimized the presentation. When found it: - Hides presentation (and thumbnails) completely - Make the webcams occupy the main area - Expands chat/notes to full left side (like it is when single content) --- src/components/bars/top/buttons/swap.js | 8 ++++---- src/components/bars/top/index.js | 11 ++++++---- src/components/player/content/index.js | 18 +++++++++-------- src/components/player/index.js | 17 +++++++++++++++- src/components/player/media/index.js | 5 ++++- src/components/presentation/index.js | 6 +++--- src/components/thumbnails/index.js | 2 +- src/components/tldraw/index.js | 10 ++++----- src/components/tldraw_v2/index.js | 6 +++--- src/components/utils/hooks/index.js | 27 +++++++++++++++++-------- src/utils/builder.js | 10 +++++++-- src/utils/data/validators.js | 17 +++++++--------- 12 files changed, 87 insertions(+), 50 deletions(-) diff --git a/src/components/bars/top/buttons/swap.js b/src/components/bars/top/buttons/swap.js index e714b986..bd953d29 100644 --- a/src/components/bars/top/buttons/swap.js +++ b/src/components/bars/top/buttons/swap.js @@ -16,14 +16,14 @@ const intlMessages = defineMessages({ }, }); -const propTypes = { toggleSwap: PropTypes.func }; +const propTypes = { toggleSwap: PropTypes.func, hidePresentation: PropTypes.bool }; -const defaultProps = { toggleSwap: () => {} }; +const defaultProps = { toggleSwap: () => { }, hidePresentation: false }; -const Swap = ({ toggleSwap }) => { +const Swap = ({ toggleSwap, hidePresentation }) => { const intl = useIntl(); - if (!layout.control || !config.swap || layout.single) return null; + if (!layout.control || !config.swap || layout.single || hidePresentation) return null; return (