clients icon indicating copy to clipboard operation
clients copied to clipboard

[PM-5559] Implement User Notification Settings state provider

Open jprusik opened this issue 1 year ago • 2 comments
trafficstars

Type of change

  • Tech debt (refactoring, code cleanup, dependency upgrades, etc)

Objective

  • Implement User Notification Settings state provider
  • migrate disableAddLoginNotification and disableChangedPasswordNotification global settings to user notification settings state provider

Code changes

  • Created User Notification Settings state service
  • Replaced instances of state now handled by the User Notification Settings service with their appropriate counterparts
  • Created migration script to upgrade or rollback state storage changes

Notes

  • Similar to Autofill Settings, we don't clear out the global notification settings
  • disableAddLoginNotification and disableChangedPasswordNotification have been renamed with "enabled" prefixes, and their call-site logic appropriately inverted.
  • Semantic adjustment: "User Notification" to help disambiguate from internal notifications/messaging
  • Semantic adjustment: the two notification bar messages concerned in these migrations primarily prompt the user for action (and secondarily offer feedback). I've named these two cases with a "prompt" suffix as a subtype of notifications. This is done with the anticipation that this service will appropriately handle feedback-only (no user action) messages as well at some point.

jprusik avatar Feb 21 '24 22:02 jprusik

Codecov Report

Attention: Patch coverage is 38.15789% with 47 lines in your changes are missing coverage. Please review.

Project coverage is 25.06%. Comparing base (b691b6b) to head (7be84ac). Report is 2 commits behind head on main.

Files Patch % Lines
...ill/services/user-notification-settings.service.ts 0.00% 17 Missing :warning:
...s/browser/src/autofill/content/notification-bar.ts 0.00% 11 Missing :warning:
...ries/user-notification-settings-service.factory.ts 0.00% 6 Missing :warning:
...ps/browser/src/popup/settings/options.component.ts 0.00% 6 Missing :warning:
...src/autofill/background/notification.background.ts 70.00% 3 Missing :warning:
apps/browser/src/background/main.background.ts 0.00% 2 Missing :warning:
apps/browser/src/popup/services/services.module.ts 0.00% 1 Missing :warning:
...ve-user-notification-settings-to-state-provider.ts 95.00% 0 Missing and 1 partial :warning:
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #8032      +/-   ##
==========================================
+ Coverage   25.01%   25.06%   +0.04%     
==========================================
  Files        2245     2248       +3     
  Lines       65710    65776      +66     
  Branches    12401    12410       +9     
==========================================
+ Hits        16435    16484      +49     
- Misses      47936    47952      +16     
- Partials     1339     1340       +1     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar Feb 21 '24 22:02 codecov[bot]

Logo Checkmarx One – Scan Summary & Details09db3d2b-ffb8-4828-8d4b-4ddc92b3014d

No New Or Fixed Issues Found

bitwarden-bot avatar Feb 21 '24 23:02 bitwarden-bot