Commit Graph

738 Commits

Author SHA1 Message Date
Anthony LC
2e6cb109ef 🔖(minor) release 3.4.0
Added:
- (frontend) multi-pages
- (frontend) Duplicate a doc
- Ask for access
- (frontend) add customization for translations
- (backend) add ancestors links definitions to document abilities
- (backend) include ancestors accesses on document accesses list view
- (backend) add ancestors links reach and role to document API
- 📝(project) add troubleshoot doc
- 📝(project) add system-requirement doc
- 🔧(front) configure x-frame-options to DENY in nginx conf
- (backend) allow to disable checking unsafe mimetype on attachment upload
- (doc) add documentation to install with compose
-  Give priority to users connected to collaboration server
  (aka no websocket feature)

Changed:
- ♻️(backend) stop requiring owner for non-root documents
- ♻️(backend) simplify roles by ranking them and return only the max role
- 📌(yjs) stop pinning node to minor version on yjs docker image
- 🧑‍💻(docker) add .next to .dockerignore
- 🧑‍💻(docker) handle frontend development images with docker compose
- 🧑‍💻(docker) add y-provider config to development environment
- ️(frontend) optimize document fetch error handling

Fixed:
- 🐛(backend) fix link definition select options linked to ancestors
- 🐛(frontend) table of content disappearing
- 🐛(frontend) fix multiple EmojiPicker
- 🐛(frontend) fix meta title
- 🔧(git) set LF line endings for all text files
- 📝(docs) minor fixes to docs/env.md
- support `_FILE` environment variables for secrets

Removed:
- 🔥(frontend) remove Beta from logo
2025-07-09 17:26:02 +02:00
Anthony LC
52a8dd0b5c 🩹(frontend) refresh tree after duplicate
After duplicating a document, the tree is now
refreshed to reflect the new structure.
This ensures that the user sees the updated
document tree immediately after the duplication
action.
2025-07-09 17:26:02 +02:00
Anthony LC
8a3dfe0252 🛂(frontend) blocked edition if multiple ancestors
With child documents we need to check the parent
documents to know if the parent doc are collaborative
or not.
2025-07-09 17:26:02 +02:00
AntoLC
1d01f6512e 🌐(i18n) update translated strings
Update translated files with new translations
2025-07-09 17:11:57 +02:00
Anthony LC
cd366213ca 🛂(frontend) only owner can make a child doc a main doc
We get some side effects when an admin
tries to make a child doc a main doc.
We ensure that only the owner can do this.
2025-07-09 17:11:57 +02:00
Anthony LC
d15285d385 ✏️(frontend) remove key from Trans component
We remove the key from the Trans componant
to make it easier to translate.
2025-07-09 11:44:31 +02:00
Anthony LC
377d4e8971 💄(frontend) change icon duplicate feature
We change the icon for the duplicate feature
in the document toolbox and the documents grid
actions from 'call_split' to 'content_copy'
to better reflect the action of duplicating a
document.
2025-07-08 17:43:16 +02:00
Anthony LC
70f0c7052c 🚩(frontend) remove "Available soon" tag about multipage
Multipage is available now, so we remove the
"Available soon" tag from the home page.
2025-07-08 17:43:16 +02:00
renovate[bot]
ca2e02806a ⬆️(dependencies) update js dependencies 2025-07-08 15:18:27 +00:00
Anthony LC
33bd5ef116 ️(frontend) remove flickering when connecting to collab
The blocking edition modal could be flickring, because
the connection to the collaborative server can take
a bit of time.
We set a timeout to ensure the loading state
is cleared after a reasonable time.
2025-07-08 17:00:39 +02:00
Anthony LC
7abe1c9eb4 🛂(frontend) button request access only on parent
The children reflect the parent access. So we can
request access only on the parent document.
2025-07-08 17:00:38 +02:00
Nathan Panchout
82f2cb59e6 (frontend) enhance tests
- Removed 'feature/doc-dnd' branch from the Docker Hub workflow to
streamline deployment processes.
- Updated document creation tests to replace 'New page' button
references with 'New doc' for consistency.
- Enhanced test cases to improve clarity and ensure accurate
verification of document functionalities.
- Added new utility function for creating root subpages, improving test
maintainability.
2025-07-08 17:00:38 +02:00
Nathan Panchout
44909faa67 (frontend) add AlertModal and enhance document sharing features
- Introduced a new `AlertModal` component for confirmation dialogs.
- Updated `DocToolBoxLicenceAGPL` and `DocToolBoxLicenceMIT` to include
`isRootDoc` prop for better document management.
- Enhanced `DocShareModal` to conditionally render content based on the
root document status.
- Improved `DocInheritedShareContent` to display inherited access
information more effectively.
- Refactored `DocRoleDropdown` to handle access removal actions and
improve role management.
- Updated `DocShareMemberItem` to accommodate new access management
features.
2025-07-08 16:31:58 +02:00
Nathan Panchout
1c5270e301 (frontend) enhance dropdown menu and quick search components
- Added a horizontal separator to the dropdown menu for better visual
distinction between options.
- Updated padding in the quick search input for improved layout
consistency.
- Adjusted margin in the quick search group for better spacing.
- Increased vertical padding in quick search item content for enhanced
readability.
- Modified the horizontal separator to accept custom padding for more
flexible styling.
- Improved left panel styling to manage overflow behavior effectively.
- Removed unused skeleton loading styles from globals.css to clean up
the codebase.
2025-07-08 16:31:58 +02:00
Nathan Panchout
304b3be273 (frontend) update test descriptions for clarity and consistency
- update tests description
- Corrected minor typos in test descriptions to enhance readability.
- Ensured that all test cases clearly convey their purpose and expected
outcomes.
2025-07-08 16:31:58 +02:00
Nathan Panchout
17ece3b715 (frontend) enhance document sharing and access management
- Introduced new utility functions for managing document sharing,
including `searchUserToInviteToDoc`, `addMemberToDoc`, and
`updateShareLink`.
- Updated existing tests to verify inherited share access and link
visibility features.
- Refactored document access handling in tests to improve clarity and
maintainability.
- Added comprehensive tests for inherited share functionalities,
ensuring proper role and access management for subpages.
2025-07-08 16:31:57 +02:00
Nathan Panchout
510d6c3ff1 (frontend) enhance document sharing and visibility features
- Added a new component `DocInheritedShareContent` to display inherited
access information for documents.
- Updated `DocShareModal` to include inherited share content when
applicable.
- Refactored `DocRoleDropdown` to improve role selection messaging based
on inherited roles.
- Enhanced `DocVisibility` to manage link reach and role updates more
effectively, including handling desynchronization scenarios.
- Improved `DocShareMemberItem` to accommodate inherited access logic
and ensure proper role management.
2025-07-08 16:31:57 +02:00
Nathan Panchout
cab7771b82 (frontend) refactor document access API and remove infinite query
- Simplified the `getDocAccesses` function by removing pagination
parameters.
- Updated the `useDocAccesses` hook to reflect changes in the API
response type.
- Removed the `useDocAccessesInfinite` function to streamline document
access management.
2025-07-08 16:31:57 +02:00
Nathan Panchout
93d9dec068 (frontend) enhance document management types and utilities
- Updated the `Access` and `Doc` interfaces to include new properties
for role management and document link reach.
- Introduced utility functions to handle document link reach and role,
improving the logic for determining access levels.
- Refactored the `isOwnerOrAdmin` function to simplify role checks for
document ownership and admin status.
2025-07-08 16:31:57 +02:00
Anthony LC
adb15dedb8 ♻️(frontend) reduce props drilling
- Reduce proprs drilling
- Improve state rerendering with useIsCollaborativeEditable
2025-07-08 16:31:56 +02:00
Anthony LC
6ece3264d6 🔥(frontend) silent next.js error
The error modal since next.js 15 are quite intrusive.
We decided to hide them.
2025-07-08 16:31:56 +02:00
Nathan Panchout
2a3b31fcff (frontend) added new features for document management
- Created new files for managing subdocuments and detaching documents.
- Refactored API request configuration to use an improved configuration
type.
- Removed unnecessary logs from the ModalConfirmDownloadUnsafe
component.
2025-07-08 16:31:56 +02:00
Nathan Panchout
9a64ebc1e9 (frontend) added subpage management and document tree features
New components were created to manage subpages in the document tree,
including the ability to add, reorder, and view subpages. Tests were
added to verify the functionality of these features. Additionally, API
changes were made to manage the creation and retrieval of document
children.
2025-07-08 16:31:56 +02:00
Nathan Panchout
cb2ecfcea3 (frontend) Added drag-and-drop functionality for document management
Added a new feature for moving documents within the user interface via
drag-and-drop. This includes the creation of Draggable and Droppable
components, as well as tests to verify document creation and movement
behavior. Changes have also been made to document types to include user
roles and child management capabilities.
2025-07-08 16:31:56 +02:00
Nathan Panchout
13696ffbd7 (frontend) updated dependencies and added new packages
Added several new dependencies to the `package.json` file, including
`@dnd-kit/core`, `@dnd-kit/modifiers`, `@fontsource/material-icons`, and
`@gouvfr-lasuite/ui-kit`.
2025-07-08 13:58:43 +02:00
renovate[bot]
21624e9224 ⬆️(dependencies) update js dependencies 2025-07-07 19:27:46 +00:00
Anthony LC
50ce604ade 🐛(frontend) fix circular dependencies
Seems to have some circular dependencies appearing.
We will import what we need directly from the
feature instead of the parent docs index file.
2025-07-07 10:21:10 +02:00
Anthony LC
55979e4370 🛂(frontend) block edition only when not alone
We added a system to know if a user is alone
on a document or not. We adapt the
frontend to block the edition only
when the user is not alone on the document.
2025-07-07 10:21:09 +02:00
Manuel Raynaud
9a8f952210 🚩(back) use existing no websocket feature flag
An already existing feature flag
COLLABORATION_WS_NOT_CONNECTED_READY_ONLY was used bu the frontend
application to disable or not the edition for a user not connected to
the websocket. We want to reuse it in the backend application to disable
or not the no websocket feature.
2025-07-07 10:21:09 +02:00
Manuel Raynaud
b96de36382 (y-provider) add endpoint returning document connection state
We need a new endpoint in the y-provider server allowing the backend to
retrieve the number of active connections on a document and if a session
key exists.
2025-07-07 10:15:20 +02:00
Stephan Meijer
0be366b7b6 ♻️(frontend) support Bearer in servers/y-provider
Support passing API Token as Bearer in the Authorization-header.

Signed-off-by: Stephan Meijer <me@stephanmeijer.com>
2025-07-04 17:11:19 +02:00
Stephan Meijer
fde520a6f3 ♻️(frontend) raw payloads on convert endpoint
Accept raw payload on convert-endpoint and respond with raw Yjs payload

This change replaces Base64-encoded I/O with direct binary streaming,
yielding several benefits:
- **Network efficiency**: Eliminates the ~33% size inflation of Base64,
cutting bandwidth and latency.
- **Memory savings**: Enables piping DOCX (already compressed) buffers
straight to DocSpec API without holding, encoding and decoding multi-MB
payload in RAM.

Signed-off-by: Stephan Meijer <me@stephanmeijer.com>
2025-07-04 17:10:47 +02:00
Stephan Meijer
cef2d274fc ♻️(frontend) following HTTP standards on auth
Return 401 Unauthorized for missing/invalid API keys (per RFC 7235);
403 is reserved for valid-but-forbidden credentials.

Signed-off-by: Stephan Meijer <me@stephanmeijer.com>
2025-07-04 17:05:13 +02:00
Stephan Meijer
a9db392a61 ♻️(frontend) simplify Express middleware
Simplify the use of middleware in Express

Signed-off-by: Stephan Meijer <me@stephanmeijer.com>
2025-07-04 17:04:58 +02:00
Stephan Meijer
186ae952f5 (frontend) test successful conversion
Signed-off-by: Stephan Meijer <me@stephanmeijer.com>
2025-07-04 17:04:55 +02:00
Stephan Meijer
f3c9c41b86 (frontend) switch to vitest and enhance testability
Migrated from jest to vitest for server/y-provider, gaining faster runs,
esm-native support and cleaner mocking.

Signed-off-by: Stephan Meijer <me@stephanmeijer.com>
2025-07-04 17:04:28 +02:00
Anthony LC
fc1678d0c2 (frontend) Duplicate a doc
We can duplicate a document from the
tool options.
2025-07-03 11:23:55 +02:00
Anthony LC
2b2e81f042 ♻️(frontend) Simplify AGPL export pattern
We were maintaining two separate components
for AGPL and MIT license exports.
This commit consolidates the functionality into
a single component that handles both licenses,
simplifying the codebase and reducing duplication.
2025-07-02 15:06:37 +02:00
Stephan Meijer
c8ae2f6549 ♻️(backend) rename convert-markdown endpoint
Renamed the `convert-markdown` endpoint to `convert` as a
general-purpose conversion endpoint for integration with DocSpec
conversion (DOCX import), without altering its existing functionality.

In a future contribution, this endpoint will not only support conversion
from Markdown -> BlockNote -> Yjs but also directly BlockNote -> Yjs.

Signed-off-by: Stephan Meijer <me@stephanmeijer.com>
2025-07-02 14:49:02 +02:00
soyouzpanda
6c3850b22b (frontend) support _FILE environment variables for secrets
Allow configuration variables that handles secrets to be read from a
file given in an environment variable.
2025-07-01 10:47:55 +02:00
Anthony LC
388f71d9d0 (frontend) button access request on share modal
When a document is in public or connected mode,
users can now request access to the document.
2025-06-30 12:13:28 +02:00
Anthony LC
2360a832af (frontend) add access request on doc share modal
Add the access request to the document
share modal, allowing admin to see and manage
access requests directly from the modal interface.
2025-06-30 12:13:28 +02:00
Anthony LC
411d52c73b ♻️(frontend) improve separation of concerns in DocShareModal
Improve separation of concerns in the DocShareModal
component.
The member and invitation list are now
in a separate component.
It will help us to integrate cleanly the
request access list.
2025-06-30 12:13:28 +02:00
Anthony LC
878de08b1e (frontend) integrate doc access request
When a user is redirected on the 403 page,
they can now request access to the document.
2025-06-30 12:13:27 +02:00
Anthony LC
4ae757ce93 🔥(frontend) remove Beta from logo
Docs got homologated, so we can remove the beta
logo from the DSFR theme.
2025-06-27 18:22:59 +02:00
Anthony LC
95a55e7805 (e2e) reduce flakiness in e2e tests
Flakiness in e2e tests has been reduced by:
- Adding waits for media-check processing in image tests.
- Ensuring that slash menu resets are handled
correctly to avoid flakiness.
- Wait for the Download button to be stable before clicking
2025-06-27 16:50:10 +02:00
Anthony LC
00009ecc16 🔧(conf) add server to server api tokens to common
We have the e2e test "it creates a doc server way"
that is quite complicated to run locally, because
it requires the `DJANGO_SERVER_TO_SERVER_API_TOKENS`
environment variable to be set in "env.d/development/common".
We moved `DJANGO_SERVER_TO_SERVER_API_TOKENS` from
"env.d/development/common.e2e.dist" to
"env.d/development/common.dist", by doing so,
this variable will be set by default in the
"env.d/development/common" file, the test will now run
without any additional configuration.
2025-06-26 17:09:08 +02:00
Anthony LC
9b0676ec15 (jest) fix window.location mock
We upgraded to jest 30.0.3.
This upgrade updated jsdom and jsdom now do not
allows to mock window.location.
See: https://github.com/jsdom/jsdom/issues/3492
This commit fixes this issue.
2025-06-26 16:49:13 +02:00
Anthony LC
9f222bbaa3 ⬇️(dependencies) downgrade to docx 9.5.0
Prob compatibility issue with docx 9.5.1 and
BlockNote. We downgrade to 9.5.0 for now until
BlockNote is updated to support docx 9.5.1.
2025-06-26 16:47:51 +02:00
renovate[bot]
f0b253f0ff ⬆️(dependencies) update js dependencies 2025-06-26 12:14:34 +00:00