Page MenuHomePhabricator

[native] Split onClosing and onClosed params to SIWEPanel
ClosedPublic

Authored by ashoat on May 16 2023, 12:01 PM.
Tags
None
Referenced Files
F3397374: D7843.id26561.diff
Sun, Dec 1, 5:24 PM
Unknown Object (File)
Fri, Nov 29, 4:54 PM
Unknown Object (File)
Fri, Nov 29, 1:41 PM
Unknown Object (File)
Sun, Nov 17, 7:59 PM
Unknown Object (File)
Sun, Nov 17, 3:05 PM
Unknown Object (File)
Oct 26 2024, 11:44 PM
Unknown Object (File)
Oct 26 2024, 11:44 PM
Unknown Object (File)
Oct 26 2024, 11:43 PM
Subscribers

Details

Summary

Today, SIWEPanel takes a single onClose that gets called in two scenarios:

  1. The user has closed the bottom sheet, and its dismissal animation is beginning
  2. The dismissal animation has completed

In the case of FullscreenSIWEPanel (the only existing usage), we don't distinguish between these two because we need to animate back to the prompt screen anyways. We want to start that animation as soon as possible, and can defer the "unrender" of SIWEPanel until that animation completes.

However, in the upcoming new usage for the ConnectEthereum screen, we don't have any need for a secondary animation like that. We can't "unrender" SIWEPanel until the primary animation has completed, and so our options are to either sleep for some time (bad), or to separate these two callbacks (better).

Test Plan

I tested all ways of closing the SIWEPanel:

  1. Pressing the main LoggedOutModal back button
  2. Swiping the bottom sheet closed
  3. Pressing the close button inside the WebView. (Note that pressing the WalletConnect close button doesn't work, but this doesn't work currently anyways)

Diff Detail

Repository
rCOMM Comm
Branch
ashoat/registration
Lint
No Lint Coverage
Unit
No Test Coverage