git-notify-extension icon indicating copy to clipboard operation
git-notify-extension copied to clipboard

Adding notification for reviews

Open pducolin opened this issue 5 years ago • 8 comments

It would be awesome to be notified when:

  • a comment is added to a PR, to the PR owner

  • a reply is added to a comment, to the comment owner

  • a build fails

  • all builds passed

Additionaly, could be great to have a mute notifications buttons, for folks who prefer polling their PRs regularly

pducolin avatar Apr 30 '20 10:04 pducolin

Hello,

I see two different improvement here:

  • comments notfications
  • build notifications

They both are under different API.

Also there is a need for a notification system, whether with a new tab in the UI or (/and) with browser notifications.

My approach would be to compare after polling the API the stored content and the new content to trigger notifications if there are differences.

Work to be done:

  • [ ] Create a new UI for notifications listing.
  • [ ] Add storage for notifications
  • [ ] Add a "done" button (Github like) to clear a specific notification or all notifications.
  • [ ] Change display style of a notification if visited.

For comments (AFAIK):

  • [ ] compare the comments number for each MR
  • [ ] trigger a notification if there are changes
  • [ ] try to know if the user was tagged?

For builds (AFAIK):

  • [ ] call the pipeline status API
  • [ ] store the state of the pipeline for each MR in the extension storage
  • [ ] compare the status of the pipeline with the previous stored state
  • [ ] trigger a notification if there are changes
  • [ ] display in the main UI if the pipeline succeeded for each MR

Mikescops avatar May 01 '20 11:05 Mikescops

I would also add a clear all for notifications, maybe clear them if older than 24h ? I would go for both separate tab + extension icon notifications (is it possible). Step 1, starting with a new tab.

I can look into it :)

pducolin avatar May 01 '20 18:05 pducolin

I would also add a clear all for notifications

It was already written ^^

maybe clear them if older than 24h

Let's keep everything (because some user are not using it on a daily basis) and add more option to customize later.

I have done part of the work of getting the notifications that are new: image

Mikescops avatar May 01 '20 21:05 Mikescops

I'm creating a tab for notifications

pducolin avatar May 02 '20 21:05 pducolin

I'm on it, I started a but of refactoring, my proposal would be to poll for MR list every X seconds / minutes -> remove the retry I would also keep the rendering in the return part of the component, while the getMR functions would only return a list of objects. What do you think? I would like to extract 2 separate components for assigned and owned MRs

pducolin avatar May 02 '20 22:05 pducolin

I see two different approach for notifications:

  1. Creating notifications in the background (title, content, author, link..) and store them in the local storage
  2. Build notifications at display time from the content of the PRs

Mikescops avatar May 07 '20 09:05 Mikescops

I have a PR ready for the refactor of App.tsx, I fork?

pducolin avatar May 08 '20 10:05 pducolin

Any news to share about this? It'd be a great feature, making the extension a complete replacement for e-mail based notifications.

The different notification levels as in GitLab's Profile -> Notifications would be great. I'd be personally happy with just the "Participate" level though :)

scop avatar Jan 17 '23 07:01 scop