As an identity holder, I want to clear every unread marker in one tap, so that the next time I look, anything marked is truly new.
Situation
I have skimmed my Activity inbox. Several rows still carry an unread dot, and I do not want to open each one just to clear it.
What I do
Open the Activity tab.
Look at the first row, which says how many are unread.
Tap "Mark all read".
What I should see
The first row of the inbox reads, for example, "2 unread", with the button "Mark all read" on the right.
After I tap it, every unread dot disappears and the row reads "All caught up".
The change shows as soon as the service confirms it; I do not need to refresh.
"Mark all read" is dimmed when nothing is unread.
"Mark all read" is dimmed while a change is being saved, so I cannot send it twice.
The rows themselves stay in the list, in the same order and under the same days.
Only the selected identity is affected. Another identity on this phone keeps its own unread rows, for example still showing "2 unread" after I switch to it.
The read state is kept by the notification service for my identity, so it holds after I close the app.
A notification that arrives afterwards shows a dot and the count starts again from "1 unread".
The summary row and the button are not shown when the inbox is empty.
When something goes wrong
If the change cannot be saved, a red line appears at the top of the list with the reason, for example "Notification server not responding (hyper.media)." The dots and the count stay as they were, and I tap "Mark all read" again.
If the selected identity's key is no longer on this phone, the inbox is replaced by "No identity selected" with "Open Me".
Not included
No undo, and no confirmation before clearing. A row cannot be marked unread again.
No clearing by day, by document or by kind: it is one row at a time by opening it, or everything.
Marking read does not remove rows from the list. The inbox's other limits are in Current limits.
Trace
Story US-ACT-03, status Shipped. These links are kept in step with the traceability matrix and with the "User stories" section of every page listed here.
Design
Page | Part it plays |
|---|---|
The summary row with the count and "Mark all read" | |
The summary row and the unread dot it clears | |
The plain button and its disabled state | |
The grouped list section that holds the summary | |
A plain row action that acts at once | |
Disabled while saving; the count as confirmation | |
The red action-failed section | |
"All caught up" says the state in words | |
The brand dot and system red for a failed action | |
"N unread", "All caught up", "Mark all read" |
Implementation
Page | Part it plays |
|---|---|
The summary section and activityMarkAll | |
activityApply mark-all-read; the committed snapshot shown without a second request | |
isRead: the mark-all watermark and explicit read ids; the unread count | |
The signed write and the another-identity refusal | |
The signed notify envelope | |
The signer for the selected identity | |
mark-all-read and the read state it returns | |
The activityChanged mutation refreshes activityData | |
A mutation hands its snapshot to the refresh | |
The mark-all steps of the inbox test | |
The fixture that keeps read state per account | |
Read-state unit tests |
Code
File | What |
|---|---|
the summary row: unread count and "Mark all read" | |
the red action-failed section | |
activityMarkAll | |
activityChanged, activityReady, activitySaveError | |
activityApply | |
isRead | |
present (the unread count) | |
notificationRequest |
Tests
File | What it checks |
|---|---|
activity: grouped days, unread dots, mark all read and push a document | |
activity: switching identities scopes the inbox and email draft | |
mark-event-read and mark-all-read return canonical snapshots; a successful mutation becomes visible from its snapshot even if the next network read fails |
Delivery
Delivered by #1470.
Do you like what you are reading? Subscribe to receive updates.
Unsubscribe anytime