Page MenuHomePhabricator

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

Authored by ginsu on Apr 9 2024, 9:59 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Nov 3, 8:22 AM
Unknown Object (File)
Oct 12 2024, 8:50 PM
Unknown Object (File)
Oct 12 2024, 8:50 PM
Unknown Object (File)
Oct 12 2024, 8:49 PM
Unknown Object (File)
Oct 12 2024, 8:49 PM
Unknown Object (File)
Sep 28 2024, 3:13 AM
Unknown Object (File)
Sep 22 2024, 10:21 PM
Unknown Object (File)
Sep 8 2024, 8:07 AM
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.Apr 9 2024, 10:15 AM
This revision is now accepted and ready to land.Apr 9 2024, 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