Repository navigation
feat: add a notification settings page and a follow menu on discussions - #1265
Open
ThibaudDauce wants to merge 45 commits into
Open
ThibaudDauce wants to merge 45 commits into
ThibaudDauce wants to merge 45 commits into
Conversation
ThibaudDauce
marked this pull request as draft
October 6, 2026 15:16
…bject and announce automatic follows
…nal scope, event, reason and channel
… as rules and show the resolved follow state
…er turn every channel off
…d follow through a single toggle
…ve a page's subjects in a single call
…n the notification rows
…tification settings page
…ause them from the top of the settings page
…tings # Conflicts: # components/Datasets/AdminUpdateDatasetPage.vue
…th the app and the mailbox
…oes not bring it back
Following, stopping and muting go through PUT /notifications/follow/, which knows how the rules rank; the subject box reads muted and the events still followed from the resolution. The rules are no longer cached in a shared state: the settings page reads them on every visit, so another account signing in in the same tab never sees them, and the follows udata writes show up. Also: the cadence is a RadioButtons group, section titles stand above item names, subject icons come from getSubjectTypeIcon, the list of rules is a real list, an empty Contenus suivis says how to follow, and loading shows skeletons.
…t switch, without sharing state between tests The admin tests only read and withdraw the rules they wrote; what changes the whole account moves to a normal-user spec, run by a single project. The bell menu is tested through a reuse, announced without a worker. Discussion cards and the notifications list become an article and a labelled list, so that tests find them without styling classes.
…where signing in leads in the account switch test Signing out from the page set me to null while it was still shown, and reading the cadence crashed. The test now follows the app back to the page after signing in again, and retries opening the bell, which missed its first click right after loading in CI.
With the settings page no longer crashing, signing out lands on the home page as useLogout intends; the test signs in again from there and reaches the settings through the bell. The account reload after signing out answers 401, which the test allows.
…in lists Each list reads its own pages from udata, numbered in the URL. Withdrawing an automatic follow no longer branches on its origin: udata answers with the no it wrote, and both lists are read again.
Mail links only accept an object id and a known type, so that they can neither make the page call another path of the API with the user's session nor show a sentence of their own. The subject box moves to the top of the admin pages, visible on every screen, and the shared Describe and Sidemenu components are back as on main. A partial editor reads why they are notified depending on the subject, and a muted thread says so in the settings. The settings page loads its two lists through useAPI and LoadingBlock. The follow buttons read their state again after an answer or a new discussion, give up on an API error instead of spinning, and confirm with a precise message. Tests for the mail link of a thread, the links of no known type, the box while paused or restricted, and a notification asking for an action; the tests that change the whole account or need an account that follows what it edits move to the normal-user spec.
At the top of the form, under the visibility banners, it made a crowded area heavier.
…irmed Confirming takes the key out of the URL, and the admin pages are keyed on it: the page mounts again. Reloading the lists from the instance on its way out raced with that, and the new instance picked up the server rendered lists, without the rule just written.
Its label reads Badges de l'organisation: turning off only the kind just received let the next badge, of another kind, come anyway.
- The mail link banner asks udata for its subject (/resolved/), rather than calling the API of each class with a path built from the link; it also says when there is nothing left to stop.
- Name the subject ("ce jeu de données", "cette API"…) wherever the notifications said "ce contenu", from one helper shared with the discussions list.
- Only exact event names are taken from a link, and no inherited property passes for one.
- The menu of a notification switches on what it carries, so a new badge type gets its ways out.
- The rule lists keep their place while loading with a skeleton, and their watchers belong to the page.
- setRule returns nothing, as nobody read it.
…ages and the menu keys, with Celery tasks run in the request No worker runs in the CI: the notifications of a discussion or a badge never existed there. Shared helpers replace the copies of the specs.
ThibaudDauce
marked this pull request as ready for review
October 8, 2026 14:39
- The discussions list reads what the user receives on all of its threads, and on its subject, in one call each, again whenever the list is read: no module-level batching shared across server renders, no keys forcing the buttons to mount again. - A mail link naming a subject gone shows nothing, without an error toast, and is only read in the browser. - One mutedMessage() for every "stop", naming the subject by its title when known; the actions of the bell menu are plain data. - The rule lists read their state from their own request; the icons of a type family are typed, transfer included. - The menu has a ring rather than a border, the loading button the project pulse, the sidemenu a selector that says what it does, and the sysadmin reason is gone.
… of reach and a no on one event, joining organizations through the invitation just made
…notification box udata now answers heard as soon as one type of the subject is: a follow on the new discussions alone made the box say the user receives everything.
- The thread modal of the admin table reads its follow button: it is mounted already open. - Only the latest read of the follow buttons counts. - The toast of a type turned off names the type; subjectPhrase() names a subject everywhere. - The settings page titles its sections the way the profile page does, outside of their card, and its buttons show they are working. - The empty follows point to the buttons that exist. - The bell menu sits under the date, in the flow, rather than over a corner some notifications fill.
The notification box no longer guesses "only the new discussions" from the reasons: udata says it (partial, heard_types). It is read again once the page is saved, which may make a member follow it; a followed thread no longer reads "Discussions only"; the step 3 of a structured dataset keeps the line of its help menu.
… of a thread already stopped
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Require feat: add notification settings and mail digests opendatateam/udata#3956
Part of 🔔 Revoir le fonctionnement des notifications et leur gestion data.gouv.fr#1976
A "Notifications" page in the admin: mail cadence, pause, followed subjects and turned-off notifications.
Follow buttons on discussions, and a "Notifications" box on the admin pages of datasets, reuses and dataservices, showing what the user actually receives.
In the bell, a menu on each notification saying why it came and turning it off for its thread, its subject or its type.
Mail unsubscribe links lead to a confirmation on the settings page.
udata decides which rules to write: the front only asks and shows the answer. The CI now runs Celery tasks in the request, so that discussion and badge notifications can be tested.
Before merging: set
ref: mainback in.github/workflows/ci.ymlonce udata#3956 is merged.