diff --git a/native/chat/chat.react.js b/native/chat/chat.react.js --- a/native/chat/chat.react.js +++ b/native/chat/chat.react.js @@ -391,6 +391,7 @@ element?.measure(callback); registerTipButton(nuxTip.COMMUNITY_DRAWER, measure); + registerTipButton(nuxTip.COMMUNITY_DIRECTORY, measure); }, [registerTipButton], ); diff --git a/native/components/directory-prompt-bottom-sheet.react.js b/native/components/directory-prompt-bottom-sheet.react.js --- a/native/components/directory-prompt-bottom-sheet.react.js +++ b/native/components/directory-prompt-bottom-sheet.react.js @@ -6,16 +6,22 @@ import { useSafeAreaInsets } from 'react-native-safe-area-context'; import DirectoryPrompt from './directory-prompt.react.js'; +import { type NUXTip, nuxTip } from './nux-tips-context.react.js'; import PrimaryButton from './primary-button.react.js'; import { BottomSheetContext } from '../bottom-sheet/bottom-sheet-provider.react.js'; import BottomSheet from '../bottom-sheet/bottom-sheet.react.js'; import type { RootNavigationProp } from '../navigation/root-navigator.react.js'; -import type { NavigationRoute } from '../navigation/route-names.js'; +import { + type NavigationRoute, + NUXTipOverlayBackdropRouteName, +} from '../navigation/route-names.js'; const directoryPromptHeight = 300; const marginBottom = 40; const buttonHeight = 61; +const orderedTips: $ReadOnlyArray = [nuxTip.COMMUNITY_DIRECTORY]; + type Props = { +navigation: RootNavigationProp<'DirectoryPromptBottomSheet'>, +route: NavigationRoute<'DirectoryPromptBottomSheet'>, @@ -48,13 +54,19 @@ console.log('User accepted the prompt'); }, []); - const onPressDecline = React.useCallback(() => { - console.log('User declined the prompt'); - }, []); + const onCloseOrPressDecline = React.useCallback(() => { + goBack(); + navigation.navigate<'NUXTipOverlayBackdrop'>({ + name: NUXTipOverlayBackdropRouteName, + params: { + orderedTips, + }, + }); + }, [goBack, navigation]); const directoryPromptBottomSheet = React.useMemo( () => ( - + @@ -66,7 +78,7 @@ variant="enabled" /> @@ -74,7 +86,7 @@ ), - [goBack, onPressAccept, onPressDecline], + [onPressAccept, onCloseOrPressDecline], ); return directoryPromptBottomSheet; diff --git a/native/components/nux-tips-context.react.js b/native/components/nux-tips-context.react.js --- a/native/components/nux-tips-context.react.js +++ b/native/components/nux-tips-context.react.js @@ -11,6 +11,7 @@ MutedTabTipRouteName, HomeTabTipRouteName, IntroTipRouteName, + CommunityDirectoryTipRouteName, } from '../navigation/route-names.js'; const nuxTip = Object.freeze({ @@ -18,6 +19,7 @@ COMMUNITY_DRAWER: 'community_drawer', HOME: 'home', MUTED: 'muted', + COMMUNITY_DIRECTORY: 'community_directory', }); export type NUXTip = $Values; @@ -46,6 +48,10 @@ routeName: MutedTabTipRouteName, tooltipLocation: 'below', }, + [nuxTip.COMMUNITY_DIRECTORY]: { + tooltipLocation: 'below', + routeName: CommunityDirectoryTipRouteName, + }, }; function getNUXTipParams(currentTipKey: NUXTip): NUXTipParams { diff --git a/native/navigation/app-navigator.react.js b/native/navigation/app-navigator.react.js --- a/native/navigation/app-navigator.react.js +++ b/native/navigation/app-navigator.react.js @@ -5,6 +5,7 @@ import { PersistGate } from 'redux-persist/es/integration/react.js'; import ActionResultModal from './action-result-modal.react.js'; +import CommunityDirectoryTip from './community-directory-tip.react.js'; import { CommunityDrawerNavigator } from './community-drawer-navigator.react.js'; import CommunityDrawerTip from './community-drawer-tip.react.js'; import HomeTabTip from './home-tab-tip.react.js'; @@ -20,6 +21,7 @@ import { HomeTabTipRouteName, CommunityDrawerTipRouteName, + CommunityDirectoryTipRouteName, MutedTabTipRouteName, NUXTipOverlayBackdropRouteName, IntroTipRouteName, @@ -174,6 +176,10 @@ /> + , +> = createNUXTipsOverlay(CommunityDrawerButtonIcon, communityDrawerText); + +export default CommunityDirectoryTip; diff --git a/native/navigation/community-drawer-button.react.js b/native/navigation/community-drawer-button.react.js --- a/native/navigation/community-drawer-button.react.js +++ b/native/navigation/community-drawer-button.react.js @@ -33,6 +33,7 @@ React.useEffect(() => { return () => { registerTipButton(nuxTip.COMMUNITY_DRAWER, null); + registerTipButton(nuxTip.COMMUNITY_DIRECTORY, null); }; }, [registerTipButton]); diff --git a/native/navigation/nux-tip-overlay-backdrop.react.js b/native/navigation/nux-tip-overlay-backdrop.react.js --- a/native/navigation/nux-tip-overlay-backdrop.react.js +++ b/native/navigation/nux-tip-overlay-backdrop.react.js @@ -7,11 +7,18 @@ import type { AppNavigationProp } from './app-navigator.react.js'; import { OverlayContext } from './overlay-context.js'; import type { NUXTipRouteNames, NavigationRoute } from './route-names'; -import { getNUXTipParams } from '../components/nux-tips-context.react.js'; +import { + getNUXTipParams, + type NUXTip, +} from '../components/nux-tips-context.react.js'; import { useStyles } from '../themes/colors.js'; import { animationDuration } from '../tooltip/nux-tips-overlay.react.js'; import { AnimatedView } from '../types/styles.js'; +export type NUXTipsOverlayBackdropParams = { + +orderedTips: $ReadOnlyArray, +}; + type Props = { +navigation: AppNavigationProp<'NUXTipOverlayBackdrop'>, +route: NavigationRoute<'NUXTipOverlayBackdrop'>, diff --git a/native/navigation/route-names.js b/native/navigation/route-names.js --- a/native/navigation/route-names.js +++ b/native/navigation/route-names.js @@ -4,6 +4,7 @@ import type { ActionResultModalParams } from './action-result-modal.react.js'; import type { InviteLinkModalParams } from './invite-link-modal.react'; +import type { NUXTipsOverlayBackdropParams } from './nux-tip-overlay-backdrop.react.js'; import type { AvatarSelectionParams } from '../account/registration/avatar-selection.react.js'; import type { ConnectEthereumParams } from '../account/registration/connect-ethereum.react.js'; import type { ConnectFarcasterParams } from '../account/registration/connect-farcaster.react.js'; @@ -174,6 +175,7 @@ 'ThreadSettingsNotifications'; export const IntroTipRouteName = 'IntroTip'; export const CommunityDrawerTipRouteName = 'CommunityDrawerTip'; +export const CommunityDirectoryTipRouteName = 'CommunityDirectoryTip'; export const HomeTabTipRouteName = 'HomeTabTip'; export const MutedTabTipRouteName = 'MutedTabTip'; export const NUXTipOverlayBackdropRouteName = 'NUXTipOverlayBackdrop'; @@ -213,7 +215,8 @@ | typeof IntroTipRouteName | typeof CommunityDrawerTipRouteName | typeof HomeTabTipRouteName - | typeof MutedTabTipRouteName; + | typeof MutedTabTipRouteName + | typeof CommunityDirectoryTipRouteName; export type MessageTooltipRouteNames = | typeof RobotextMessageTooltipModalRouteName @@ -244,9 +247,10 @@ +TogglePinModal: TogglePinModalParams, +IntroTip: NUXTipsOverlayParams, +CommunityDrawerTip: NUXTipsOverlayParams, + +CommunityDirectoryTip: NUXTipsOverlayParams, +HomeTabTip: NUXTipsOverlayParams, +MutedTabTip: NUXTipsOverlayParams, - +NUXTipOverlayBackdrop: void, + +NUXTipOverlayBackdrop: NUXTipsOverlayBackdropParams, ...TooltipModalParamList, };