rainbow icon indicating copy to clipboard operation
rainbow copied to clipboard

Notifications UI & Management

Open pugson opened this issue 2 years ago • 1 comments

Fixes TEAM2-74, TEAM2-75, TEAM2-73, TEAM2-491

What changed (plus any additional context for devs)

WIP

Screen recordings / screenshots

What to test

Final checklist

  • [ ] Assigned individual reviewers?
  • [ ] Added labels? (team1/team2, critical path, release, dev QA)
  • [ ] Did you test both iOS and Android?
  • [ ] If your changes are visual, did you check both the light and dark themes?
  • [ ] Added e2e tests? If not, please specify why
  • [ ] If you added new critical path files, did you update the CODEOWNERS file?
  • [ ] If no dev QA label, did you add the PR to the QA Queue?

pugson avatar Sep 14 '22 04:09 pugson

TEAM2-74 Notifications Settings: My Wallets + Watched Wallets

PixelSnap 2022-06-01 at 7.31.13 [email protected]

  • [X] List wallets you control in one group
  • [X] List wallets you're watching in another group
  • [X] Toggle to enable/disable all notifications for each group, which subscribes to a particular Firebase topic.
  • [X] Show enabled notification types in the label under each wallet
  • [X] ⚠️ Add a section for WalletConnect/important notifications so those can be kept enabled in case people wanna kill all other notifications. If possible, do a check if the app has revoked notification permissions and show a warning that they need to be enabled to continue regular app operation.
TEAM2-75 Notifications Settings: Single wallet controls

PixelSnap 2022-06-01 at 7.33.43 [email protected]

  • [X] Show a toggle that enables/disables controls over specific notification types

  • [X] Enabling the toggle subscribes to this specific Firebase topic for this wallet

  • [X] Disable the toggle unsubscribes from this specific Firebase topic for this wallet

  • [X] Toggle should be disabled by default and types should be hidden unless notifications have been globally enabled from the previous screen

  • [X] When the "Allow Notifications" toggle is enabled the app should subscribe to all Firebase topics that are also enabled below

  • [X] Each notification type toggle state should be saved in memory for each wallet.

    If you disable some toggles and then globally disable notifications, those settings should be saved if you choose to globally enable notifications again, either for all wallets or only for this one.

TEAM2-73 Unsubscribe from all topics when removing a wallet

App should unsubscribe from all notification topics when a wallet is removed otherwise the user will keep getting notifications even with the wallet removed. They won't be able to stop them unless they re-add the wallet and manually turn off notifications for it.

TEAM2-491 Enable all notifications for owned + watched wallets when you first launch the app after the update

We need to populate default notification settings for existing wallets that were added before notifications were available.

linear[bot] avatar Sep 14 '22 04:09 linear[bot]

/testflight

estebanmino avatar Sep 22 '22 15:09 estebanmino

TEAM2-81 App needs to migrate addresses not added internally when notifications rolls out

Because the app is only subscribing to firebase topics, we will need a way to retroactively migrate wallets that have not been used post-release of RNBW-2104 to enable tracking on the push notification backend.

When push notifications is released in the app, the app should as a one-time migration send the address of all wallets the user has in the app (can do this separately for privacy if necessary) to refraction so we start tracking their address

linear[bot] avatar Sep 24 '22 00:09 linear[bot]

when toggling "My Wallets" on or off, is doing the same with all my wallets so if i only want to turn one wallet on, i'd need to turn all my wallets on first and then turn off the ones i don't want notifications off, not ideal IMO. we talked about this on slack

@estebanmino gonna discuss this behavior with jeremy to make sure we're getting it right


update: alright got news from jeremy

CleanShot 2022-09-27 at 03 23 11 PM@2x

pugson avatar Sep 24 '22 00:09 pugson

/testflight

pugson avatar Sep 24 '22 00:09 pugson

/testflight

pugson avatar Sep 24 '22 10:09 pugson

still a wip, i need to change some toggling logic based on new feedback from jeremy + fix a permissions edge cases. gonna add android PoW at the end.

pugson avatar Sep 28 '22 10:09 pugson

TEAM2-506 Cannot enable notifications when app never prompted for permissions

If you never scanned a QR code for WalletConnect then there was never a prompt to enable notification permissions with iOS.

We should catch this state and modify the copy to allow for first-time requesting notification permissions.

image.png

image.png

linear[bot] avatar Sep 28 '22 17:09 linear[bot]

TEAM2-507 Janky flash of permissions note when opening Notifications for the first time

When you open the app for the first time the notification permissions note at the top flashes quickly during the transition and disappears.

It should default to being hidden with useState and shown when a value changes inside useEffect.

linear[bot] avatar Sep 28 '22 17:09 linear[bot]

added android screenshots

pugson avatar Sep 28 '22 19:09 pugson

TEAM2-509 Default notifications to "off" for watched wallets

• notifications on for all existing owned wallets • notifications on for newly created / imported wallets • notifications off for watched wallets already in the app • notifications off for new watched wallets added by user

linear[bot] avatar Sep 29 '22 15:09 linear[bot]