Snooze notifications
Release notes
You can now snooze notifications in your to-do list, allowing you to temporarily hide items and focus on what's most important right now. Whether you need an hour to concentrate or want to revisit a task tomorrow, you'll have fine-grained control over when notifications reappear, helping you manage your workflow more effectively.
Problem to solve
- Team leads are often involved in concurrent discussions on issues, epics, and merge requests.
- Sometimes they get a notification about something they want to follow up on, but don't have time to do so right now.
- They want to save the notification so they can be reminded to return to the topic when they have time.
Proposal
As we're iteratively transforming the to-do list into a notification list, we'll introduce this functionality within the current to-do list by:
- Adding a button to snooze to-dos
- Providing a list of common durations to snooze the to-do:
- For one hour
- Until later today (4 hours later)
- Until tomorrow (tomorrow at 9am local time)
- Providing an option for custom snoozing duration (by time and date)
- When snoozing a to-do, it should be removed from the main list of to-dos
- When a snoozed to-do reaches its alarm time, it should reappear in the main list
- Users can only snooze a to-do once. Snoozing the to-do again should only change the alarm time for the to-do
- Show snoozed to-dos on a separate tab
- To-do counts should exclude snoozed notifications
Design
Adding a snooze button to the existing to-do list would look as follows:
To-do list page | Snooze dropdown | Custom time/date picking | Snoozed tab | Full time stamp in tooltip | Snoozed item returned to main list |
---|---|---|---|---|---|
Intended users
Feature Usage Metrics
- % of active users that snooze a notification in last 30 days
- Weekly user retention for snoozing notifications
- Completion rate for snoozed notifications?
Does this feature require an audit event?
No, this is user-level data. It does not impact behavior at the instance, group, or project level.
Implementation plan
Database
-
Add the following columns to the todos
table:Column name Type Default value Notes snoozed_until
timestamp without time zone
None It holds the date and time when the todo will be moved back to the todos list. This gets reset whenever the set time is reached, which has the effect of moving the todo out of the Snoozed
tab and back to the list.
API
-
Implement the GraphQL mutation for snoozing a todo: mutation TodoSnooze($todoId: ID!, $snoozedUntil: Time!) { todoSnooze(id: $todoId, snoozedUntil: $snoozedUntil) { errors } }
-
Implement the GraphQL mutation for un-snoozing a todo: mutation TodoUnSnooze($todoId: ID!) { todoUnSnooze(id: $todoId) { errors } }
-
The todos
query should return the todos sorted bysnoozed_until
andcreated_date
.
Backend
-
Create a snoozed
scope that returns todos where thesnoozed_until
timestamp is set to some time in the future. -
Create a not_snoozed
scope, or update thepending
scope to return todos where thesnoozed_until
timestamp is not set, or set to some time in the past.- Whether we decide to create a new scope or piggy-back on the existing
pending
one, we'll need to keep an eye out for todos counters. They should still be in sync with the todos standard tab.
- Whether we decide to create a new scope or piggy-back on the existing
-
The snoozeTodo
mutation handler should perform the following:-
Set the snoozed_until
column to thesnoozedUntil
parameter (UTC).
-
-
Create the unsnoozeTodo
mutation handler.- It will be called when users manually "un-snooze" a todo.
-
It resets the snoozed_until
columns.
Frontend
-
Add a Snooze
disclosure dropdown to each todo item in the list.-
Refer to the designs for the actions that should be implemented. -
Keep the times dynamic. Eg, if the todos dashboard has been left opened for an hour, times displayed and set to the API should still be relative to the current time.
-
-
Implement the custom snooze date and time modal. -
Both the modal and the disclosure trigger the snoozeTodo
GraphQL mutation. See API section for the parameters. -
Implement the Snoozed
todos tab.-
It lists todos from the snoozed
scope. -
Todo items show when they will be moved back to the list Snoozed until...
. A tooltip shows more details on the snooze time (hour, time zone). -
A button lets users move the todo back to the list by triggering the unsnoozeTodo
GraphQL mutation. -
The Mark as done
button is here too, it triggers thetodoMarkDone
GraphQL mutation.
-
Follow-up tasks from code reviews
From !175117 (comment 2277691962):
-
Revisit the timestamps' display as per the linked comment. -
Resolving a todo keeps it visible till the auto-refresh kicks in, but snoozing a todo hides it immediately... Could we also keep it around, to keep things consistent? -
When (un)snoozing, the Pending counter in the tab doesn't update. -
Resolving a todo should null
itssnoozed_until
.