Commit Graph

108 Commits

Author SHA1 Message Date
Anthony LC
d0d0b44f57 💬(frontend) change site name to Docs
The site name was Impress, we change it to Docs.
2024-05-27 13:51:18 +02:00
Anthony LC
6e46b686ab 💄(frontend) change gouvernement logo
Change the gourvernement logo.
2024-05-27 13:51:18 +02:00
Anthony LC
38eabe2fc8 🛂(frontend) right pad delete
Manage the right on the pad delete.
If a use cannot delete a pad, we will not display
the delete button in the dropdown menu.
2024-05-27 10:20:20 +02:00
Anthony LC
effa77dc10 🛂(frontend) right pad update
Manage the right on the pad update.
If a use cannot update a pad, we will not display
the update button in the dropdown menu.
2024-05-27 10:20:20 +02:00
Anthony LC
d5d374c311 🛂(frontend) right pad editor
Manage the right on the pad editor.
If a use cannot edit a pad, the pad editor will
be read-only. It will not save automatically.
A message will be displayed to the user.
2024-05-27 10:20:20 +02:00
Anthony LC
f4146fbe4e 🚚(frontend) rename pad to pad-editor
Rename the pad feature to pad-editor.
2024-05-24 16:12:45 +02:00
Anthony LC
dce040f4c3 🚚(frontend) move types and pad api hooks
Move types and pad api hooks to pad-management.
2024-05-24 16:12:45 +02:00
Anthony LC
3a68c75feb 🚚(frontend) rename pads-create to pad-management
Rename the pads-create feature to pad-management.
This feature will not only create but gives tools
to update and remove pads as well.
2024-05-24 16:12:45 +02:00
Anthony LC
29577c0419 (frontend) remove document
We can now remove a document from a modal.
2024-05-24 16:12:45 +02:00
Anthony LC
2813b2ca27 (frontend) update document
We can now update a pad from a modal.
2024-05-24 16:12:45 +02:00
Anthony LC
996cea49b4 ♻️(frontend) add PDF generation inside a modal
Refacto the pad tools, we will use modals to handle
the different actions on the pad. We start by
implementing the PDF generation inside a modal.
2024-05-24 16:12:45 +02:00
Anthony LC
7aeea18202 🗃️(frontend) add initial pad to webrtcserver
It is the webrtc server that will be responsible
for managing the data of the BlockNote Editor.

So to restore the data of a saved pads, we have to
add the initial pad to the room of the webrtc
server, it will then update the data of BlockNote
Editor.
The webrtc server accept Y.Doc, so we
convert our base64 data from Minio to make it
compatible with the server.

By doing so, we avoid the problem of
data lost when multiple users are connecting
and one user already updated the data of the
BlockNote Editor before saving it.
2024-05-24 10:27:34 +02:00
Anthony LC
64d508c260 (frontend) pad persistance
This commit manage the persistance of the pad.
We save the pad in different ways:
- when the user close the tab or the browser
- when the user leave the page (go to another pad
  by example)
- every 1 minute
----
- We save the pad only if the pad has been modified.
- Pads are collaborative, to not save multiple
  times the same pad, we save the pad only if
  the user is the last to have modified the pad.
----
Because of the collaborative aspect of the pads,
the best way to store our pad is to save the
Y.Doc, to do so the recommended way is to convert
the Y.Doc to a Uint8Array and then to a string
(base64). Our pad are saved as a string in a
object in a Minio bucket.
2024-05-24 10:27:34 +02:00
Anthony LC
d75649d18a 🏷️(frontend) adapt some types
Adapt some pad types.
2024-05-24 10:27:34 +02:00
Anthony LC
a851720441 (frontend) create useUpdatePad react query hook
Create a react query hook to update a pad.
PATCH /documents/:id
2024-05-24 10:27:34 +02:00
Anthony LC
29f13f5f4b 🚨(frontend) stop throwing errors on id pages
We stopped throwing errors on id pages, often
Next.js just need a rerender to get the id
from the router correctly.
2024-05-24 10:27:34 +02:00
Anthony LC
644920e732 (frontend) coming soon
Add a coming soon page bind to the
docs.numerique.gouv.fr domain.
2024-05-23 10:44:52 +02:00
Anthony LC
004a4edfe7 (frontend) add logout button
Rework the header based on latest Johann's design, which introduced a
dropdown menu to manage user account.

In this menu, you can find a logout button, which ends up the backend
session by calling the logout endpoint. Please that automatic redirection
when receiving the backend response were disabled. We handle it in our
custom hook, which reload the page.

Has the session cookie have been cleared, on reloading the page, a new
loggin flow is initiated, and the user is redirected to the OIDC provider.
2024-05-22 16:08:41 +02:00
Anthony LC
9903b43b72 ♻️(app-desk) change header html structure
Change the html structure of the header
component to be more aligned.
Remove dummy profil picture.
2024-05-14 16:12:36 +02:00
Anthony LC
d23426679a 🐛(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.
2024-05-14 16:12:36 +02:00
Anthony LC
e2e34a011d (app-impress) add La Gaufre
Add La Gaufre.
It is a button to access easily to the
La Suite products.
2024-05-14 16:12:36 +02:00
Anthony LC
c1dd34512b 🚸(app-impress) footer legales pages
- Add legales pages.
- Add links to the footer for the new pages.

Legales pages are based from
https://lasuite.numerique.gouv.fr/
2024-05-14 11:57:19 +02:00
Anthony LC
88d6d8977c (app-impress) add footer
Add footer to the impress app.
2024-05-14 11:57:19 +02:00
Anthony LC
4ffcf164d8 💄(app-impress) lighter border pad editor
Make border pad editor a bit lighter.
2024-05-14 11:04:45 +02:00
Anthony LC
c25814b060 ♻️(app-impress) add transition props Box component
Add transition props to Box component.
2024-05-14 11:04:45 +02:00
Anthony LC
f88d625622 💄(app-impress) move title document to the top
Move teh title document to the top of the pad editor.
We let the white card only for the pad content.
2024-05-14 11:04:45 +02:00
Anthony LC
a26ee3b868 💬(app-impress) replace recent with documents
Replace Recent literal by Documents.
2024-05-14 11:04:45 +02:00
Anthony LC
c0d919ae52 💄(app-impress) re-design icon close panel
We deleted the menu, so we have to retouch
a bit the icon close panel to fit the new design.
We change the icon to have something more
intuitive by using material icons.
2024-05-14 11:04:45 +02:00
Anthony LC
944385c83f 🔥(app-impress) remove menu
For the moment we only have 1 menu item,
so we can remove the menu.
2024-05-14 11:04:45 +02:00
Anthony LC
ccb6d4cb91 (app-impress) add @blocknote/mantine
The new version of blocknote dissociates
the ux from the @blocknote/react package.
It is now in a separate package @blocknote/mantine.
We add this package to the impress app.
We adapt the toolbar to fit the new package.
2024-05-13 17:21:58 +02:00
renovate[bot]
5853adb8eb ⬆️(dependencies) update js dependencies 2024-05-13 17:21:58 +02:00
Anthony LC
f0b3090a73 ♻️(frontend) frontend environment free
Until now, the front had to know at build time
the url of the backend and the webrtc server
to be able to communicate with them.
It is not optimal because it means that we need
multiple docker image (1 per environment) to have
the app working, it is not very flexible.

This commit will make the frontend "environment free"
by determining these urls at runtime.
2024-05-13 11:04:06 +02:00
Anthony LC
88109623ba ♻️(app-desk) replace classname spacings
Replace the classname spacings with the new
spacing system based on props.
2024-05-03 15:47:36 +02:00
Anthony LC
d8e7f29072 🎨(app-desk) add margin and padding to Box
Add margin and padding system to Box component.
It proposes the autocompletion.
It is bind with the Cunninghams spacing system.
2024-05-03 15:47:36 +02:00
Anthony LC
5fbb5106a9 🔥(backend) remove code_editor field
code_editor field was removed from the backend.
This filed was used to store the code editor to
generate templates.
2024-05-02 15:24:51 +02:00
Anthony LC
d967896874 🔥(app-impress) remove templates
We will generate the templates internally.
We remove the template editor.
2024-05-02 15:24:51 +02:00
Anthony LC
b98cc01592 🚚(app-impress) move templates api to pad-tools
Before removing the templates feature, we move the
necessary api to the pad feature.
2024-05-02 15:24:51 +02:00
Anthony LC
d9fa75b764 ⬇️(frontend) react 18.3.1 -> 18.2.0
Downgrade react to 18.2.0.
It seems to have a compatibility issue
with @openfun/cunningham-react.
2024-04-29 15:21:25 +02:00
Anthony LC
33b39ce315 ⬇️(eslint-config-people) eslint 9.0.0 -> 8.57.0
Downgrade eslint to 8.57.0.
9.0.0 has breaking changes, the adoption
is still very low, better to wait.
Add it in the renovate.json file.
2024-04-29 15:21:25 +02:00
renovate[bot]
f5ddce6b47 ⬆️(dependencies) update js dependencies 2024-04-29 15:21:25 +02:00
Anthony LC
89aa048fc1 🐛(app-desk) force redirect on resources/[id]
When we use the static mode, Next.js want that we
build our resource pages at build time. But we can't
do that because users can create a resource at runtime.

So we redirect thanks to ngnix when we see that
a resource page is not found.
2024-04-19 13:38:28 +02:00
Anthony LC
b2cc789665 ️(docker) separate deps y-webrtc-signaling
We separate the install part of the signaling server
from the frontend-dep stage. It will improve
the build time of both of them.
2024-04-19 13:38:28 +02:00
Anthony LC
9489264555 🔥(eslint) remove uneeded yarn.lock file
The yarn.lock doesn't seem necessary for this
package, so we're removing it.
Update the frontend yarn.lock
2024-04-19 13:38:28 +02:00
Anthony LC
e1b94e3443 🌐(app-impress) translate impress in french
Add french translation to impress.
2024-04-19 13:38:28 +02:00
Anthony LC
90c8338a59 🛂(app-impress) allow writing permission on editor
allow writing permission on editor when we are not
the owner to test the POC.
2024-04-19 13:38:28 +02:00
Anthony LC
bbafce64e7 🐛(app-impress) refresh when multiple Blocknote
When multiple blocknote were created, the editor
didn't display the content of the selected blocknote
but the content of the last blocknote with a new
provider.
We were actually storing the editor, so if the
editor is stored already, we serve it instead of
creating a new one.
2024-04-19 13:38:28 +02:00
Anthony LC
e901103c8b 🔨(Tilt) add y-webrtc-signaling
Add docker_build config to build y-webrtc-signaling.
2024-04-19 12:41:06 +02:00
Anthony LC
f3f5f190a5 🚀(helm) webrtc helm chart
Make the webrtc helm chart.
The webrtc server is a simple websocket server
that forwards messages between clients.
The server uses the port 443 and the protocol wss.
local_url: wss://impress.127.0.0.1.nip.io/ws
2024-04-19 12:41:06 +02:00
Anthony LC
2dc2341052 🚚(docker) move frontend docker config
Move frontend docker config to
src/frontend/Dockerfile.
2024-04-19 12:41:06 +02:00
Anthony LC
0575c0f086 (app-impress) can duplicate template
Template with mode "is_public" are not editable, except
for the owner. We give the possibility to duplicate a
template, so that the user can edit the new one.
2024-04-18 18:13:59 +02:00