Commit Graph

689 Commits

Author SHA1 Message Date
Samuel Paccoud - DINUM
130e7a8c99 (documents) allow retrieving versions (list and detail)
Versions are retrieved directly from object storage and served on API
endpoints. We make sure a user who is given access to a document will
only see versions that were created after s.he gained access.
2024-05-13 12:12:52 +02:00
Samuel Paccoud - DINUM
8e262da8f5 (documents) add content field as an S3 object
The content field is a writable property on the model which is persisted
in object storage. We take advantage of the versioning, robustness and
scalability of S3.
2024-05-13 12:12:52 +02:00
Samuel Paccoud - DINUM
4956beb040 (docker-compose) add minio for object storage
We will need object storage to store our document content which comes
as a big json object. Storing it in object storage will offer us
versioning, robustness and scalability.
2024-05-13 12:12:52 +02:00
Samuel Paccoud - DINUM
397b9efbce (models/api) add document model and API
We do this by making copies of existing Template and TemplateAccess
models and API. A little refactoring is done to try to limit duplicate
code.
2024-05-13 12:12:52 +02:00
Jacques ROUSSEL
7c6e48975d 💚(ci) improve local deployment with tilt
Change the way we start django app in order to be abble to use django
admin on local deployment
2024-05-13 11:15:43 +02:00
Anthony LC
f0a4de361e 👷(helm) command createsuperuser
We sometimes need a superuser in the Django
application, to fix eventual db issues.
This commit adds a superuser on the pods.
2024-05-13 11:15:43 +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
Jacques ROUSSEL
0c2d097d8d 💚(ci) improve secrets for k8s deployment
Avoid secrets to be visible from running deployments
2024-05-02 16:06:58 +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
c7a5b5f3fb 🤡(backend-demo) remove code_editor from demo
We removed the template code_editor from app, so
we redapt the demo to fit the old template.
The field code_editor is not needed anymore.
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
renovate[bot]
8d48ded46b ⬆️(dependencies) update gunicorn to v22 [SECURITY] 2024-04-29 10:53:14 +02:00
Jacques ROUSSEL
f9bec19c7d 🐛(ci) improve docker-hub
Avoid to notify argocd for nothing
2024-04-29 10:29:56 +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
895aaff2d3 📝(readme) steps to start frontend
Define the steps to start the frontend in
development mode.
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
c2fb55506d 🧱(docker) dockerhub lasuite/impress-y-webrtc-signaling
Add the signaling server to dockerhub.
We create a special image for the signaling server,
it will be easier for scaling and maintenance.
2024-04-19 12:41:06 +02:00
Anthony LC
428cd74366 🚚(k8s) move tilt config to bin
Move tilt config to bin directory
to keep the root directory clean.
Add makefile cmd about k8s.
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
Anthony LC
35d500c08b 👔(backend) display css and code in template endpoint
We would like to duplicate a template from the frontend.
For that we need to access the css and code of the template.
So we add the css and code to the template endpoint.
2024-04-18 18:13:59 +02:00
Anthony LC
bf83bf99b3 ♻️(app-impress) create TemplateTools component
A component that will be used to display
the tools for the template editor.
2024-04-18 18:13:59 +02:00
Anthony LC
964efe4c2f 💄(app-impress) simplify the template builder
Remove some features from the template builder
that are not necessary for the MVP.
2024-04-18 18:13:59 +02:00
Anthony LC
75801bf95f 🤡(backend) add template editor json in demo
For the demo to be compatible with the new template
editor, we need to add the json file that setup
correctly the editor.
We are able to read and use it, but not edit it,
because the demo is in is_public mode.
2024-04-18 18:13:59 +02:00
Anthony LC
4de79c2388 💫(ap-impress) improve transition
Improve transition on Box component.
2024-04-18 15:49:42 +02:00
Anthony LC
f61047dd6a 💄(app-impress) keep highlighting menu when sub menu
When sub menu was open, the parent menu was not
highlighted.
This commit fixes this issue.
2024-04-18 15:49:42 +02:00
Anthony LC
d3b4a576c8 🗑️(app-impress) clean the menu
- replace pad and template icon
- remove unused icons
- remove unused pages
- remove menu items
2024-04-18 15:49:42 +02:00
Anthony LC
7107caf50b 🚸(app-impress) warning when resource not editable
When a resource is public, the users can see it
but not edit it. This commit adds a warning message
to the user to tell them that the resource
is not editable.
2024-04-18 14:44:12 +02:00
Anthony LC
82463be8ec 🐛(app-impress) fix all the resources were public
All the resources were public.
We now update correctly depend the user's choice.
We add a test.
2024-04-18 14:44:12 +02:00
Anthony LC
64cc2a9f2b 🐛(app-impress) fix bug rerendering when empty data
If the data is empty, the editor kept the previous
data and didn't rerender correctly the current editor.
This commit fixes this issue.
2024-04-18 12:48:15 +02:00
Anthony LC
b687ad6974 🚚(app-impress) rename PrintToPDFButton to PDFButton
- rename PrintToPDFButton to PDFButton
- rename button "Print the pad" to "Generate PDF"
2024-04-18 12:48:15 +02:00
Anthony LC
5d6ae870fa (app-impress) select template on pad
We add a template select component to the pad toolbox.
This component is a dropdown that allows the user
to select a template for the pad to add in a PDF.
2024-04-18 12:48:15 +02:00
Anthony LC
ef2ebf596a 👔(app-impress) add is_public switch button
Add a switch button to the create pad form to
allow the user to set the pad as public or private.
2024-04-17 17:45:03 +02:00
Anthony LC
7463735a38 👔(backend) is_public in document and template serializer
Add is_public field to document and template serializer.
2024-04-17 17:45:03 +02:00
Anthony LC
d9cdeb5c68 🚸(app-impress) add warning when body tag not in template
In order to work with the pad, the body tag
must be in the template.
This commit adds a warning to the template editor
when the body tag is not in the template.
2024-04-17 17:15:53 +02:00
Anthony LC
5d25aed765 💫(app-desk) add effect prop on Box component
Add the effect prop on Box component.
2 effects are available: 'show' and 'hide'.
2024-04-17 17:15:53 +02:00
Anthony LC
a8248f10d2 👔(app-impress) button to save html and css of the template
We created a button to save the template's html and css.
With the template saved we will be able to use it
in the near future with our pads.
2024-04-17 17:15:53 +02:00
Anthony LC
faeb8d137b 👔(backend) add css and code in template serializer
We want to be able to update the css and code of
a template from the update endpoint.
This commit adds the css and code fields to the
TemplateSerializer.
2024-04-17 17:15:53 +02:00