Page MenuHomePhabricator

[native] Prevent user from leaving RegistrationTerms during registration request
ClosedPublic

Authored by ashoat on Tue, Apr 30, 12:45 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, May 13, 6:22 PM
Unknown Object (File)
Mon, May 13, 3:24 AM
Unknown Object (File)
Mon, May 13, 1:07 AM
Unknown Object (File)
Sun, May 12, 3:11 PM
Unknown Object (File)
Tue, May 7, 7:10 PM
Unknown Object (File)
Tue, May 7, 2:30 PM
Unknown Object (File)
Tue, May 7, 1:28 PM
Unknown Object (File)
Tue, May 7, 5:38 AM
Subscribers

Details

Summary

This addresses ENG-7677.

We want to prevent the user from dismissing RegistrationTerms during an ongoing registration request because otherwise, they can re-enter it and trigger a second registration request.

Depends on D11848

Test Plan
  1. I applied this patch, which adds a 10s wait before registration attempts, and forces keyserver auth to fail
  2. I then testing the behavior in the UI. See video below

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

native/account/registration/registration-terms.react.js
80 ↗(On Diff #39714)

This prevents the user from going back. According to the React Navigation docs, it seems like it's only thing that should be necessary. But I found that without setting gestureEnabled the swipe-back would visibly complete, even though the screen would not technically dismiss, which led to an experience where I was looking at the prior screen but couldn't press anything or do anything.

I added headerLeft because I wanted to indicate to the user that going back was not possible at this time. I could probably have figured out a way to "disable" the button instead (ie. gray it out and prevent animation when pressed), but would be a bit more complicated, and I'm not sure it matters a ton.

Harbormaster returned this revision to the author for changes because remote builds failed.Tue, Apr 30, 12:58 PM
Harbormaster failed remote builds in B28610: Diff 39714!
native/flow-typed/npm/@react-navigation/core_v6.x.x.js
1376 ↗(On Diff #39715)

We used to use $Shape for these types, but then we switched to $Partial when $Shape was deprecated. It looks like $Partial only supports undefined (and not null), but React Navigation definitely allows null here, and treats it as "no headerLeft" (as opposed to undefined, which is treated as "default headerLeft").

This revision is now accepted and ready to land.Wed, May 1, 11:46 AM
ashoat retitled this revision from [native] Prevent use from leaving RegistrationTerms during registration request to [native] Prevent user from leaving RegistrationTerms during registration request.Wed, May 1, 3:09 PM