-
Notifications
You must be signed in to change notification settings - Fork 156
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
feat(notifications): show and read unread notifications #686
Conversation
Thanks for the PR @tris203 This is great! I was waiting for GitHub to give us access to the more advanced notification implementation where you can mark them as done and read separately but it seems that is not going to happen anytime soon |
f084a6d
to
0b56dae
Compare
Done and rebased @pwntester |
I tend to have use Octo from within the single repo, how about a configuration to filter to just the notifications for the current repo. Then no need to show the repo name as well. What are your thoughts? |
I don't think that particularly makes sense given the current API limitations. Given that we only show unread notifications, you would end up looking at an empty list 99% of the time. Also a general, what do I have to do would mean pinging around all over the place to see where you might have notifications |
I was thinking pull all notifications but filter before passing to picker |
That works, but I don't know if with the telescope API if we can "mark an item read" without refreshing the whole list? |
0b56dae
to
f77a87f
Compare
But that affects even the case without the filter, right? |
No, because we just grab the unread items list, and marking it read fires the API even and optimistically removes it from the selector without the need to refresh the whole thing. We could change it to a |
Seems like the same logic for the case where the list is already filtered
Would a configuration option not suffice?
The other pickers have a "no matching ... found". Would a message like that be applicable here? What is the behavior with no notifications at the moment? |
Sure
an empty list at the moment, i guess a no matching notifactions makes sense Seeing as this is fully new functionality, IMO i think it makes sense to get a base design in and iterate on it later once it is being used. Also given that this is a bit of a stop gap until the "real" graphql endpoint eventually comes |
I think |
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.
Just one final suggestion on the spacing being too big
Could @pwntester take another look. Your requested change is blocking a potential merge |
I think your rebase has broken the icons too, but I will have a look |
I did a rebase then fix for the icons. Take a look now. I had all items working |
Describe what this PR does / why we need it
Add ability to see unread notifications, review and mark as read from within octo
Does this pull request fix one issue?
Fixes #119
Describe how you did it
Use REST API for notifications as GraphQL is lacking
Describe how to verify it
:Octo notification
<leader>nr
will mark the notification as readSpecial notes for reviews
Currently limited to unread notifications only due to API limitations
Icons are in place for unread, for extension in the future
Checklist