Skip to content
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

Rewire frontend notifications to backend notifications API #4254

Merged
merged 8 commits into from
Jul 30, 2024

Conversation

knolleary
Copy link
Member

@knolleary knolleary commented Jul 25, 2024

Closes #4245

This is the 3rd of three PRs to introduce the new notifications system

  1. Initial user notification backend #4164
  2. Add notification when user team invite is created #4183
  3. Rewire frontend notifications to backend notifications API #4254 (THIS PR)

Description

This updates the notification frontend to use the new notifications backend API.

Summary of changes:

  • The account store handling of notifications has been simplified; it now just stores the list of notifications from the api without separating out by type.
  • The account store now handles the user invitations as a separate property
  • The various notification counts now pull from the appropriate places; either the unread notification count (for the top-right notification button), or the invitation count (for the places specifically concerned with invitations
  • The notifications have a visually distinct read and unread state (see below).
  • Clicking on a notification will mark it as read
  • Work done in the underlying branches now means a team-invite type notification will get deleted when the invite is actioned.
  • Fixes a couple vue warnings present in the current code around missing required properties on the Notification component.
image

Copy link

codecov bot commented Jul 25, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 78.13%. Comparing base (fbcca84) to head (8cd53a3).

Additional details and impacted files
@@                      Coverage Diff                       @@
##           4165-team-invite-notification    #4254   +/-   ##
==============================================================
  Coverage                          78.13%   78.13%           
==============================================================
  Files                                292      292           
  Lines                              13403    13403           
  Branches                            3000     3000           
==============================================================
  Hits                               10473    10473           
  Misses                              2930     2930           
Flag Coverage Δ
backend 78.13% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@joepavitt
Copy link
Contributor

Approved, although not merging as to not impact other PRs for the upstream branches

@knolleary
Copy link
Member Author

Thanks @joepavitt - there's one PR left to review, which I'll get done on Monday and then we can merge the whole stack of them.

@knolleary knolleary merged commit b616d07 into 4165-team-invite-notification Jul 30, 2024
14 checks passed
@knolleary knolleary deleted the 4245-notifications-rewire branch July 30, 2024 09:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants