Page MenuHomePhabricator

[native] navigate to community directory nux tip if user declines prompt or closes bottom sheet
Needs RevisionPublic

Authored by varun on Tue, Nov 26, 10:19 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Dec 14, 5:26 PM
Unknown Object (File)
Wed, Dec 11, 7:45 PM
Unknown Object (File)
Tue, Dec 10, 1:13 AM
Unknown Object (File)
Sun, Dec 8, 12:46 PM
Unknown Object (File)
Sun, Dec 8, 1:18 AM
Unknown Object (File)
Thu, Dec 5, 7:50 AM
Unknown Object (File)
Mon, Dec 2, 11:27 AM
Unknown Object (File)
Mon, Dec 2, 10:21 AM
Subscribers

Details

Reviewers
ashoat
tomek
Summary

Depends on D14053

I'm having trouble getting screen recordings to work on my computer, so I'll have to update this diff with a recording from my phone in the morning.

Test Plan

tested dismissing the bottom sheet with a swipe down gesture and declining the prompt by pressing the button. in both cases, the tip appeared after the sheet was closed. the tip appeared in the right spot and i was able to close it.

Diff Detail

Repository
rCOMM Comm
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

varun added 1 blocking reviewer(s): ashoat.
tomek added inline comments.
native/chat/chat.react.js
393–394

I'm not familiar with the rest of the stack, but are you sure we want these two tips to be displayed for the same button? Does this button have two purposes now?

native/components/directory-prompt-bottom-sheet.react.js
57–65

Is it possible for this sheet to appear multiple times? Are we going to show this tip every time?

native/navigation/nux-tip-overlay-backdrop.react.js
59

It's interesting that we were reading this param while this route was typed to have none: +NUXTipOverlayBackdrop: void,.

ashoat requested changes to this revision.Wed, Nov 27, 9:21 AM

Code looks good, but passing back for a screen recording... I'm not sure about the copy, and a recording would will help me iterate on it

native/chat/chat.react.js
393–394

The button doesn't have two purposes, but we have two NUX tips for it:

  1. The first is the standard one on account registration, which is already implemented (COMMUNITY_DRAWER).
  2. The second is being introduced here, and allows us to point the user to the drawer (where the discovery experience can be launched) if they decline it when we prompt them.
native/components/directory-prompt-bottom-sheet.react.js
57–65

I think that the prompt only appears once, as contrasted with the directory itself (which can be launched from the side drawer)... but it would be good for @varun to confirm that the prompts only ever appears once.

native/navigation/nux-tip-overlay-backdrop.react.js
59

Also curious for an explanation on this. Feels like some changes were left out of an earlier diff?

This revision now requires changes to proceed.Wed, Nov 27, 9:21 AM
native/components/directory-prompt-bottom-sheet.react.js
57–65

that's correct. the bottom sheet will only appear once per install. previous diff (which is still in draft state) has the handler component that makes sure it only appears once

native/navigation/nux-tip-overlay-backdrop.react.js
59

Yeah, this was my mistake… when I worked on D13917, flow didn't pick up that the route was still typed to have no params. Luckily, it complained this time when I called navigation.navigate()

I investigated this a little just now and found that flow does not (at least, not always) type check the params passed to useNavigation().navigate(). I don't know if this is intentional, but it seems concerning...

Sorry, meant to preempt this discussion with a diff comment but forgot to publish it.

native/navigation/nux-tip-overlay-backdrop.react.js
59

Ah yeah, useNavigation() is impossible to type well because the types depend on what component it's called from. In contrast, props.navigation from a React Navigation screen component will have the right type for the component.