Repository navigation
✨ feat(notifications): bouton "Tout marquer comme lu" dans le dropdown - #554
Merged
Merged
Conversation
Jusqu'ici le marquage lu se faisait au cas par cas (un message direct ou tout le changelog séparément) — rien n'orchestrait les deux en une seule action pour vider le badge en un clic. DirectMessageRepository::markAllAsReadForRecipient() (UPDATE bulk plutôt qu'un foreach + flush par message), NotificationMarkAllReadWebController (POST /notifications/mark-all-read, orchestre lastChangelogViewedAt + readAt), bouton en en-tête du dropdown qui vide le panel entier et retire le badge (réutilise _removeAfter déjà en place pour un item unique). Closes #533
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.
Résumé
Jusqu'ici le marquage lu se faisait au cas par cas (un message direct via
POST /direct-messages/{id}/read, ou tout le changelog viaPOST /changelog/mark-viewed) — rien n'orchestrait les deux en une seule action pour vider le badge en un clic.DirectMessageRepository::markAllAsReadForRecipient(): UPDATE bulk plutôt qu'un foreach + flush par message.NotificationMarkAllReadWebController(POST /notifications/mark-all-read) : orchestrelastChangelogViewedAt+readAten un seul appel._removeAfterdéjà en place pour un item unique, généralisé à une liste).Test plan
DirectMessageRepositoryTest: marque tous les non-lus, n'affecte pas les autres destinataires, n'écrase pas unreadAtdéjà présentNotificationMarkAllReadWebControllerTest: accès anonyme refusé, changelog marqué, messages marqués, isolation entre utilisateursnotifications-controller.test.js: appel de l'endpoint, items retirés du DOM, badge retiréCloses #533