Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 12 additions & 11 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ and this project adheres to

## [Unreleased]

## [4.1.0] - 2025-12-09

### Added

- ⚡️(frontend) export html #1669
Expand All @@ -20,7 +22,8 @@ and this project adheres to

### Fixed

- 🐛(nginx) fix / location to handle new static pages
- 🐛(nginx) fix / location to handle new static pages #1682
- 🐛(frontend) rerendering during resize window #1715

## [4.0.0] - 2025-12-01

Expand All @@ -30,12 +33,6 @@ and this project adheres to
- ✨(backend) Comments on text editor #1330
- ✨(frontend) link to create new doc #1574

### Fixed

- 🐛(frontend) fix toolbar not activated when reader #1640
- 🐛(frontend) preserve left panel width on window resize #1588
- 🐛(frontend) prevent duplicate as first character in title #1595

### Changed

- ⚡️(sw) stop to cache external resources likes videos #1655
Expand All @@ -45,6 +42,12 @@ and this project adheres to
- ♿(frontend) improve share modal button accessibility #1626
- ♿(frontend) improve screen reader support in DocShare modal #1628

### Fixed

- 🐛(frontend) fix toolbar not activated when reader #1640
- 🐛(frontend) preserve left panel width on window resize #1588
- 🐛(frontend) prevent duplicate as first character in title #1595

## [3.10.0] - 2025-11-18

### Added
Expand All @@ -64,9 +67,6 @@ and this project adheres to
- ♿(frontend) improve ARIA in doc grid and editor for a11y #1519
- ♿(frontend) improve accessibility and styling of summary table #1528
- ♿(frontend) add focus trap and enter key support to remove doc modal #1531
- 🐛(frontend) preserve @ character when esc is pressed after typing it #1512
- 🐛(frontend) make summary button fixed to remain visible during scroll #1581
- 🐛(frontend) fix pdf embed to use full width #1526
- 🐛(frontend) fix alignment of side menu #1597
- 🐛(frontend) fix fallback translations with Trans #1620
- 🐛(export) fix image overflow by limiting width to 600px during export #1525
Expand Down Expand Up @@ -919,7 +919,8 @@ and this project adheres to
- ✨(frontend) Coming Soon page (#67)
- 🚀 Impress, project to manage your documents easily and collaboratively.

[unreleased]: https://github.com/suitenumerique/docs/compare/v4.0.0...main
[unreleased]: https://github.com/suitenumerique/docs/compare/v4.1.0...main
[v4.1.0]: https://github.com/suitenumerique/docs/releases/v4.1.0
[v4.0.0]: https://github.com/suitenumerique/docs/releases/v4.0.0
[v3.10.0]: https://github.com/suitenumerique/docs/releases/v3.10.0
[v3.9.0]: https://github.com/suitenumerique/docs/releases/v3.9.0
Expand Down
2 changes: 1 addition & 1 deletion src/backend/locale/br_FR/LC_MESSAGES/django.po
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ msgstr ""
"Project-Id-Version: lasuite-docs\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2025-11-20 14:08+0000\n"
"PO-Revision-Date: 2025-11-26 13:33\n"
"PO-Revision-Date: 2025-12-09 11:12\n"
"Last-Translator: \n"
"Language-Team: Breton\n"
"Language: br_FR\n"
Expand Down
2 changes: 1 addition & 1 deletion src/backend/locale/de_DE/LC_MESSAGES/django.po
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ msgstr ""
"Project-Id-Version: lasuite-docs\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2025-11-20 14:08+0000\n"
"PO-Revision-Date: 2025-11-26 13:33\n"
"PO-Revision-Date: 2025-12-09 11:12\n"
"Last-Translator: \n"
"Language-Team: German\n"
"Language: de_DE\n"
Expand Down
2 changes: 1 addition & 1 deletion src/backend/locale/en_US/LC_MESSAGES/django.po
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ msgstr ""
"Project-Id-Version: lasuite-docs\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2025-11-20 14:08+0000\n"
"PO-Revision-Date: 2025-11-26 13:33\n"
"PO-Revision-Date: 2025-12-09 11:12\n"
"Last-Translator: \n"
"Language-Team: English\n"
"Language: en_US\n"
Expand Down
2 changes: 1 addition & 1 deletion src/backend/locale/es_ES/LC_MESSAGES/django.po
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ msgstr ""
"Project-Id-Version: lasuite-docs\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2025-11-20 14:08+0000\n"
"PO-Revision-Date: 2025-11-26 13:33\n"
"PO-Revision-Date: 2025-12-09 11:12\n"
"Last-Translator: \n"
"Language-Team: Spanish\n"
"Language: es_ES\n"
Expand Down
2 changes: 1 addition & 1 deletion src/backend/locale/fr_FR/LC_MESSAGES/django.po
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ msgstr ""
"Project-Id-Version: lasuite-docs\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2025-11-20 14:08+0000\n"
"PO-Revision-Date: 2025-11-26 13:33\n"
"PO-Revision-Date: 2025-12-09 11:12\n"
"Last-Translator: \n"
"Language-Team: French\n"
"Language: fr_FR\n"
Expand Down
2 changes: 1 addition & 1 deletion src/backend/locale/it_IT/LC_MESSAGES/django.po
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ msgstr ""
"Project-Id-Version: lasuite-docs\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2025-11-20 14:08+0000\n"
"PO-Revision-Date: 2025-11-26 13:33\n"
"PO-Revision-Date: 2025-12-09 11:12\n"
"Last-Translator: \n"
"Language-Team: Italian\n"
"Language: it_IT\n"
Expand Down
2 changes: 1 addition & 1 deletion src/backend/locale/nl_NL/LC_MESSAGES/django.po
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ msgstr ""
"Project-Id-Version: lasuite-docs\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2025-11-20 14:08+0000\n"
"PO-Revision-Date: 2025-11-26 13:33\n"
"PO-Revision-Date: 2025-12-09 11:12\n"
"Last-Translator: \n"
"Language-Team: Dutch\n"
"Language: nl_NL\n"
Expand Down
2 changes: 1 addition & 1 deletion src/backend/locale/pt_PT/LC_MESSAGES/django.po
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ msgstr ""
"Project-Id-Version: lasuite-docs\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2025-11-20 14:08+0000\n"
"PO-Revision-Date: 2025-11-26 13:33\n"
"PO-Revision-Date: 2025-12-09 11:12\n"
"Last-Translator: \n"
"Language-Team: Portuguese\n"
"Language: pt_PT\n"
Expand Down
2 changes: 1 addition & 1 deletion src/backend/locale/ru_RU/LC_MESSAGES/django.po
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ msgstr ""
"Project-Id-Version: lasuite-docs\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2025-11-20 14:08+0000\n"
"PO-Revision-Date: 2025-11-26 13:33\n"
"PO-Revision-Date: 2025-12-09 11:12\n"
"Last-Translator: \n"
"Language-Team: Russian\n"
"Language: ru_RU\n"
Expand Down
2 changes: 1 addition & 1 deletion src/backend/locale/sl_SI/LC_MESSAGES/django.po
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ msgstr ""
"Project-Id-Version: lasuite-docs\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2025-11-20 14:08+0000\n"
"PO-Revision-Date: 2025-11-26 13:33\n"
"PO-Revision-Date: 2025-12-09 11:12\n"
"Last-Translator: \n"
"Language-Team: Slovenian\n"
"Language: sl_SI\n"
Expand Down
2 changes: 1 addition & 1 deletion src/backend/locale/sv_SE/LC_MESSAGES/django.po
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ msgstr ""
"Project-Id-Version: lasuite-docs\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2025-11-20 14:08+0000\n"
"PO-Revision-Date: 2025-11-26 13:33\n"
"PO-Revision-Date: 2025-12-09 11:12\n"
"Last-Translator: \n"
"Language-Team: Swedish\n"
"Language: sv_SE\n"
Expand Down
2 changes: 1 addition & 1 deletion src/backend/locale/tr_TR/LC_MESSAGES/django.po
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ msgstr ""
"Project-Id-Version: lasuite-docs\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2025-11-20 14:08+0000\n"
"PO-Revision-Date: 2025-11-26 13:33\n"
"PO-Revision-Date: 2025-12-09 11:12\n"
"Last-Translator: \n"
"Language-Team: Turkish\n"
"Language: tr_TR\n"
Expand Down
2 changes: 1 addition & 1 deletion src/backend/locale/uk_UA/LC_MESSAGES/django.po
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ msgstr ""
"Project-Id-Version: lasuite-docs\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2025-11-20 14:08+0000\n"
"PO-Revision-Date: 2025-11-26 13:33\n"
"PO-Revision-Date: 2025-12-09 11:12\n"
"Last-Translator: \n"
"Language-Team: Ukrainian\n"
"Language: uk_UA\n"
Expand Down
2 changes: 1 addition & 1 deletion src/backend/locale/zh_CN/LC_MESSAGES/django.po
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ msgstr ""
"Project-Id-Version: lasuite-docs\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2025-11-20 14:08+0000\n"
"PO-Revision-Date: 2025-11-26 13:33\n"
"PO-Revision-Date: 2025-12-09 11:12\n"
"Last-Translator: \n"
"Language-Team: Chinese Simplified\n"
"Language: zh_CN\n"
Expand Down
2 changes: 1 addition & 1 deletion src/backend/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "impress"
version = "4.0.0"
version = "4.1.0"
authors = [{ "name" = "DINUM", "email" = "dev@mail.numerique.gouv.fr" }]
classifiers = [
"Development Status :: 5 - Production/Stable",
Expand Down
40 changes: 40 additions & 0 deletions src/frontend/apps/e2e/__tests__/app-impress/doc-editor.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -996,4 +996,44 @@ test.describe('Doc Editor', () => {
const download = await downloadPromise;
expect(download.suggestedFilename()).toBe('test-pdf.pdf');
});

test('it preserves text when switching between mobile and desktop views', async ({
page,
browserName,
}) => {
const [docTitle] = await createDoc(
page,
'doc-viewport-test',
browserName,
1,
);
await verifyDocName(page, docTitle);

const editor = await writeInEditor({
page,
text: 'Hello World - Desktop Text',
});
await expect(editor.getByText('Hello World - Desktop Text')).toBeVisible();

await page.waitForTimeout(500);

// Switch to mobile viewport
await page.setViewportSize({ width: 500, height: 1200 });
await page.waitForTimeout(500);

await expect(editor.getByText('Hello World - Desktop Text')).toBeVisible();

await writeInEditor({
page,
text: 'Mobile Text',
});

await page.waitForTimeout(500);

// Switch back to desktop viewport
await page.setViewportSize({ width: 1280, height: 720 });
await page.waitForTimeout(500);

await expect(editor.getByText('Mobile Text')).toBeVisible();
});
});
2 changes: 1 addition & 1 deletion src/frontend/apps/e2e/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "app-e2e",
"version": "4.0.0",
"version": "4.1.0",
"repository": "https://github.com/suitenumerique/docs",
"author": "DINUM",
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion src/frontend/apps/impress/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "app-impress",
"version": "4.0.0",
"version": "4.1.0",
"repository": "https://github.com/suitenumerique/docs",
"author": "DINUM",
"license": "MIT",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,9 @@ export const BlockNoteEditor = ({ doc, provider }: BlockNoteEditorProps) => {
const { isDesktop } = useResponsiveStore();
const { isSynced: isConnectedToCollabServer } = useProviderStore();
const refEditorContainer = useRef<HTMLDivElement>(null);
const canSeeComment = doc.abilities.comment && isDesktop;
const canSeeComment = doc.abilities.comment;
// Determine if comments should be visible in the UI
const showComments = canSeeComment && isDesktop;

useSaveDoc(doc.id, provider.document, isConnectedToCollabServer);
const { i18n } = useTranslation();
Expand Down Expand Up @@ -207,7 +209,7 @@ export const BlockNoteEditor = ({ doc, provider }: BlockNoteEditorProps) => {
ref={refEditorContainer}
$css={css`
${cssEditor};
${cssComments(canSeeComment, currentUserAvatarUrl)}
${cssComments(showComments, currentUserAvatarUrl)}
`}
>
{errorAttachment && (
Expand All @@ -225,7 +227,7 @@ export const BlockNoteEditor = ({ doc, provider }: BlockNoteEditorProps) => {
formattingToolbar={false}
slashMenu={false}
theme="light"
comments={canSeeComment}
comments={showComments}
aria-label={t('Document editor')}
>
<BlockNoteSuggestionMenu />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ export const useHeadings = (editor: DocsBlockNoteEditor) => {
const { setHeadings, resetHeadings } = useHeadingStore();

useEffect(() => {
// Check if editor and its view are mounted before accessing document
if (!editor || !editor._tiptapEditor?.view?.dom) {
return;
}

setHeadings(editor);

let timeoutId: NodeJS.Timeout;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ export const useShortcuts = (
el: HTMLDivElement | null,
) => {
useEffect(() => {
// Check if editor and its view are mounted
if (!editor || !editor._tiptapEditor?.view?.dom || !el) {
return;
}

const handleKeyDown = (event: KeyboardEvent) => {
if (event.key === '@' && editor?.isFocused()) {
const selection = window.getSelection();
Expand All @@ -32,10 +37,6 @@ export const useShortcuts = (
}
};

if (!el) {
return;
}

el.addEventListener('keydown', handleKeyDown);

return () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,11 @@ export const useUploadStatus = (editor: DocsBlockNoteEditor) => {
);

useEffect(() => {
// Check if editor and its view are mounted before accessing document
if (!editor || !editor._tiptapEditor?.view?.dom) {
return;
}
Comment on lines +99 to +101
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if (!editor || !editor._tiptapEditor?.view?.dom) {
return;
}
const isEditorReady =
!!editor && !!editor._tiptapEditor?.view?.dom;
if (!isEditorReady) return;


const imagesBlocks = editor?.document.filter(
(block) =>
block.type === 'image' && block.props.url.includes(ANALYZE_URL),
Expand All @@ -110,6 +115,11 @@ export const useUploadStatus = (editor: DocsBlockNoteEditor) => {
* block to show analyzing status
*/
useEffect(() => {
// Check if editor and its view are mounted before setting up handlers
if (!editor || !editor._tiptapEditor?.view?.dom) {
return;
}
Comment on lines +119 to +121
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if (!editor || !editor._tiptapEditor?.view?.dom) {
return;
}
```suggestion
const isEditorReady =
!!editor && !!editor._tiptapEditor?.view?.dom;
if (!isEditorReady) return;


editor.onUploadEnd((blockId) => {
if (!blockId) {
return;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@ export interface UseHeadingStore {
export const useHeadingStore = create<UseHeadingStore>((set, get) => ({
headings: [],
setHeadings: (editor) => {
// Check if editor and its view are mounted before accessing document
if (!editor || !editor._tiptapEditor?.view?.dom) {
return;
}
Comment on lines +32 to +34
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if (!editor || !editor._tiptapEditor?.view?.dom) {
return;
}
```suggestion
const isEditorReady =
!!editor && !!editor._tiptapEditor?.view?.dom;
if (!isEditorReady) return;


const headingBlocks = editor?.document
.filter(
(block) =>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import { useLeftPanelStore } from '../stores';
export const LeftPanelHeaderButton = () => {
const router = useRouter();
const { t } = useTranslation();
const { togglePanel } = useLeftPanelStore();
const { closePanel } = useLeftPanelStore();
const { setIsSkeletonVisible } = useSkeletonStore();
const [isNavigating, setIsNavigating] = useState(false);

Expand All @@ -25,7 +25,7 @@ export const LeftPanelHeaderButton = () => {
.then(() => {
// The skeleton will be disabled by the [id] page once the data is loaded
setIsNavigating(false);
togglePanel();
closePanel();
})
.catch(() => {
// In case of navigation error, disable the skeleton
Expand Down
Loading
Loading