Commit Graph

1014 Commits

Author SHA1 Message Date
lebaudantoine
2a7ffff96d ️(frontend) prevent authentication retry on 401 responses
Stop retry attempts when receiving 401 Unauthorized from /me endpoint since
this clearly indicates authentication status. The original purpose of the /me
call is simply to determine if user is authenticated, and a 401 provides
sufficient information.

Prevents unnecessary network requests caused by React Query's automatic retry
behavior when re-raising exceptions, which was hiding the 401 status. Improves
performance and reduces server load during authentication failures.
2025-06-24 15:46:48 +02:00
Manuel Raynaud
c7261cf507 🔧(front) configure x-frame-options to DENY in nginx conf (#1084)
The API has the response header x-frame-options configure to DENY and
nothing is configure in the nginx configuring managing the frontend
application. We want to have the same value. The header is added on all
locations.
2025-06-19 15:36:57 +02:00
Manuel Raynaud
05db9c8e51 🤡(demo) change dev users email to remove invalid domain extension
The domain extension (.e2e) used in the demo for users are not validated
anymore by the django EmailValidator. We have to change it to a valid
one.
2025-06-17 13:35:41 +02:00
Manuel Raynaud
7ed33019c2 ⬆️(back) upgrade django to version 5.2
Django 5.2 is now mature enough and we can use it in production.
In some tests the number of sql queries is increasing. This is because
the `full_clean` method called in the `save` method on all our models is
creating a transaction, so a savepoint and release is added.
We also fix deprecated warning in this commit.
2025-06-17 12:20:19 +02:00
Samuel Paccoud
a99c813421 📌(yjs) stop pinning node to minor version on yjs docker image (#1005)
We want to build the yjs Docker image with the latest minor version in
order to avoid outdated images.
2025-06-17 09:43:05 +00:00
Jacques ROUSSEL
a83902a0d4 🚸(helm) improve helm chart
Our Helm chart wasn't suitable for use with Helm alone because jobs
remained after deployment. We chose to configure ttlSecondsAfterFinished
to clean up jobs after a period of time.
2025-06-16 16:05:48 +02:00
renovate[bot]
080f855083 ⬆️(dependencies) update python dependencies 2025-06-16 03:24:19 +00:00
Anthony LC
90d94f6b7a ⬆️(frontend) Bump brace-expansion
Bumps [brace-expansion](https://github.com/juliangruber/brace-expansion)
from 2.0.1 to 2.0.2.
Bumps [brace-expansion](https://github.com/juliangruber/brace-expansion)
from 1.1.11 to 1.1.12.

Signed-off-by: dependabot[bot] <support@github.com>
2025-06-13 15:30:04 +02:00
Manuel Raynaud
4fbbead405 🧑‍💻(compose) build and run y-provider in dev mode
To have a better developer experience, the y-provider service run in dev
mode, allowing hot reload when a file is modified. To avoid issue with
shared node_modules, they are mounted in a separated volume to not have
then in the local directory.
2025-06-13 10:38:53 +02:00
Appryll
4fc49d5cb2 ️(frontend) Set page titles for 403 and 404 errors
Set the page titles for the 403 and 404 error
pages to improve user experience and accessibility.
2025-06-11 16:36:53 +02:00
Anthony LC
0fd16b4371 💄(frontend) add spacing bottom on editor
We add spacing bottom on editor to
avoid the last editing line being to close to
the bottom.
2025-06-11 13:08:33 +02:00
Manuel Raynaud
afbb4b29dc 🩹(backend) default CORS_ALLOW_ALL_ORIGINS to False
The settings CORS_ALLOW_ALL_ORIGINS was set to True by default.

This error is inherited from a old mistake made back in the days while
working on the initial impress demo.

This is not something we want, this should be only allowed in
development. We change the value in all the manifests in order to have
the desired behavior in non development environments.
2025-06-11 09:55:28 +00:00
Anthony LC
db63ebd0c8 🐛(frontend) fix meta title
The meta title was flickering, it was adding the
doc title, then it was coming back to the default
title.
This was due to the way the next Head component
render data.
We now use a more stable way to set the title.
2025-06-11 10:21:53 +02:00
Anthony LC
c5f018e03e 💄(frontend) adapt some style
- editor block padding only when background
- increase icon shadow grid
2025-06-11 10:03:32 +02:00
Anthony LC
1c93fbc007 🐛(frontend) fix multiple EmojiPicker
emoji-mart is used to display emojis in the editor.
It is used by the callout block and by
Blocknotes editor. The problem is that the emoji-mart
is a singleton, so if Blocknotes components init
the emoji-mart first, the picker in the callout block
will not display correctly.
This commit fixes the issue by initializing
the emoji-mart in the callout block first.
2025-06-11 10:03:32 +02:00
Anthony LC
d811e3c2fc 🐛(frontend) table of content disappearing
The table of content was disappearing when the user
was looking the version history then came back to
the main document.
This commit fixes this issue.
2025-06-11 09:45:42 +02:00
Anthony LC
fe5fda5d73 ✏️(project) fix typo
Fix and improve typos in the codebase.
2025-06-11 09:10:22 +02:00
renovate[bot]
ce329142dc ⬆️(dependencies) update python dependencies 2025-06-10 07:58:32 +00:00
renovate[bot]
f8cff43dac ⬆️(dependencies) update requests to v2.32.4 [SECURITY] 2025-06-10 07:35:04 +00:00
renovate[bot]
f5b2c27bd8 ⬆️(dependencies) update django to v5.1.10 [SECURITY] 2025-06-06 17:21:22 +00:00
Anthony LC
62433ef7f1 ♻️(i18n) adapt script to major upgrade of yargs
"yargs" dependency has been updated to version 18.0.0,
which causes breaking changes in the script.
2025-06-05 10:58:59 +02:00
Anthony LC
bc0824d110 🚨(frontend) fix linter warning react-query
React-query change the types of some methods, which causes
linter warnings. This commit updates the affected methods
to match the new types.
2025-06-05 10:46:53 +02:00
Anthony LC
d12f942d29 ⬆️(project) bump project to node 22
"yargs" dependency requires node 22, so we
update the project to use it.
Node 22 is the latest LTS version, so this is a
good time to do it.
2025-06-05 10:46:53 +02:00
renovate[bot]
62f85e7d24 ⬆️(dependencies) update js dependencies 2025-06-05 10:46:53 +02:00
rvveber
94e99784f3 (tests) Add & adapt language tests
- Language will only be changed if different from current language
- Added test for custom translations

Signed-off-by: Robin Weber <weber@b1-systems.de>
2025-06-03 17:35:52 +02:00
rvveber
fa83955a77 ♻️(frontend) Refactor language-related code
- Refactors "useTranslationsCustomizer" to "useCustomTranslations"
- Refactors "useLanguageSynchronizer" to "useSynchronizedLanguage"
- Refactors "LanguagePicker" to better reflect its component role
- Refactors "LanguagePicker" to use "useSynchronizedLangue"
- Removes unused "useChangeUserLanguage"
- To change the user language, use "useAuthMutation" instead

Signed-off-by: Robin Weber <weber@b1-systems.de>
2025-06-03 17:35:52 +02:00
rvveber
5962f7aae1 ♻️(frontend) Separate mutations from queries for auth logic
Introduces dedicated mutations
(for authentication/user operations)
separating them from queries to align with best practices
for data fetching and state management.

Queries remain responsible for READ operations, while mutations
now handle CREATE, UPDATE, and DELETE actions (for user data)
improving separation of concerns.

Signed-off-by: Robin Weber <weber@b1-systems.de>
2025-06-03 17:35:52 +02:00
rvveber
dc06315566 📝(documentation) adds customization for translations
Part of customization PoC

Signed-off-by: Robin Weber <weber@b1-systems.de>
2025-06-03 17:35:52 +02:00
rvveber
f4ad26a8fa (frontend) Adds customization for translations
Part of customization PoC

Signed-off-by: Robin Weber <weber@b1-systems.de>
2025-06-03 17:35:52 +02:00
renovate[bot]
d952815932 ⬆️(dependencies) update python dependencies 2025-06-02 05:09:03 +00:00
renovate[bot]
cde64ed80a ⬆️(dependencies) update js dependencies 2025-05-26 06:39:40 +00:00
renovate[bot]
cfd88d0469 ⬆️(dependencies) update python dependencies 2025-05-26 01:55:36 +00:00
Anthony LC
393e7a06e2 🔖(minor) release 3.3.0
Added:
- (backend) add endpoint checking media status
- (backend) allow setting session cookie age via env var
- (backend) allow theme customnization using a
configuration file
- (frontend) Add a custom callout block to the editor
- 🚩(frontend) version MIT only
- (backend) integrate maleware_detection from django-lasuite
- 🏗️(frontend) Footer configurable
- 🩺(CI) add lint spell mistakes
- (frontend) create generic theme
- 🛂(frontend) block edition to not connected users
- 🚸(frontend) Let loader during upload analyze
- 🚩(frontend) feature flag on blocking edition

Changed:
- 📝(frontend) Update documentation
- (frontend) Improve tests coverage
- ⬆️(docker) upgrade backend image to python 3.13
- ⬆️(docker) upgrade node images to alpine 3.21

Fixed:
- 🐛(y-provider) increase JSON size limits for
transcription conversion

Removed:
- 🔥(back) remove footer endpoint
2025-05-23 11:41:24 +02:00
AntoLC
f1af87baf8 🌐(i18n) update translated strings
Update translated files with new translations
2025-05-23 11:41:24 +02:00
Anthony LC
f851ef2d85 ⬆️(dependencies) bump blocknote to 0.30.1
A bunch of fixes are in this pacth release.
Better to update now before we release to 3.3.0.
2025-05-23 11:08:07 +02:00
Anthony LC
252ab6a586 ✏️(frontend) change antivirus fail sentence
The message was not accurate when the analizer failed.
We improved the message to be more accurate.
2025-05-23 11:08:07 +02:00
Anthony LC
cf2a02c8de 🚩(frontend) feature flag on blocking edition
If users were not connected to the collaboration
server, they were not be able to edit documents.

We decided to add a feature flag on this feature
as it can be quite restrictive.
We can now enable or disable this feature at runtime
thanks to the env variable
"COLLABORATION_WS_NOT_CONNECTED_READY_ONLY".
2025-05-23 11:08:07 +02:00
Anthony LC
d87a2ed4eb 🔥(helm) remove useless footer config
Remove:
- FRONTEND_FOOTER_FEATURE_ENABLED
- FRONTEND_FOOTER_URL
2025-05-22 15:27:39 +02:00
Anthony LC
c9d053d1c0 💄(frontend) add generic favicon
The favicons were still with the dsfr color.
We added the generic favicon in the assets folder.
The favicon can be a url loaded from the theme,
so when Drive will be running, we will be able
to store the dsfr favicons there, and remove them
from the repo.
2025-05-22 15:27:38 +02:00
Anthony LC
b5f0f06ea3 💄(frontend) desaturate images system for generic theme
We want to desaturate the images system in the
generic theme to make them less colorful and more
in line with the overall theme.
We added a special class to the images
that need to be desaturated. Other property
then desaturated can be apply depending on the theme.
2025-05-22 15:27:38 +02:00
Anthony LC
36b0ff9f63 (frontend) create generic theme
By default Docs will not be on the dsfr theme but
on the generic theme. La Gaufre is part of the dsfr
theme and is removed from the generic theme.
Same for the "beta" keyword and the "proconnect"
buttons.
2025-05-22 15:27:38 +02:00
Anthony LC
7a383957a7 🔥(frontend) remove legal pages
Legal pages are not needed anymore in the application.
In the dsfr instances, the legal pages will be
displayed on a Docs pages.
We let the users of Docs managing the legal pages
on their own instances.
2025-05-22 14:07:41 +02:00
Anthony LC
b5630359ee 🏗️(frontend) Footer configurable
To have different footer per instance the
content of the footer is now configurable
from the theme customization file.

See THEME_CUSTOMIZATION_FILE_PATH env var.
2025-05-22 14:07:41 +02:00
Anthony LC
310154815b ♻️(e2e) improve config testcases
Improve config testcases:
- let THEME_CUSTOMIZATION_FILE_PATH to be set to
check the default value
- add helper function overrideConfig
2025-05-22 14:07:41 +02:00
Anthony LC
2733785016 🚨(linter) add ignore pattern on no-unused-vars rule
The rule @typescript-eslint/no-unused-vars didn't
have a ignore pattern. A ignore pattern can be
usefull in some cases.
2025-05-22 14:07:41 +02:00
Manuel Raynaud
99ba414d88 🔧(back) add docs.security to logging settings
In the malware_detection callback we are using a different logger named
docs.security. We want to configure a logger in the logging settings
handling it.
2025-05-22 13:53:27 +02:00
Manuel Raynaud
41631b5b70 ⬆️(backend) upgrade django-lasuite to version 0.0.9
We need version 0.0.9 to reduce the time to have a JCOP analysis result.
2025-05-22 13:53:27 +02:00
Anthony LC
6ca654bf1a 🚸(frontend) let loader until resource ready
The backend can analyze the upload file, this take
time, so we need to show a loader
until the backend finish the analysis.
2025-05-22 13:53:27 +02:00
Manuel Raynaud
074585337b ♻️(back) return the media-check url on the attachment_upload response
We want to have the media-check url returned on the attachment-upload
response instead of the media url directly. The front will know the
endpoint to use to check the media status.
2025-05-22 13:39:44 +02:00
Manuel Raynaud
f1b398e1ae (back) add endpoint checking media status
With the usage of a malware detection system, we need a way to know the
file status. The front will use it to display a loader while the analyse
is not ended.
2025-05-22 13:39:44 +02:00