Commit graph

1920 commits

Author SHA1 Message Date
Sylvain Boissel
d786e9703e
🐛(backend) do not filter deleted docs for the owner in the tree view
Fixes the bug described in #1254 (Delete document request conflict)

In the tree request, deleted documents for
which the user is the owner are not filtered anymore.
2026-03-24 17:02:43 +01:00
ZouicheOmar
0d09f761dc
💄(frontend) improve comments highlights
Updated comments styles to respect design proposal,
adding distinguishable highlighting, click and hover
style interactions.
2026-03-24 09:38:31 +01:00
Manuel Raynaud
ce5f9a1417
🔖(patch) release 4.8.3
Changed

- 💫(frontend) fix the help button to the bottom in tree #2073
- ️(frontend) improve version history list accessibility #2033
- ️(frontend) fix more options menu feedback for screen readers #2071
- (frontend) focus skip link on headings and skip grid dropzone #1983
- ️(frontend) fix search modal accessibility issues #2054
- ️(frontend) add sr-only format to export download button #2088
- ️(frontend) announce formatting shortcuts for screen readers #2070
- (frontend) add markdown copy icon for Copy as Markdown option #2096
- ♻️(backend) skip saving in database a document when payload is empty #2062

Fixed

- ️(frontend) fix aria-labels for table of contents #2065
- 🐛(backend) allow using search endpoint without refresh token enabled #2097
2026-03-23 17:32:50 +01:00
Anthony LC
83a24c3796
️(frontend) add debounce WebSocket reconnect
We add a debounce mechanism to the WebSocket
reconnect logic in the `useProviderStore` to
prevent rapid reconnection attempts that can
lead to performance issues and potential server
overload.
2026-03-23 17:01:02 +01:00
Anthony LC
4a269e6b0e
🐛(y-provider) fix loop when no cookies
We observed a huge amount of logs sometimes in
the y-provider server logs, all related to the
same error: "No cookies".
When this happens, the client keeps trying to
reconnect, and the server keeps logging the error,
creating a loop.
We stop the loop by checking if the error is a
"No cookies" error, and if so, we don't
try to reconnect.
2026-03-23 11:53:55 +01:00
Anthony LC
d9d7b70b71
♻️(frontend) refacto Version modal to fit with the design system
We refactored the version modal to fit
the design system. We removed some dead code and
fixed some state issues.
2026-03-23 10:58:50 +01:00
Anthony LC
a4326366c2
🐛(frontend) fix leftpanel button in doc version
The left panel button was shown in the doc version page.
This commit removes the button from the doc version
page by moving it to the DocLayout.
By moving it to the DocLayout, we do not have the
flickering when we switch between subpages.
2026-03-23 10:33:05 +01:00
Anthony LC
1d7b57e03d
🐛(frontend) fix close panel when click on subdoc
Recent refacto of left panel components caused
the close panel function to stop working when
clicking on a subdoc.
This commit fixes that issue by ensuring that the
close panel function is properly called when
a subdoc is clicked.
2026-03-23 10:11:19 +01:00
Manuel Raynaud
c4c6c22e42
♻️(backend) skip saving in database a document when payload is empty
The frontend application is making PATCH request with an empty body.
This PATCH request is not making any change but an UPDATE sql query is
made, the `updated_at` field is the only one updated. When can skip this
save in the databse by returning the Document instance in the serializer
update method
2026-03-21 10:33:02 +01:00
Manuel Raynaud
10a8eccc71
(backend) add missing update api test using the PATCH method
No tests were made using the PATCH method to update a Document using the
API. The frontend appllication mostly use the patch method instead of
the PUT method.
2026-03-21 10:15:50 +01:00
Manuel Raynaud
728332f8f7
(backend) assert document path can not change during API update
We want to assert on every succesful update test that the document path
has not change.
2026-03-21 10:15:49 +01:00
Manuel Raynaud
487b95c207
🐛(backend) allow using search endpoint without refresh token enabled
The search endpoint was using the refresh_roken method decorator. This
decorator force having a valid refresh token stored in the session for
the entire viewset. The search endpoint still allow having the legacy
search behavior and for this we don't need to configure at all the OIDC
refrsh mechanism.
2026-03-21 08:22:45 +00:00
Cyril
d23b38e478
(frontend) add markdown copy icon for Copy as Markdown option
Replace generic copy icon with dedicated markdown_copy SVG in DocToolBox.
2026-03-20 15:41:03 +01:00
Cyril
d6333c9b81
️(frontend) fix aria-labels for table of contents nav vs buttons
Screen readers announce nav as "Sommaire, navigation" and button as toggle.
2026-03-20 15:04:29 +01:00
renovate[bot]
03b6c6a206
⬆️(dependencies) update next to v16.1.7 [SECURITY] 2026-03-20 13:12:08 +00:00
Cyril
aadabf8d3c
️(frontend) announce formatting shortcuts for screen readers
Announce formatting shortcuts (headings, lists, paragraph, code block).
2026-03-20 12:56:38 +01:00
Cyril
2a708d6e46
️(frontend) add format to export download btn aria-label
Add format to export button aria-label for a11y. DRY format options.
2026-03-20 11:27:02 +01:00
Cyril
b47c730e19
️(frontend) announce search results through a live region
Announce result count updates while focus stays in input (#2043)
2026-03-20 10:47:18 +01:00
Cyril
cef83067e6
️(frontend) restore focus to input after search filter reset
Move filters out of listbox and refocus the search input (#2044)
2026-03-20 10:47:03 +01:00
Cyril
4cabfcc921
️(frontend) update aria-expanded dynamically on search combobox
Override cmdk aria-expanded via ref to reflect list state (#2039)
2026-03-20 10:47:02 +01:00
Cyril
b8d4b0a044
️(frontend) add label text to search input field
Pass label prop to QuickSearch to render non-empty label (#2041)
2026-03-20 10:47:01 +01:00
Cyril
71c4d2921b
️(frontend) add explicit aria-label to search reset button
Add aria-label to clarify the reset button resets filters (#2042)
2026-03-20 10:47:01 +01:00
Cyril
d1636dee13
️(frontend) set empty alt on decorative search image
Set alt="" on decorative empty state image in search modal (#2038)
2026-03-20 10:46:49 +01:00
Cyril
bf93640af8
️(frontend) skip link as anchor instead of button
Replace button with anchor link
2026-03-20 10:05:42 +01:00
Cyril
da79c310ae
️(frontend) focus skip link on headings and skip grid dropzone
We land keyboard users on page headings and keep the grid dropzone untabbable.
2026-03-20 10:05:33 +01:00
Cyril
99c486571d
️(frontend) fix more options menu feedback for screen readers
Pin/unpin: vocal announce only. Duplicate, copy: toast only.
2026-03-19 18:34:24 +01:00
Cyril
cdf3161869
️(frontend) use aria-label trad for version history modal #2023
Replace hardcoded aria-label with aria-lab trad.
2026-03-19 15:52:28 +01:00
Cyril
ef108227b3
️(frontend) improve version history list accessibility
Dynamic aria-label per version, aria-pressed + live region
2026-03-19 14:04:59 +01:00
Anthony LC
9991820cb1
🔊(CHANGELOG) fix entries changelog
The changelog was not updated correctly.
By not updating correctly, the changelog was not
showing the correct entries for the release,
leading to a patch release instead of a minor
release.
2026-03-19 13:36:48 +01:00
Anthony LC
2801ece358
️(frontend) change aria-label for help menu button
The help menu button's aria-label was
previously "Open onboarding menu", which was not
accurate and could be confusing for screen reader
users. This commit updates the aria-label to
"Open help menu" to better reflect the button's
purpose and improve accessibility.
2026-03-19 13:31:03 +01:00
Anthony LC
0b37996899
💫(frontend) fix the help button to the bottom in tree
The tree take a bit of time to load, during this
time the help button was not at the bottom of
the left panel. To fix this issue, we addded a
skeleton for the tree in wait for the tree to
load, by doing this, the help button
is always at the bottom.
2026-03-19 13:28:22 +01:00
Manuel Raynaud
0867ccef1a
🔖(patch) release 4.8.2
Changed

- ️(frontend) ensure doc title is h1 for accessibility #2006
- ️(frontend) add nb accesses in share button aria-label #2017

Fixed

- 🐛(frontend) fix image resizing when caption #2045
- 🙈(docker) add \*\*/.next to .dockerignore #2034
- ️(frontend) fix share modal heading hierarchy #2007
- ️(frontend) fix Copy link toast accessibility for screen readers #2029
- ️(frontend) fix modal aria-label and name #2014
- ️(frontend) fix language dropdown ARIA for screen readers #2020
- ️(frontend) fix waffle aria-label spacing for new-window links #2030
- 🐛(backend) stop using add_sibling method to create sandbox document #2084
- 🐛(backend) duplicate a document as last-sibling #2084
2026-03-19 10:24:25 +01:00
Manuel Raynaud
b3ae6e1a30
🐛(backend) duplicate a document as last-sibling
When a document is duplicated, it is duplicated at the direct right of
the duplicated document. Doing this force to move all the other
documents at the right, if it is duplicated at the root this can impact
a lot of documents, create lot of locks in the database. If the process
is stop for any reason then the paths can be in an inconsistent paths in
the Document table
2026-03-19 10:14:56 +01:00
Manuel Raynaud
1df6242927
🐛(backend) stop using add_sibling method to create sandbox document
In a past release we added a feature to create a sandbox document to a
newly created used. To create this sandbox document, we duplicate an
existing document and this duplicate is using the add_sibling method
with the "right" agument on this original document. Adding a sibling at
the right to a document involve moving right every root document created
after the original document, so the path of all this documents are
recalculated and changed. This can lead to the lost of some leaf in a
tree because to do this operation, multiple locks are created on the
database, creating lot of connection to the database and if the max
number connection to the database is reached or if the memory allocated
by the database is too hight, the database can close all connections
leading to inconsistent paths in the Document table.
2026-03-19 10:14:54 +01:00
Cyril
35fba02085
️(i18n) fix waffle aria-label spacing for new-window links
Include space and parentheses in translation value for proper aria-label.
2026-03-19 09:14:45 +01:00
Cyril
0e5c9ed834
️(frontend) fix language dropdown ARIA for screen readers
Add aria-haspopup, aria-expanded and menuitemradio pattern for SR.
2026-03-18 17:06:53 +01:00
Sylvain Boissel
4e54a53072
(backend) add resource server api
Adds a resource server API similar to the one that already
exists for Drive.
2026-03-18 16:06:29 +01:00
Charles Englebert
4f8aea7b80
Search feature flags (#1897)
## Purpose

For beta testing purposes we need to be able to activate Find hybrid
search to some users, Find full-text search to some others and leave
remaining users on basic DRF title search.

## Proposal

The solution proposed is based on [django-waffle
](https://waffle.readthedocs.io/en/stable/types/flag.html).

- [x] install waffle and activate the default app in settings.
- [x] implement `_get_search_type` in `DocumentViewset` to determine
which search type (title, hybrid or full-text) to use.
- [x] send the `search_type` in the search query. 

## 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-18 15:04:55 +00:00
Cyril
1172fbe0b5
️(frontend) add nb accesses in share button aria-label
Expose nb_accesses_direct to screen readers when share button shows count.
2026-03-18 14:21:04 +01:00
Cyril
7cf144e0de
️(frontend) fix modal aria-label object Object
Add aria-label on modals with JSX title to avoid returning object Object
2026-03-18 13:39:50 +01:00
Anthony LC
54c15c541e
🐛(frontend) fix image resizing when caption
When the caption was present, the image resizing
handles were not working.
This was because we were adding a Figure element
around the resizing div instead of the image itself.
2026-03-18 12:17:06 +01:00
Cyril
8472e661f5
️(frontend) fix Copy link toast accessibility for screen readers
Add aria-live announcements so screen readers announce the toast feedback.
2026-03-18 11:51:15 +01:00
Cyril
1d819d8fa2
️(frontend) fix share modal heading hierarchy
Improve h struct in docShareModal use h2 for group names and link settings
2026-03-18 10:47:39 +01:00
Cyril
5020bc1c1a
️(frontend) fix share modal heading hierarchy
Render QuickSearchGroup names and link settings as h2 headings.
2026-03-18 10:02:24 +01:00
Cyril
4cd72ffa4f
️(frontend) ensure doc title is h1 for accessibility
Fix heading hierarchy when withTitle is false in production
2026-03-18 10:02:08 +01:00
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