io-app icon indicating copy to clipboard operation
io-app copied to clipboard

feat: [IA-945] Add a screen to preferences to opt-in/out reminders notifications

Open emiliopavia opened this issue 2 years ago • 3 comments

Short description

⚠️ This PR depends on #4126

This PR implements a new preference screen, in order to control the new reminder_status property of user's profile. The new feature is behind feature flag, and is still disabled in production.

Please note that the switch to control notification previews is still missing here, and will be included in another PR. Also english localization is missing here.

List Detail Error
Simulator Screen Shot - iPhone 13 - 2022-10-06 at 09 38 11 Simulator Screen Shot - iPhone 13 - 2022-10-06 at 09 38 19 Simulator Screen Shot - iPhone 13 - 2022-10-06 at 09 51 41

List of changes proposed in this pull request

  • Updated io-backend specs
  • BasePaymentFeatureListItem has been renamed to PreferencesListItem (and moved to ts/components) in order to be reused in the new screen
  • Added profileRemindersPreferenceSelector
  • Updated reducers to store the reminder_status from /profile responses
  • Created NotificationsPreferencesScreen (and added to the profile navigator)
  • Added some component tests for the new screen

How to test

Use this branch of the dev-server and set the REMINDERS_OPT_IN_ENABLED feature flag to YES. Navigate to the new screen and toggle the preference.

emiliopavia avatar Oct 05 '22 16:10 emiliopavia

Affected stories

  • 🌟 IA-945: Come CIT voglio potere ricevere notifiche di promemoria

Generated by :no_entry_sign: dangerJS against f147e15c7f87b8d8457d213204c8ff09ddf991e7

pagopa-github-bot avatar Oct 05 '22 16:10 pagopa-github-bot

Codecov Report

Merging #4128 (f147e15) into master (d35504c) will increase coverage by 0.00%. The diff coverage is 55.55%.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #4128   +/-   ##
=======================================
  Coverage   47.75%   47.76%           
=======================================
  Files        1263     1264    +1     
  Lines       25007    25033   +26     
  Branches     6546     6555    +9     
=======================================
+ Hits        11943    11957   +14     
- Misses      13014    13026   +12     
  Partials       50       50           
Impacted Files Coverage Δ
ts/components/wallet/FavoriteMethodSwitch.tsx 55.55% <ø> (ø)
...onus/bpd/components/BpdPaymentMethodCapability.tsx 63.33% <ø> (ø)
...let/component/features/PagoPaPaymentCapability.tsx 86.36% <ø> (ø)
ts/navigation/ProfileNavigator.tsx 40.00% <0.00%> (-26.67%) :arrow_down:
ts/navigation/routes.ts 100.00% <ø> (ø)
ts/screens/profile/PreferencesScreen.tsx 6.12% <0.00%> (-0.55%) :arrow_down:
...screens/profile/NotificationsPreferencesScreen.tsx 66.66% <66.66%> (ø)
ts/components/PreferencesListItem.tsx 100.00% <100.00%> (ø)
ts/store/reducers/profile.ts 54.87% <100.00%> (+1.12%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update d35504c...f147e15. Read the comment docs.

codecov[bot] avatar Oct 05 '22 16:10 codecov[bot]

@AliceAzzolini will provide the english strings by EOD

thisisjp avatar Oct 06 '22 10:10 thisisjp

:tada: All dependencies have been resolved !

dpulls[bot] avatar Oct 18 '22 14:10 dpulls[bot]