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

chore: [IOCOM-1354] NOTIFICATION_PERMISSION super and profile property #5749

Merged
merged 58 commits into from May 24, 2024

Conversation

Vangaorth
Copy link
Contributor

@Vangaorth Vangaorth commented May 7, 2024

⚠️ 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

# Conflicts:
#	ts/features/pushNotifications/hooks/usePreviewMoreInfo.tsx
#	ts/features/pushNotifications/screens/OnboardingNotificationsInfoScreenConsent.tsx
#	ts/features/pushNotifications/screens/OnboardingNotificationsPreferencesScreen.tsx
#	ts/screens/profile/NotificationsPreferencesScreen.tsx
# Conflicts:
#	package.json
#	ts/features/pushNotifications/hooks/usePreviewMoreInfo.tsx
#	ts/features/pushNotifications/screens/OnboardingNotificationsInfoScreenConsent.tsx
#	ts/features/pushNotifications/screens/OnboardingNotificationsPreferencesScreen.tsx
#	ts/screens/profile/NotificationsPreferencesScreen.tsx
#	yarn.lock
# 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
Copy link

dpulls bot commented May 23, 2024

🎉 All dependencies have been resolved !

# Conflicts:
#	ts/features/pushNotifications/sagas/__tests__/checkNotificationsPreferencesSaga.test.tsx
#	ts/features/pushNotifications/sagas/checkNotificationsPreferencesSaga.ts
#	ts/features/pushNotifications/screens/OnboardingNotificationsInfoScreenConsent.tsx
#	ts/screens/profile/NotificationsPreferencesScreen.tsx
Copy link
Contributor

@forrest57 forrest57 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Vangaorth Vangaorth merged commit 4cc55c8 into master May 24, 2024
13 checks passed
@Vangaorth Vangaorth deleted the IOCOM-1354 branch May 24, 2024 08:42
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