Page MenuHomePhabricator

[native][landing] Close SIWEPanel when close button in WebView pressed
ClosedPublic

Authored by ashoat on Dec 23 2022, 7:08 AM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Nov 5, 7:30 AM
Unknown Object (File)
Tue, Nov 5, 4:07 AM
Unknown Object (File)
Tue, Nov 5, 4:07 AM
Unknown Object (File)
Tue, Nov 5, 4:07 AM
Unknown Object (File)
Mon, Nov 4, 10:34 AM
Unknown Object (File)
Mon, Nov 4, 10:34 AM
Unknown Object (File)
Mon, Nov 4, 10:34 AM
Unknown Object (File)
Mon, Nov 4, 10:18 AM
Subscribers

Details

Summary

We need to thread this event over to the native side.

Test Plan

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

landing/siwe.react.js
102 ↗(On Diff #20064)

This hook is not exported by RainbowKit, and it's not clear why.

I decided to patch-package it so I could get it. The alternative would've been to monitor the DOM for when the modal disappears, but that seems worse.

native/account/siwe-panel.react.js
97–98 ↗(On Diff #20064)

If we call just onClose, then the BottomSheet doesn't start dismissing and just disappears when SIWEPanel stops being rendered.

If we just call closeBottomSheet, then onClose gets triggered once the bottom sheet fully dismisses, which leads to two animations being run in sequence.

By calling both at the same time, we get the animations to run together.

landing/siwe.react.js
102 ↗(On Diff #20064)

It looks like we'll have to monitor the DOM to catch the WalletConnect modal, though... we need to know when it appears so we can resize the BottomSheet

[video]

Looks like you were planning on attaching video to Test Plan?

This revision is now accepted and ready to land.Dec 23 2022, 11:51 AM

Ah yeah, oops!