Commit Graph

252 Commits

Author SHA1 Message Date
Anthony LC
c2aa5be8ff 🧑‍💻(frontend) env var service-worker dev mode
Add a new environment variable to enable or disable
the service worker in development mode.
By default, the service worker is disabled
in development mode, it can cause problems
when developing the application with the hmr.
It can creates useless log in the console
as well.
We can easily enable it by setting
NEXT_PUBLIC_SW_DEACTIVATED to false in the
.env.development file.
We will use this new var to not use the service
worder with the CI as well.
2024-06-28 11:07:21 +02:00
Anthony LC
3b77e1254e 🔥(frontend) remove grapesjs dependencies
Some grapesjs dependencies were still present.
We don't use these anymore, so we can remove them.
2024-06-27 12:42:52 +02:00
Anthony LC
b436a418ff ⬆️(frontend) upgrade react to 18.3.1
A recent upgrade of next.js fixed the compatibility
issue with react 18.3.1.
2024-06-27 12:42:52 +02:00
Anthony LC
9fdf87b100 ⬇️(frontend) downgrading fetch-mock to 9.11.0
fetch-mock released the version 10, but it is
causing some issues with jest because of
esm support.
2024-06-27 12:42:52 +02:00
renovate[bot]
6943f2158a ⬆️(dependencies) update js dependencies 2024-06-27 12:42:52 +02:00
renovate[bot]
872cc8c110 ⬆️(dependencies) update requests to v2.32.2 [SECURITY] 2024-06-27 11:04:34 +02:00
Anthony LC
c03e1ffe8b 💄(frontend) change docs logo
Change the docs logo to a more accurate one.
2024-06-25 15:38:40 +02:00
Anthony LC
5454da5c70 ✏️(frontend) change all occurences of pad to doc
The initial doc was named pad in reference to
the "NotePad de l'Etat", but we renamed it
doc to clearly dissociate the 2 sites.
Doc is also a small reference of google doc.
2024-06-25 15:07:36 +02:00
Anthony LC
5b3c91f6dd 🌐(app-impress) translate impress in french
Add french translation to impress.
2024-06-25 13:47:56 +02:00
Anthony LC
f1ac0954ed 🧑‍💻(i18n) run automatically prettier after import
After an import the translation file is now
automatically formatted with prettier.
2024-06-25 13:47:56 +02:00
Anthony LC
fc80c2ec2a 🌐(pages) translate legal pages to english
They should be translated to French using the i18n tooling and not
directly in the code.
2024-06-25 13:47:56 +02:00
renovate[bot]
8ba64322be ⬆️(dependencies) update ws to v8.17.1 [SECURITY] 2024-06-24 12:29:30 +02:00
Anthony LC
ae9555284d (e2e) remove some flakiness
Service worker added some flakiness, we
activate the sw only if not from the CI.
We add as well the email of the user added in a
doc to the toast message. This way we can check
if the user was added correctly, this will remove
some flakiness in some tests.
2024-06-14 12:26:04 +02:00
Anthony LC
14a91a5698 🐛(frontend) mismatch between yjs dependency
Mismatch between yjs dependency, we set the
dependency globally to not have this problem
anymore.
2024-06-14 12:26:04 +02:00
Anthony LC
9f6dac53d4 (frontend) add offline mode support
Add a offline mode support from a service worker.
The service worker will cache the assets and the
visited pages to be able to work offline.
Created a fallback page for when the user is offline
and tries to access a page that is not cached.
2024-06-14 12:26:04 +02:00
Anthony LC
5ba35dbc1d ♻️(frontend) improve the ui error and message info ui
Improve the ui error and message info ui:
- Can use a icon in TextErrors component
- use mode the Alert component to display message info
2024-06-14 11:50:13 +02:00
Anthony LC
62098ec753 🐛(frontend) fix bug multi ws connection
In collaborative mode, only the first document
connected was being shared. This was due to the
fact that the webrtc server was managing only
one connection at a time. This commit fixes this
bug by managing multiple connections.
2024-06-13 12:20:23 +02:00
Jacques ROUSSEL
9e318f88be 🐛(CI) improve submodule
- remove deplucate declaration
- simplify helmfile
- use symlink
2024-06-11 10:40:39 +02:00
Anthony LC
63b565e720 💄(frontend) max img width with container width
The img could be much bigger than the page width
in a generated pdf. We limit the max img width
to the container width.
2024-06-10 13:28:38 +02:00
Anthony LC
e7fe153a81 🐛(frontend) fix break line on firefox
On firefox with collaborative mode, the last
upgrade of ProseMirror added a new line when
a another user was typing. This commit fixes this
issue.
2024-06-10 13:28:38 +02:00
Anthony LC
8e0850b13e 🐛(app-desk) fix fetchPriority warning
The upgrade to react@18.3.1 has a compatibility
issue with next@14.2.3. It creates a error warning
about the fetchPriority prop. This commit fixes the
issue by downgrading react to 18.2.0 as it was
before the last upgrade.
The next.js team is already aware of the issue and
it will be fixed in the next release.
2024-06-10 13:28:38 +02:00
Anthony LC
8fb18ed186 (frontend) add "@testing-library/dom
Recent update of @testing-library/react requires
@testing-library/dom to be installed as well.
2024-06-10 13:28:38 +02:00
renovate[bot]
bec6ff3d22 ⬆️(dependencies) update js dependencies 2024-06-10 13:28:38 +02:00
Anthony LC
0571aaabce ️(CI) improve docker build cache
Improve the caching by using docker buildx,
it should speed up the build process by using the
cache from the previous build.
2024-06-07 15:01:47 +02:00
Jacques ROUSSEL
e4bed84343 🐛(CI) fix ci issue
- fix get secret in ci
2024-06-07 14:05:51 +02:00
Jacques ROUSSEL
37f02893ed 🐛(CI) purge secret from repository
- Remove *.enc.*
- Adapt helmfile
- Adapt CI
2024-06-07 10:11:19 +02:00
Anthony LC
4e4e2e23e3 ️(e2e) unique login between tests
We will cache the login token in the browser
storage and reuse it between tests.
This will speed up the tests and reduce the
load on the server.
2024-06-06 22:31:43 +02:00
Anthony LC
b68015852c 🔊(changelog) add recents changes
Add some recents changes:
- (frontend) manage members (update role / list / remove)
- (frontend) change logo
- (frontend) pdf has title doc
- Fix the break line when generate PDF
2024-06-06 16:09:07 +02:00
Anthony LC
2f79d03acc ⬇️(frontend) downgrade @testing-library/react@16.0.0
downgrade @testing-library/react@16.0.0 to
@testing-library/react@15.0.7.

Some modules are not available in the latest
version, their documentation is not available yet.
2024-06-06 16:09:07 +02:00
Anthony LC
8762a7bc92 ♻️(frontend) adapt BlockNote to the last version
A recent relase of the BlockNote component
has changed the way it is used. This commit
adapts the BlockNoteEditor and BlockNoteToolbar
components to the new version of the BlockNote.
2024-06-06 16:09:07 +02:00
Anthony LC
589b0eab32 🐛(app-desk) fix fetchPriority warning
The upgrade to react@18.3.1 has a compatibility
issue with next@14.2.3. It creates a error warning
about the fetchPriority prop. This commit fixes the
issue by downgrading react to 18.2.0 as it was
before the last upgrade.
The next.js team is already aware of the issue and
it will be fixed in the next release.
2024-06-06 16:09:07 +02:00
renovate[bot]
44f4a37814 ⬆️(dependencies) update js dependencies 2024-06-06 16:09:07 +02:00
Anthony LC
6c76f7faab ♻️(frontend) improve html for pdf
Blocknote json to html is not perfect, so we need
to improve it to provide a better html for
the pdf generation.
It is the first step to improve the html,
we will continue to improve it in the future.
We have now the break line.
It is e2e tested so if blocknote change the conversion
we will know it.
2024-06-06 12:43:25 +02:00
Anthony LC
201d776d1b ♻️(frontend) doc title as title for pdf export
Our pdf export was named impress-document.pdf,
now it is named after the document title.
We sanitize the title by removing special characters,
replacing spaces with underscores and putting it
in lowercase.
2024-06-06 12:43:25 +02:00
Anthony LC
e7f2317b41 ♻️(backend) simplify the template
For the first version, we will use a simple template.
Only the gouv logo will be displayed.
2024-06-06 12:43:25 +02:00
Anthony LC
206c7f11ae (e2e) flaky saves the doc when we quit pages
Stop to check "saves the doc when we quit pages"
with webkit browser. It is flaky.
2024-06-06 12:43:25 +02:00
Anthony LC
615f92ded3 💄(frontend) change logo with the pad one
Change the logo with the pad one.
2024-06-06 12:43:25 +02:00
Anthony LC
da3ad91283 ♻️(frontend) add api versionning per request
We were using the version of the api from the
.env file, but we could have different versions
of the api in the same app. So we now use the
version from the request.
2024-06-06 12:43:25 +02:00
Anthony LC
197b16c5d0 (frontend) add modal to delete a member
Add modal to delete a member.
2024-06-05 21:50:30 +02:00
Anthony LC
cce0331b68 (frontend) add modal to update role of a member
Add modal to update role of a member.
2024-06-05 21:50:30 +02:00
Anthony LC
380ac0cbcf (frontend) add members grid
Add members grid to display all members
of a doc and their roles.
2024-06-05 21:50:30 +02:00
Anthony LC
1779b7bab4 🏷️(frontend) adapt accesses types
We updated the types of the accesses to
get more information about the accesses.
2024-06-05 21:50:30 +02:00
Anthony LC
7b5698a370 👔(backend) object user on DocumentAccessSerializer
user field was displaying the userid, but we
need to return the user object on the
DocumentAccessSerializer, so we can show the
user email on the frontend.
We add the user_id field in write_only mode, so
we can keep create and update.
2024-06-05 21:50:30 +02:00
Anthony LC
f039b2aa3b 🌐(frontend) legal pages translatable
Makes the legal pages translatable.
2024-06-05 10:37:02 +02:00
Anthony LC
8531e0dd08 🐛(i18n) comma in keys
Having a comma in the keys broke the parser.
This commit allows the comma in keys.
2024-06-05 10:37:02 +02:00
Anthony LC
e2586b1d8e 🚚(frontend) move to members/members-add
Move addUsers to members/members-add.
Rename some of the occurences of user to member.
2024-05-31 11:51:29 +02:00
Anthony LC
327a5f2ed4 🤡(demo) generate dummy user
To search users we need to have some dummy data users.
We add some dummy users when we run the `make demo`
command.
2024-05-31 11:51:29 +02:00
Anthony LC
1e62320803 💚(app-desk) add template mail for e2e
The tests e2e need the mail template to
send the invitation to the user.
We are now caching the mail template instead
of using a artifact, thanks to that we can
build only the mail template if the cache is
invalidated, so we save time and resources.
2024-05-31 11:51:29 +02:00
Anthony LC
ff7341e544 (frontend) improve some tests
Improve some tests to check the states depend
the user's role.
2024-05-31 11:51:29 +02:00
Anthony LC
038c3d6207 🧑‍💻(mail) make commands windows friendly
Make the commands windows friendly.
2024-05-31 11:51:29 +02:00