Commit graph

599 commits

Author SHA1 Message Date
Anthony LC
c1998a9b24
🙈(docker) add **/.next to .dockerignore
All the ".next" files are generated by the build
process and should not be included in the Docker
context.
2026-03-18 09:04:46 +01:00
Charles Englebert
0fca6db79c
Integrate Find (#1834)
## Purpose

integrate Find to Docs

## Proposal

- [x]  add a `useSeachDocs` hook in charged of calling the search
endpoint.
- [x]  add a optional `path` param to the `search` route. This param
represents the parent document path in case of a sub-documents
(descendants) search.
- [x] ️return Indexer results directly without DB calls to retrieve the
Document objects. All informations necessary for display are indexed in
Find. We can skip the DB calls and improve performance.
- [x] ♻️ refactor react `DocSearchContent` components.
`DocSearchContent` and `DocSearchSubContent` are now merged a unique
component handling all search scenarios and relying on the unique
`search` route.
- [x] 🔥remove pagination logic in the Indexer. Removing the DB calls
also removes the DRF queryset object which handles the pagination. Also
we consider pagination not to be necessary for search v1.
- [x] 🔥remove the `document/<document_id>/descendants` route. This route
is not used anymore. The logic of finding the descendants are moved to
the internal `_list_descendants` method. This method is based on the
parent `path` instead of the parent `id` which has some consequence
about the user access management. Relying on the path prevents the use
of the `self.get_object()` method which used to handle the user access
logic.
- [x] handle fallback logic on DRF based title search in case of
non-configured, badly configured or failing at run time indexer.
- [x] handle language extension in `title` field. Find returns titles
with a language extension (ex: `{ title.fr: "rapport d'activité" }`
instead of `{ "title": "rapport d'activité" }`.
- [x] 🔧 add a `common.test` file to allow running the tests without
docker
- [x] ♻️ rename `SearchIndexer` -> `FindDocumentIndexer`. This class has
to do with Find in particular and the convention is more coherent with
`BaseDocumentIndexer`
- [x] ♻️ rename `SEARCH_INDEXER_URL` -> `INDEXING_URL` and
`SEARCH_INDEXER_QUERY_URL` -> `SEARCH_URL`. I found the original names
very confusing.
- [x] 🔧 update the environment variables to activate the
FindDocumentIndexer.
- [x] automate the generation of encryption key during bootstrap.
OIDC_STORE_REFRESH_TOKEN_KEY is a mandatory secret key. We can not push
it on Github and we want any contributor to be able to run the app by
only running the `make bootstrap`. We chose to generate and wright it
into the `common.local` during bootstrap.

## External contributions

Thank you for your contribution! 🎉  

Please ensure the following items are checked before submitting your
pull request:
- [x] I have read and followed the [contributing
guidelines](https://github.com/suitenumerique/docs/blob/main/CONTRIBUTING.md)
- [x] I have read and agreed to the [Code of
Conduct](https://github.com/suitenumerique/docs/blob/main/CODE_OF_CONDUCT.md)
- [x] I have signed off my commits with `git commit --signoff` (DCO
compliance)
- [x] I have signed my commits with my SSH or GPG key (`git commit -S`)
- [x] My commit messages follow the required format: `<gitmoji>(type)
title description`
- [x] I have added a changelog entry under `## [Unreleased]` section (if
noticeable change)
- [x] I have added corresponding tests for new features or bug fixes (if
applicable)

---------

Signed-off-by: charles <charles.englebert@protonmail.com>
2026-03-17 17:32:03 +01:00
Manuel Raynaud
ad36210e45
🔖(patch) release 4.8.1
Added

- 🔧(backend) add DB_PSYCOPG_POOL_ENABLED settings

Changed

- ⬇️(backend) downgrade django-treebeard to version < 5.0.0
2026-03-17 13:29:05 +01:00
Manuel Raynaud
73a7c250b5
🔧(backend) add DB_PSYCOPG_POOL_ENABLED settings
The psycopg pool config was enabled by default forcing its usage. Using
psycopg pool can be difficult, finding the good configuration take time.
By default its usage should be disable and the maintainer of the
instance should decide to enable it or not.
2026-03-17 13:19:17 +01:00
Manuel Raynaud
0c17d76f60
⬇️(backend) downgrade django-treebeard to version < 5.0.0
Since we upgraded to django-treebeard version 5 we have anormal behavior
and a high error rate on the document.path property. We must downgrade
it and avoid future upgrade from renovate.
2026-03-17 13:17:05 +01:00
Manuel Raynaud
bcb50a5fce
🔧(helm) allow specific env var for the backend and celery deploy
We want the possibility to configure specific environment variables on
backend and celery deployment. Most of them are common but in the case
of the newly added settings DB_PSYCOPG_POOL_MIN_SIZE we want to
configure ot only on the backend deployment, not on the celery or with a
different value.
2026-03-16 15:30:22 +01:00
Anthony LC
51e8332b95
🔖(minor) release 4.8.0
Added:
- (backend) add a is_first_connection flag to the User model
- (frontend) add onboarding modal with help menu button

Changed:
- (frontend) localize LaGaufre label fallback in Docs
- (backend) add a migration cleaning on-boarding
  document accesses
- ⬆️(frontend) upgrade Next.js to v16
- ️(frontend) fix aria-label and landmark on document
  banner state
- 🌐(i18n) add "new window" translation key for waffle
  aria-label

Fixed:
- 🐛(backend) create a link_trace record for on-boarding
  documents
- 🐛(backend) manage race condition when creating sandbox
  document
- 🐛(frontend) fix flickering left panel
- ️(frontend) improve doc tree keyboard navigation
2026-03-13 18:00:32 +01:00
Cyril
6c493c24d5
(frontend) add onboarding modal with help menu button
integrate onboarding feature accessible from left panel help menu

(frontend) add docs onboarding and help memu

Introduce an onboarding to guide users through core features.
2026-03-13 16:27:21 +01:00
Anthony LC
a9d2517c7b
🐛(frontend) fix flickering left panel
In some cases, the left panel can flicker
when navigating from the index to a document page.
This is due to different state + a transition effect.
To fix this, we remove the transition effect
when mounting.
2026-03-13 10:34:56 +01:00
Cyril
a2ae41296d
️(frontend) fix doc tree keyboard navigation regressions
Shift+Tab from sub-doc returns focus to root item
2026-03-12 17:10:09 +01:00
Cyril
1016b1c25d
️(i18n) add "new window" translation key for waffle aria-label
Add key used by LaGaufreV2 for localized aria-label on external links.
2026-03-12 16:13:51 +01:00
Cyril
0c649a65b0
️(frontend) fix redundant a-label and improper landmark on public alert
Remove aria-label and region role to avoid duplicate screen reader announcement
2026-03-12 15:10:25 +01:00
Anthony LC
679b29e2e0
⬆️(frontend) upgrade Next.js to v16
Upgrade Next.js to v16, which includes Turbopack
support by default. It improves dev and build
performance considerably.
2026-03-12 14:34:23 +01:00
Manuel Raynaud
3cad1b8a39
(backend) add a migration for cleaning onboarding document accesses
We change the strategy on how the new users have access to the
onboarding documents. We should remove all created accesses we don't
want to have anymore. There is no need to add them in the link_trace
table, they are already present in the favorites and user have already
access to it.
2026-03-12 13:52:23 +01:00
Manuel Raynaud
2eb2641d2c
🐛(backend) manage race condition when creating sandbox document
When a user is created and a sandbox document should be created, we can
have a race condition on the document creation leading to an error for
the user. To avoid this we have to manage this part in a transaction and
locking the document table
2026-03-12 13:51:41 +01:00
Manuel Raynaud
e36366b293
🐛(backend) create a link_trace record for onboarded documents
When a user is created, we created accesses to a list of onboarding
documents. Doing this have side effect on the proximity search feature.
Instead of creating access, we should create link_reach
2026-03-12 13:51:41 +01:00
Cyril
6d73fb69b0
️(frontend) localize LaGaufre label fallback in Docs
We pass a translated fallback label so the waffle follows the app locale.
2026-03-12 11:07:24 +01:00
Sylvain Boissel
b708c8b352
(backend) add a is_first_connection flag to the User model
Backend part of #1796.

This changes allows to display an onboarding modal the first time that
the get_me() API view is called.
I originally tried to check if `User.last_login` was `None`, but it is
updated as soon as the user is logged, so I chose to create a flag on
the model.
2026-03-11 14:34:55 +00:00
Hadrien Blanc
4637d6f1fe
📝 Fix documentation and comment typos (#1977)
Fix typos found in documentation and code comments across the codebase.
2026-03-11 09:29:57 +00:00
Anthony LC
167375231b
🔖(minor) release 4.7.0
Added:
- (helm) allow all keys in configMap as env var

Changed:
- 📝(docs) improve README and add documentation hub
- ️(frontend) restore focus to triggers after closing menus and modals
- 🚸(frontend) change position elements toolbar
- ️(frontend) add focus on open to modals

Fixed:
- 🐛(frontend) analytic feature flags problem
- 🐛(frontend) fix home collapsing panel
- 🐛(frontend) fix disabled color on icon Dropdown
- 🐛(frontend) fix zIndex table of content
- 🐛(frontend) fix bug when language not supported by BN
- 🐛 (backend) prevent privileged users from requesting access
2026-03-10 10:25:11 +01:00
Anthony LC
77535b0292
🚸(frontend) change position elements toolbar
The AI and comment toolbar buttons are now
positioned at the end of the toolbar.
They were taking too much space on the left
which was not ideal for user experience.
2026-03-09 14:43:38 +01:00
Anthony LC
770c22b1a6
🐛(frontend) fix bug when language not supported by BN
When a language was not supported by BlockNote,
the editor would crash. This commit adds a default
locale fallback to prevent the crash and ensure
the editor remains functional even when the
user's language is not supported.
2026-03-09 14:43:37 +01:00
Anthony LC
6cef5ff2a0
🐛(frontend) fix buttons closing panel
When clicking on the home button, the left panel was
collapsing, it is a behavior that we want only when
mobile. We improved the logic to only collapse the
panel when we are on mobile devices.
2026-03-09 14:03:57 +01:00
Anthony LC
189594c839
🐛(frontend) fix zIndex table of content
When we open a modal, the table of content is
above the modal, which is not the expected behavior.
This commit fixes the zIndex of the table of
content to be below the modal.
2026-03-09 10:31:47 +01:00
Mohamed El Amine BOUKERFA
ca286b6de7
🐛(backend) prevent privileged users from requesting access
Privileged users of a document (owners and admins) should not be
allowed to create an access request on a document they already control.
Without aguardrail, they could inadvertently inflate the access
request queue with redundant entries.

More critically, if an owner submits an access request on their own
document, another admin could accept it and grant them a lower role
(e.g. reader), which would silently strip them of their ownership.

Signed-off-by: Mohamed El Amine BOUKERFA <boukerfa.ma@gmail.com>
2026-03-09 10:07:23 +01:00
Anthony LC
6062d0e9c4
🐛(frontend) fix disabled color on icon Dropdown
When the item was disabled, the icon color was not
updated to the disabled color. This commit fixes
this issue by applying the disabled color
to the icon when the item is disabled.
2026-03-06 15:06:00 +01:00
Anthony LC
a51b34a04e
🐛(frontend) analytic feature flags problem
When multiple analytics are registered, if one
analytic has the flag at true, the feature was activated,
even if another analytic had it at false.
We change the logic to require all analytics to
have the flag at true for the feature to be activated.
2026-03-06 14:40:14 +01:00
Johannes Kastl
f294a8e5a3
(helm) allow all keys in configMap as env var in backend jobs
Add `envFrom` support to backend jobs and cronjobs
(`backend_job.yml`, `backend_job_createsuperuser.yaml`,
`backend_job_migrate.yaml`, `backend_cronjob_list.yaml`),
mirroring the `envFrom` support already added to the deployments.

This allows injecting all keys from a ConfigMap or Secret as
environment variables via `backend.envFrom` in the Helm values.

Signed-off-by: Johannes Kastl <git@johannes-kastl.de>
2026-03-06 12:31:54 +01:00
Cyril
09fb9671e4
️(frontend) restore focus on docIcon after picker
Use focus store to return focus after emoji picker close.
2026-03-06 10:45:01 +01:00
Cyril
25cf11c90f
️(frontend) add focus on open to modals
Use autoFocus on primary button when opening modals.

Made-with: Cursor
2026-03-05 17:39:02 +01:00
pav
d1a3519646
📝(docs) improve readme and add documentation hub (#1870)
## Purpose

This pull request improves the project’s documentation entry points and
overall readability to make Docs more approachable for new users and
contributors.

While reviewing the repository, I noticed that the project highlights
documentation and Markdown support, but the front-page README contained
several Markdown syntax issues and inconsistencies. This made the
landing experience feel less polished than the quality of the project
itself. The goal of this change is to provide a cleaner, more
consistent, and more professional first impression.

Please let me know and I can apply any changes, or edit other .md files
as needed!

## Proposal

- Rewrite the root README to be tighter, easier to scan, and more
user-facing
- Add a documentation landing page at `/docs/README.md` with a
structured table of contents
- Introduce `docs/instances.md` to list public Docs instances  

## External contributions

Thank you for your contribution! 🎉  

Please ensure the following items are checked before submitting your
pull request:

- [x] I have read and followed the [contributing
guidelines](https://github.com/suitenumerique/docs/blob/main/CONTRIBUTING.md)
- [x] I have read and agreed to the [Code of
Conduct](https://github.com/suitenumerique/docs/blob/main/CODE_OF_CONDUCT.md)
- [x] I have signed off my commits with `git commit --signoff` (DCO
compliance)
- [x] I have signed my commits with my SSH or GPG key (`git commit -S`)
- [x] My commit messages follow the required format: `<gitmoji>(type)
title description`
- [x] I have added a changelog entry under `## [Unreleased]` section  
- [x] I have not added tests because this PR only contains documentation
changes

---------

Signed-off-by: actuallypav <61046893+actuallypav@users.noreply.github.com>
2026-03-05 14:55:35 +00:00
Anthony LC
03ea6b29df
🔖(minor) release 4.6.0
Added:
- (frontend) integrate new Blocknote AI feature
- 👷(docker) add arm64 platform support for image builds
- (tracking) add UTM parameters to shared document links
- (frontend) add floating bar with leftpanel collapse button
- (frontend) Can print a doc
- (backend) manage reconciliation requests for user accounts
- 👷(CI) add GHCR workflow for forked repo testing
- (frontend) Move doc modal
- ️(backend) remove content from Document serializer when asked
- (backend) allow the duplication of subpages
- (backend) Onboarding docs for new users
- 🩺(trivy) add trivyignore file and add minimatch CVE
- 🚩 Add feature flags for the AI feature

Changed:
- ️(frontend) prevent dates from being focusable
- ️(frontend) Focus main container after navigation
- 💄(frontend) align colors and logo with ui-kit v2
- 🚸(backend) sort user search results by proximity
  with the active user
- 🚸(oidc) ignore case when fallback on email
- ️(CI) optimize Docker Hub workflow

Fixed:
- 🐛(frontend) fix broadcast store sync
- 🐛(helm) use celery resources instead of backend resources
- 🐛(helm) reverse liveness and readiness for backend deployment
- 🐛(y-provider) use CONVERSION_FILE_MAX_SIZE settings
- 🐛(frontend) fix callout block spacing for old browsers
2026-03-05 12:42:03 +01:00
Anthony LC
73621c91e5
🍱(frontend) add icons ui-kit
We have a mix of Material icons and custom icons
in the app, which makes it difficult to maintain
and update them. To solve this problem, we downloaded
all the icons from the ui-kit and added them to
the project. We will gradually replace the old
icons with the new ones to ensure a consistent
and up-to-date icon set across the app.
2026-03-04 16:00:59 +01:00
Anthony LC
2718321fbe
(frontend) Move doc modal
We can now move a doc to another doc from a search
modal. It will make it easier to move a doc
without having to scroll through the doc grid to
find the destination doc.
We kept most of the logic implemented in the
doc grid dnd.
2026-02-27 09:09:25 +01:00
Anthony LC
a51ceeb409
🚩(frontend) add Analytics feature flag on Blocknote AI
We want to have a fine grained control over the
Blocknote AI feature.
By adding the feature Analytics feature flag,
we can enable or disable this feature for specific
users or groups without deploying new code.
This allows us to test the feature in a controlled
environment and gather feedback before a full rollout.
2026-02-26 13:50:17 +01:00
Anthony LC
1a022450c6
(frontend) integrate new Blocknote AI feature
We integrate the new Blocknote AI feature
into Docs, enhancing the document editing experience
with AI capabilities.
2026-02-26 09:52:33 +01:00
Manuel Raynaud
ffae927c93
️(backend) remove content from Document serializer when asked
The frontend can fetch the retrieve endpoint just for having the title.
Everytime, the content is added and to get the content, a request is
made to the s3 bucket. A query string `without_content` can be used, if
the value is `true` then the content is not added (and not also not
fetch).
2026-02-25 21:18:01 +01:00
Anthony LC
21217be587
️(CI) optimize Docker Hub workflow
We use the Docker Hub Workflow to build and push
our images to Docker Hub, but to check if we
have vulnerabilities in our images as well.
When we are just checking for vulnerabilities,
we don't need to do all the builing steps.
This commit optimizes the workflow by only doing the
necessary steps when we are just checking for
vulnerabilities, so during pull requests
without label "preview" we skip the build steps,
and we do not activate QEMU.
2026-02-25 14:40:38 +01:00
Anthony LC
a8212753aa
🩺(trivy) add trivyignore file and add minimatch CVE
We added a .trivyignore file to ignore the
CVE-2026-26996 vulnerability coming from the y-provider
image.
We also updated the docker-hub.yml workflow to
use this .trivyignore file when scanning our
Docker images with Trivy.
2026-02-25 11:14:02 +01:00
Anthony LC
c37dc8dd34
🐛(frontend) fix callout block spacing for old browsers
On the old Firefox versions, the spacing of the
callout block was not applied correctly.
We changed the "white-space" property to "pre-wrap"
to ensure that the spacing is applied correctly on
all browsers.
2026-02-24 15:45:49 +01:00
Anthony LC
e323af2cdb
🐛(y-provider) use CONVERSION_FILE_MAX_SIZE settings
The settings CONVERSION_FILE_MAX_SIZE was not used
in the y-provider, which caused a 413 Payload
Too Large error when trying to convert a file larger
than 500kb.
This commit updates the y-provider to use the
CONVERSION_FILE_MAX_SIZE settings, allowing it to
handle larger files without throwing an error.
CONVERSION_FILE_MAX_SIZE should follow the same
value as the one defined in the backend settings,
which is 20mb by default.
2026-02-24 14:26:08 +01:00
Sylvain Boissel
c80e7d05bb
🚸(backend) add onboarding docs for new users
Adds two methods to allow new users to start with some docs.

User._handle_onboarding_documents_access() gives READER access to
each document listed in settings.USER_ONBOARDING_DOCUMENTS.

User._duplicate_onboarding_sandbox_document() creates a local copy
of the sandbox document specified in
settings.USER_ONBOARDING_SANDBOX_DOCUMENT.
2026-02-23 16:29:08 +01:00
Sylvain Boissel
5d5ac0c1c8
(backend) allow the duplication of subpages
Adds a new with_descendants parameter to the doc duplication API.
The logic of the duplicate() method has been moved to a new
internal _duplicate_document() method to allow for recursion.
Adds unit tests for the new feature.
2026-02-23 15:31:19 +01:00
Stephan Meijer
d0b756550b
👷(docker) add arm64 platform support for image builds
Signed-off-by: Stephan Meijer <me@stephanmeijer.com>
2026-02-19 17:38:18 +01:00
Cyril
010ed4618a
(frontend) add floating bar with collapse button
Add sticky floating bar at top of document with leftpanelcollapse btn
2026-02-19 13:10:48 +01:00
Chaïb Martinez
c0994d7d1f
(tracking) add UTM parameters to shared document links
Add utm_source=docssharelink and utm_campaign={docId} query parameters
to shared document links (copy link and invitation emails).

Signed-off-by: Chaïb Martinez <chaibax@gmail.com>
2026-02-19 10:43:48 +01:00
Manuel Raynaud
49871c45b1
🐛(helm) reverse liveness and readiness for backend deployment
The liveness and readiness are reversed. The liveness was using the
heartbeat process that is cheking all django checks and the database
connection.
2026-02-13 09:51:41 +01:00
Manuel Raynaud
2cc0d71b89
🐛(helm) use celery resources instead of backend resources
In the celery deployment, the backend resources are used and not the one
from the celery values.
2026-02-13 09:31:51 +01:00
dtinth-ampere-devbox
33785440c6
👷(CI) add GHCR workflow for forked repo testing
Add workflow_dispatch-triggered workflow that builds and pushes images
to GitHub Container Registry (ghcr.io). This allows forked repositories
to build their own images for testing without requiring Docker Hub
credentials.

Images are tagged with branch names, semver tags, and commit SHA for
easy testing of specific builds.

Signed-off-by: dtinth on MBP M1 <dtinth@spacet.me>
2026-02-12 14:08:24 +01:00
Anthony LC
75c7811755
💄(frontend) align colors with theme from figma
Some colors were not exactly the same as the ones
in figma, this commit aligns them with the theme
tokens.
2026-02-12 12:53:51 +01:00