Skip to content

feat: add a notification settings page and a follow menu on discussions - #1265

Open
ThibaudDauce wants to merge 45 commits into
mainfrom
feat/notification-settings
Open

ThibaudDauce wants to merge 45 commits into
mainfrom
feat/notification-settings

Conversation

@ThibaudDauce

@ThibaudDauce ThibaudDauce commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

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: main back in .github/workflows/ci.yml once udata#3956 is merged.

image image image image 2026-10-07-154640_2560x1440_scrot

@ThibaudDauce
ThibaudDauce marked this pull request as draft October 6, 2026 15:16
… as rules and show the resolved follow state
…tings

# Conflicts:
#	components/Datasets/AdminUpdateDatasetPage.vue
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
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.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant