From bd7960ee9649cd59d29eea0661d6a285fdb10cae Mon Sep 17 00:00:00 2001 From: Nathan Panchout Date: Mon, 4 May 2026 16:17:50 +0200 Subject: [PATCH 1/5] =?UTF-8?q?=E2=AC=86=EF=B8=8F(frontend)=20bump=20cunni?= =?UTF-8?q?ngham-react=20and=20ui-kit?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Update @gouvfr-lasuite/cunningham-react from 4.2.0 to 4.3.0 and @gouvfr-lasuite/ui-kit from 0.19.10 to 0.20.1, and regenerate the cunningham design tokens accordingly. The new ui-kit drops the "black" font weight and ships rounded form border-radius defaults. --- src/frontend/yarn.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/frontend/yarn.lock b/src/frontend/yarn.lock index ba392297d5..fb100c06c7 100644 --- a/src/frontend/yarn.lock +++ b/src/frontend/yarn.lock @@ -771,7 +771,7 @@ "@babel/helper-module-transforms" "^7.27.1" "@babel/helper-plugin-utils" "^7.27.1" -"@babel/plugin-transform-modules-systemjs@7.29.4", "@babel/plugin-transform-modules-systemjs@^7.27.1": +"@babel/plugin-transform-modules-systemjs@^7.27.1": version "7.29.4" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.29.4.tgz#f621105da99919c15cf4bde6fcc7346ef95e7b20" integrity sha512-N7QmZ0xRZfjHOfZeQLJjwgX2zS9pdGHSVl/cjSGlo4dXMqvurfxXDMKY4RqEKzPozV78VMcd0lxyG13mlbKc4w== From c29ef83194da4ca6da1f365ceb5e386715dad93c Mon Sep 17 00:00:00 2001 From: Nathan Panchout Date: Mon, 4 May 2026 16:17:56 +0200 Subject: [PATCH 2/5] =?UTF-8?q?=E2=99=BB=EF=B8=8F(frontend)=20adapt=20moda?= =?UTF-8?q?ls=20to=20ModalDefaultVariantProps?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit cunningham-react 4.3.0 splits Modal props per variant. Switch AlertModal and SideModal from the now-removed ModalProps alias to the more precise ModalDefaultVariantProps type so the modal wrappers keep type-checking against the new API. --- .../apps/impress/src/components/modal/SideModal.tsx | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/frontend/apps/impress/src/components/modal/SideModal.tsx b/src/frontend/apps/impress/src/components/modal/SideModal.tsx index 9e6047c120..93ca9e18a8 100644 --- a/src/frontend/apps/impress/src/components/modal/SideModal.tsx +++ b/src/frontend/apps/impress/src/components/modal/SideModal.tsx @@ -1,5 +1,9 @@ -import { Modal, ModalSize } from '@gouvfr-lasuite/cunningham-react'; -import { ComponentPropsWithRef, PropsWithChildren } from 'react'; +import { + Modal, + ModalDefaultVariantProps, + ModalSize, +} from '@gouvfr-lasuite/cunningham-react'; +import { PropsWithChildren } from 'react'; import { createGlobalStyle } from 'styled-components'; interface SideModalStyleProps { @@ -35,7 +39,7 @@ const SideModalStyle = createGlobalStyle` } `; -type SideModalType = Omit, 'size'>; +type SideModalType = Omit; type SideModalProps = SideModalType & Partial; From 9dfb2203547961e4cf0702d52035f2a045d78c4f Mon Sep 17 00:00:00 2001 From: Nathan Panchout Date: Mon, 4 May 2026 16:18:07 +0200 Subject: [PATCH 3/5] =?UTF-8?q?=E2=9C=A8(frontend)=20add=20presenter=20mod?= =?UTF-8?q?e?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add a presenter overlay that turns the current document into a slide deck. The editor's blocks are snapshot at open time and split into slides on each divider; navigation is driven by keyboard shortcuts and a floating bar with browser fullscreen support. The overlay is wired to the doc header toolbox via a new "Present" entry, lazy-loaded to keep the editor bundle lean. --- CHANGELOG.md | 6 +- .../docs/doc-header/components/DocToolBox.tsx | 28 ++ .../components/PresenterFloatingBar.tsx | 118 +++++++ .../components/PresenterOverlay.tsx | 159 +++++++++ .../components/PresenterSlide.tsx | 141 ++++++++ .../features/docs/doc-presenter/constants.ts | 44 +++ .../hooks/useBrowserFullscreen.ts | 89 +++++ .../docs/doc-presenter/hooks/useFitScale.ts | 307 ++++++++++++++++++ .../hooks/usePresenterShortcuts.ts | 99 ++++++ .../docs/doc-presenter/hooks/useSlides.ts | 81 +++++ .../src/features/docs/doc-presenter/index.ts | 1 + 11 files changed, 1069 insertions(+), 4 deletions(-) create mode 100644 src/frontend/apps/impress/src/features/docs/doc-presenter/components/PresenterFloatingBar.tsx create mode 100644 src/frontend/apps/impress/src/features/docs/doc-presenter/components/PresenterOverlay.tsx create mode 100644 src/frontend/apps/impress/src/features/docs/doc-presenter/components/PresenterSlide.tsx create mode 100644 src/frontend/apps/impress/src/features/docs/doc-presenter/constants.ts create mode 100644 src/frontend/apps/impress/src/features/docs/doc-presenter/hooks/useBrowserFullscreen.ts create mode 100644 src/frontend/apps/impress/src/features/docs/doc-presenter/hooks/useFitScale.ts create mode 100644 src/frontend/apps/impress/src/features/docs/doc-presenter/hooks/usePresenterShortcuts.ts create mode 100644 src/frontend/apps/impress/src/features/docs/doc-presenter/hooks/useSlides.ts create mode 100644 src/frontend/apps/impress/src/features/docs/doc-presenter/index.ts diff --git a/CHANGELOG.md b/CHANGELOG.md index dc118a1298..e7b131f667 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,11 +13,13 @@ and this project adheres to - ✨(buildpack) add PaaS deployment support, tested with Scalingo #2293 - 🔧(backend) allow configuring settings OIDC_OP_USER_ENDPOINT_FORMAT - ⚡️(helm) create a dedicated svc and deployment for yprovider converter #2368 +- ✨(frontend) add the presenter mode ### Changed - ♻️(backend) allow global search in sub documents - ✨(backend) add a breadcrumb in the search response +- ♿️(frontend) add aria-hidden to decorative avatar SVGs in share modal #2324 ### Fixed @@ -25,10 +27,6 @@ and this project adheres to - 🐛(backend) prevent admins/owners from overwriting other users comments - 🐛(backend) use computed_link_reach in handle_onboarding_document #2305 -### Changed - -- ♿️(frontend) add aria-hidden to decorative avatar SVGs in share modal #2324 - ## [v5.1.0] - 2026-05-11 ### Added diff --git a/src/frontend/apps/impress/src/features/docs/doc-header/components/DocToolBox.tsx b/src/frontend/apps/impress/src/features/docs/doc-header/components/DocToolBox.tsx index 19973d6c28..af1a1f4557 100644 --- a/src/frontend/apps/impress/src/features/docs/doc-header/components/DocToolBox.tsx +++ b/src/frontend/apps/impress/src/features/docs/doc-header/components/DocToolBox.tsx @@ -1,5 +1,6 @@ import { Button, useModal } from '@gouvfr-lasuite/cunningham-react'; import { useTreeContext } from '@gouvfr-lasuite/ui-kit'; +import { Present } from '@gouvfr-lasuite/ui-kit/icons'; import dynamic from 'next/dynamic'; import { useRouter } from 'next/router'; import { useState } from 'react'; @@ -79,6 +80,14 @@ const ModalExport = ) : null; +const PresenterOverlay = dynamic( + () => + import('@/docs/doc-presenter').then((mod) => ({ + default: mod.PresenterOverlay, + })), + { ssr: false }, +); + interface DocToolBoxProps { doc: Doc; } @@ -93,6 +102,7 @@ export const DocToolBox = ({ doc }: DocToolBoxProps) => { const [isModalRemoveOpen, setIsModalRemoveOpen] = useState(false); const [isModalExportOpen, setIsModalExportOpen] = useState(false); + const [isPresenterOpen, setIsPresenterOpen] = useState(false); const selectHistoryModal = useModal(); const modalShare = useModal(); @@ -176,6 +186,15 @@ export const DocToolBox = ({ doc }: DocToolBoxProps) => { showSeparator: true, show: !emoji && doc.abilities.partial_update && !isTopRoot, }, + { + label: t('Present'), + icon: , + callback: () => { + setIsPresenterOpen(true); + }, + show: !doc.deleted_at && !isSmallMobile, + testId: `docs-actions-present-${doc.id}`, + }, { label: t('Copy link'), icon: