-
Notifications
You must be signed in to change notification settings - Fork 280
feat: add 'Show read notifications' setting #2488
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
I've had this on my half-implemented list for a while, with a few raised and then closed PR attemps... I think we need to wait until the merged/batched api is finished before merging to avoid rate limits. Additionally, in the previous PRs I raised for this feature, I had changes to the HoverGroup buttons to hide the "mark as read" option on read NotificationRows |
|
We should also change the look and feel for read NotificationRows - ie: opacity difference, plus as Read State as a Filter Section option for Read and Unread. Unfortunately the REST API doesn't indicate a difference between read and done notification types |
To add some further thoughts for discussion, when I last looked into this feature ~2 months or so back that I was 80% convinced to close #708 as |
|
@setchy, alright, I think I've landed on a good implementation here.
On the read vs done question: On rate limiting: What do you think? |
|
|
|
||
| <Checkbox | ||
| checked={settings.showReadNotifications} | ||
| label="Show read notifications" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"Fetch read notifications" to be consistent with "Fetch only participating" setting?
| let passesFilters = true; | ||
|
|
||
| // Filter out read notifications if showReadNotifications is disabled | ||
| if (!settings.showReadNotifications && !notification.unread) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is redundant and can be removed as settings.showReadNotifications controls the API query parameters
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In it's place, we should add a new Filter Section for "Read" and "Unread" which runs on the base notifications
|
|
||
| <HoverButton | ||
| action={actionMarkAsRead} | ||
| enabled={!isNotificationRead} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The position of the 3 hover group buttons should be consistent between read and unread notification rows. This currently hides the "mark as read" button and shifts the position of the "mark as done" button
|
In addition to the above comments, we should also:
|



Summary
Adds a new setting to show read notifications alongside unread ones. Fixes #708.
Changes
showReadNotificationssetting (default: disabled)all=trueAPI parameterWhy "Mark as read" isn't a toggle
GitHub's REST API only supports one-way transitions:
unread → read → done. There's no endpoint to mark a notification as unread, so we can't implement a toggle. See GitHub API docs.Test plan