Page MenuHomePhabricator

[native] Introduce `CommunityCreationNavigator`

Authored by atul on Tue, May 23, 1:19 PM.
Referenced Files
F570740: D7950.id26987.diff
Sat, Jun 3, 5:19 PM
F570448: D7950.id26984.diff
Sat, Jun 3, 5:01 AM
Sat, Jun 3, 3:01 AM
F570221: D7950.id26986.diff
Fri, Jun 2, 9:04 PM
F570129: D7950.id26914.diff
Fri, Jun 2, 6:51 PM
Unknown Object (File)
Fri, Jun 2, 11:00 AM
Unknown Object (File)
Tue, May 30, 3:59 PM
Unknown Object (File)
Tue, May 30, 11:18 AM



Heavily inspired by RegistrationNavigator, this diff introduces CommunityCreationNavigator. This navigator will "handle" the screens of the community creation flow. Specifically the community configuration screen and the optional "Add members" screen.

WARNING: Please let me know if this is the wrong approach. My understanding is that because we have > 1 screen in sequence as part of our flow we should create a new navigation stack. HOWEVER, I have a very very limited understanding of navigation on native, so please correct me if that assumption is incorrect and I should approach this differently.
Test Plan
  1. Set isCommunityCreationButtonEnabled to true.
  2. Open community drawer and press "Create community."
  3. Observe that CommunityConfiguration is displayed (by looking at screen "title").

Simulator Screenshot - Fresh iPhone 14 Pro - 2023-05-23 at 16.26.55.png (2×1 px, 86 KB)

Diff Detail

rCOMM Comm
Lint Not Applicable
Tests Not Applicable

Event Timeline

atul requested review of this revision.Tue, May 23, 1:40 PM
ashoat requested changes to this revision.Tue, May 23, 2:16 PM

High-level approach is great, but some comments below

31 ↗(On Diff #26914)

I'm not sure since I don't have the link to the Figma designs handy, but if the title is different for different screens, this might be something you want to specify to CommunityConfiguration directly:

  options={{ headerTitle: 'Create a community' }}

(Memoized of course)

32 ↗(On Diff #26914)

I use white directly in the registration flow, but that flow is built for dark mode only. I think you'll need to call useColors in CommunityCreationNavigator, and construct screenOptions with the appropriate color there

207 ↗(On Diff #26914)

Why include disableGesturesScreenOptions here? Feels like it would be better with gestures enabled

This revision now requires changes to proceed.Tue, May 23, 2:16 PM
atul marked 3 inline comments as done.Wed, May 24, 7:18 AM
atul added inline comments.
31 ↗(On Diff #26914)

Thanks for catching that, made the change

32 ↗(On Diff #26914)

Updated to use colors.panelForegroundLabel

207 ↗(On Diff #26914)

No good reason, removed that

ashoat added inline comments.
50–52 ↗(On Diff #26985)

Doesn't really matter, and partly my fault for suggesting memoization... but this could be defined outside the component

This revision is now accepted and ready to land.Wed, May 24, 7:21 AM
atul marked 3 inline comments as done.Wed, May 24, 7:23 AM
atul added inline comments.
50–52 ↗(On Diff #26985)

True, will make that change

pull communityConfigurationOptions out of component