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

🎁 Marks Notifications as Read on Dashboard #2470

Merged
merged 2 commits into from
Mar 3, 2025

Conversation

sjproctor
Copy link
Collaborator

Story: [i1019] Marks notifications as read when the user visits the notifications dashboard

Ref:

Expected Behavior Before Changes

  • Notifications were only being marked as "read" if the user received a batch email with the notification
  • If a user saw the email in the notification in the app dashboard the notification did not change status

Expected Behavior After Changes

  • When a user visits the notification dashboard, all existing notifications will be marked "read"
  • Read notifications are not included in the batch email

Screenshots / Video

Photo: a user's unread notification Screenshot 2025-02-21 at 2 56 44 PM
Photo: after visiting the notification dashboard, there are no more unread notifications Screenshot 2025-02-21 at 2 58 02 PM

Notes

  • Adds a decorator for the NotificationsController to mark notifications as read when the user visits the notification dashboard
  • Ensures that the user will not receive read notifications in the bulk email, only unread and undelivered notifications will be included
  • Adds a spec for the NotificationsControllerDecorator

@samvera/hyku-code-reviewers

This commit:
- adds a decorator for the NotificationsController to mark notifications
as read when the user visits the notification dashboard
- ensures that the user will not receive read notifications in the bulk
email, only unread and undelivered notifications will be included
- adds a spec for the NotificationsControllerDecorator

Ref:
- notch8/palni-palci#1019
@sjproctor sjproctor added the patch-ver for release notes label Feb 21, 2025
Copy link

github-actions bot commented Feb 21, 2025

Test Results

    3 files  ±0      3 suites  ±0   16m 58s ⏱️ -24s
2 084 tests +5  2 028 ✅ +5  56 💤 ±0  0 ❌ ±0 
2 111 runs  +5  2 053 ✅ +5  58 💤 ±0  0 ❌ ±0 

Results for commit e49e7d3. ± Comparison against base commit 6f956d0.

This pull request removes 42 and adds 47 tests. Note that renamed tests count towards both.
spec.abilities.work_ability_spec ‑ Hyrax::Ability::WorkAbility when work depositor Etd permissions is expected not to be able to destroy 3c2ab790-2b83-4833-944f-e98d4f0dc636
spec.abilities.work_ability_spec ‑ Hyrax::Ability::WorkAbility when work depositor Etd permissions is expected not to be able to edit 2393acf2-a988-4757-aefe-f5afc48b4314
spec.abilities.work_ability_spec ‑ Hyrax::Ability::WorkAbility when work depositor Etd permissions is expected not to be able to read 9ad31598-8e73-49de-87d7-ca39f15df845
spec.abilities.work_ability_spec ‑ Hyrax::Ability::WorkAbility when work depositor Etd permissions is expected not to be able to update dce53e6d-c81b-4c7a-9f7f-5dc2369661b9
spec.abilities.work_ability_spec ‑ Hyrax::Ability::WorkAbility when work depositor FileSet permissions is expected not to be able to destroy b044598c-1452-4b09-ad69-ad1861887c32
spec.abilities.work_ability_spec ‑ Hyrax::Ability::WorkAbility when work depositor FileSet permissions is expected not to be able to edit 35d0757a-44bb-4e2f-b92c-1492bdf75caf
spec.abilities.work_ability_spec ‑ Hyrax::Ability::WorkAbility when work depositor FileSet permissions is expected not to be able to read 2d3decba-3b6f-4d61-a324-202409b414d1
spec.abilities.work_ability_spec ‑ Hyrax::Ability::WorkAbility when work depositor FileSet permissions is expected not to be able to update 1b8dda13-747b-4fa8-8866-748d734b127c
spec.abilities.work_ability_spec ‑ Hyrax::Ability::WorkAbility when work depositor GenericWork permissions is expected not to be able to destroy 6010db34-b04d-468a-89ef-74ac68f68224
spec.abilities.work_ability_spec ‑ Hyrax::Ability::WorkAbility when work depositor GenericWork permissions is expected not to be able to edit 28a45b89-1ec7-424a-8708-3f7d06962bcc
…
spec.abilities.work_ability_spec ‑ Hyrax::Ability::WorkAbility when work depositor Etd permissions is expected not to be able to destroy 7c7f714b-2d51-4419-b011-f5a17e2791b0
spec.abilities.work_ability_spec ‑ Hyrax::Ability::WorkAbility when work depositor Etd permissions is expected not to be able to edit 6ae8b16b-182d-4da9-bf2f-1187ca2eee34
spec.abilities.work_ability_spec ‑ Hyrax::Ability::WorkAbility when work depositor Etd permissions is expected not to be able to read 0140fdf1-26f9-41f3-90d7-84552111e6d3
spec.abilities.work_ability_spec ‑ Hyrax::Ability::WorkAbility when work depositor Etd permissions is expected not to be able to update f72daee7-26c2-4bdd-80b2-85bdbe5e142c
spec.abilities.work_ability_spec ‑ Hyrax::Ability::WorkAbility when work depositor FileSet permissions is expected not to be able to destroy 4f1c589e-56b3-44b3-a272-b501f5d113c8
spec.abilities.work_ability_spec ‑ Hyrax::Ability::WorkAbility when work depositor FileSet permissions is expected not to be able to edit 45bca3bd-aff8-4a7a-85c9-d63e2d17899a
spec.abilities.work_ability_spec ‑ Hyrax::Ability::WorkAbility when work depositor FileSet permissions is expected not to be able to read 8dfe9c2b-ec71-4491-a7f0-0dac71270b12
spec.abilities.work_ability_spec ‑ Hyrax::Ability::WorkAbility when work depositor FileSet permissions is expected not to be able to update 3d56c10b-d263-4bcc-949a-4c433cb80324
spec.abilities.work_ability_spec ‑ Hyrax::Ability::WorkAbility when work depositor GenericWork permissions is expected not to be able to destroy b4f47ef7-0a1f-4a56-a673-4319a983b703
spec.abilities.work_ability_spec ‑ Hyrax::Ability::WorkAbility when work depositor GenericWork permissions is expected not to be able to edit 80bc8e10-d08c-440b-b09f-ea0d5655997b
…

♻️ This comment has been updated with latest results.

This commit adds a missing decorator prepend to the notifications
controller.

Ref:
- notch8/palni-palci#1019
@sjproctor sjproctor merged commit b14e5de into main Mar 3, 2025
8 checks passed
@sjproctor sjproctor deleted the i1019-marks-notifications-as-read branch March 3, 2025 19:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
patch-ver for release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants