Page MenuHomePhabricator

[native] flip farcaster prompt based on fid prop instead of context
ClosedPublic

Authored by ginsu on Tue, Apr 9, 9:59 AM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Apr 16, 12:09 PM
Unknown Object (File)
Mon, Apr 15, 7:07 PM
Unknown Object (File)
Mon, Apr 15, 6:20 PM
Unknown Object (File)
Sun, Apr 14, 9:28 AM
Unknown Object (File)
Sat, Apr 13, 2:46 PM
Unknown Object (File)
Sat, Apr 13, 7:29 AM
Unknown Object (File)
Fri, Apr 12, 9:13 AM
Unknown Object (File)
Thu, Apr 11, 12:47 PM
Subscribers

Details

Summary

When reusing the FarcasterPrompt component in the connect farcaster bottom sheet I run into the issue that when the bottom sheet closes the FarcasterPrompt displays the disconnected text since the fid is now set. To give me more control of when the FarcasterPrompt displays the disconnect text I changed the condition to be based on a prop rather than the context

Depends on D11561

Test Plan

Confirmed that the FarcasterPrompt component has no regressions in the registration flow + farcaster account settings + connect farcaster bottom sheet

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

ginsu requested review of this revision.Tue, Apr 9, 10:15 AM
This revision is now accepted and ready to land.Tue, Apr 9, 10:23 PM
native/profile/farcaster-account-settings.react.js
27 ↗(On Diff #38948)

Since the prop is based on the FID in the context, won't the same effect still happen?

native/profile/farcaster-account-settings.react.js
27 ↗(On Diff #38948)

Yes it is intentional to have the same effect for FarcasterAccountSettings.

We do want FarcasterAccountSettings to be able to show both the connect + the disconnect text; however, for the registration flow + the connect farcaster bottom sheet we only want to show the connect text and this is why FarcasterPrompt only passes the showDisconnectText

native/profile/farcaster-account-settings.react.js
27 ↗(On Diff #38948)

Ah, got it – for FarcasterAccountSettings we want the FarcasterPrompt to flip as soon as the request succeeds

native/profile/farcaster-account-settings.react.js
27 ↗(On Diff #38948)

Yes I felt that would be reasonable, but lmk if you disagree or think there is a better way to handle this