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

feat: [IOCOM-1133,IOCOM-1235,IOCOM-1372] Push Notification Opt In screen, new DS #5734

Merged
merged 54 commits into from May 23, 2024

Conversation

Vangaorth
Copy link
Contributor

@Vangaorth Vangaorth commented May 2, 2024

⚠️ This PR depends on #5732 ⚠️
⚠️ This PR depends on io-app-design-system#253 ⚠️
⚠️ This PR depends on io-app-design-system#256 ⚠️

Short description

This PR aligns the Push Notifications Opt In screen and the profile push notification settings to the new DS

Both on
upper part
Both on
scrolled down
Bottom sheet
On1 Simulator Screenshot - iPhone 15 - 2024-05-10 at 12 26 26 OnBS
Preview Off
Reminder On
Preview On
Reminder Off
Both Off
Pre Rem Off
Profile
Both on
Profile
Bottom sheet
ProfileOnPreOnRem ProfileBS
Profile
On Off
Profile
Off On
Profile
Off Off
ProfileOnPreOffRem ProfileOffPreOnRem ProfileOffPreOffRem

List of changes proposed in this pull request

  • All related onboarding screens have been ported to the new DS
  • A lot of test snapshot have been updated due to a change in margins on the DS library

How to test

Using the io-dev-api-server, configure the profile in order to have both reminder_status and push_notifications_content_type set to undefined. Perform a login and the opt-in screen should appear. Check that both values are properly set after tapping the "Continue" button.
For the profile screen, navigate to it and change switches' values

@pagopa-github-bot pagopa-github-bot changed the title [IOCOM-1133] Push Notification Opt In screen, new DS feat: [IOCOM-1133] Push Notification Opt In screen, new DS May 2, 2024
@pagopa-github-bot
Copy link
Collaborator

pagopa-github-bot commented May 2, 2024

Warnings
⚠️

Multiple stories with different types are associated with this Pull request.
Only one tag will be added, following the order: feature > bug > chore

Affected stories

  • 🌟 IOCOM-1133: [App] Adattare UI schermata Opt-In notifiche Push su onboarding
    subtask of
    • IOCOM-1132: Adottare il nuovo design system nelle schermate di primo onboarding utente su app IO
  • 🌟 IOCOM-1235: [App] Adattare UI schermata Opt-In notifiche Push su profilo
    subtask of
    • IOCOM-1132: Adottare il nuovo design system nelle schermate di primo onboarding utente su app IO
  • 🌟 IOCOM-1372: [App] Cambiare il componente FeatureInfo in un Banner in fondo alla schermata di OptIn
    subtask of
    • IOCOM-1132: Adottare il nuovo design system nelle schermate di primo onboarding utente su app IO

Generated by 🚫 dangerJS against db3a606

Copy link

dpulls bot commented May 22, 2024

🎉 All dependencies have been resolved !

# Conflicts:
#	ts/features/pushNotifications/components/__tests__/NotificationPreviewSample.test.tsx
#	ts/features/pushNotifications/hooks/usePreviewMoreInfo.tsx
#	ts/features/pushNotifications/sagas/checkNotificationsPermissionsSaga.ts
#	ts/features/pushNotifications/sagas/checkNotificationsPreferencesSaga.ts
#	ts/features/pushNotifications/screens/OnboardingNotificationsInfoScreenConsent.tsx
#	ts/features/pushNotifications/screens/OnboardingNotificationsPreferencesScreen.tsx
#	ts/features/pushNotifications/screens/__tests__/OnboardingNotificationsInfoScreenConsent.test.tsx
#	ts/features/pushNotifications/screens/__tests__/OnboardingNotificationsPreferencesScreen.test.tsx
#	ts/features/pushNotifications/utils/configurePushNotification.ts
#	ts/sagas/startup/__tests__/checkNotificationsPermissionsSaga.test.tsx
#	ts/screens/profile/NotificationsPreferencesScreen.tsx
@Vangaorth Vangaorth merged commit 45d20bc into master May 23, 2024
11 checks passed
@Vangaorth Vangaorth deleted the IOCOM-1133-push branch May 23, 2024 15:25
Vangaorth added a commit that referenced this pull request May 24, 2024
…rty (#5749)

⚠️ This PR depends on #5734 ⚠️

## Short description
This PR adds the `NOTIFICATION_PERMISSION: "enabled"/"disabled"`
property to both super and profile properties.
It also refactors the `checkNotificationsPreferencesSaga` to be more
readable.

## List of changes proposed in this pull request
- `ts/screens/profile/analytics/index.ts`: type and utility to convert
from boolean to type
- `ts/mixpanelConfig/profileProperties.ts` and
`ts/mixpanelConfig/superProperties.ts`: property added with related code
to compute its value
-
`ts/features/pushNotifications/sagas/checkNotificationsPreferencesSaga.ts`:
code flow refactored to be more readable (with full tests)
-
`ts/features/pushNotifications/screen/OnboardingNotificationsInfoScreenConsent.ts`:
modal dismissal moved to the saga above

## How to test
Using the io-dev-api-server, check that:
- the analytics event value is read properly before and after the
permission is given
- the original flow for the profile notification onboarding still works
- for an onboarded user, the permission popup is shown
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

None yet

3 participants