Page MenuHomePhabricator

D13177.id43805.diff
No OneTemporary

D13177.id43805.diff

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
@@ -5,16 +5,17 @@
import { values } from 'lib/utils/objects.js';
import type { AppNavigationProp } from '../navigation/app-navigator.react.js';
+import type { NUXTipRouteNames } from '../navigation/route-names.js';
import {
CommunityDrawerTipRouteName,
MutedTabTipRouteName,
+ HomeTabTipRouteName,
} from '../navigation/route-names.js';
-import type { NUXTipRouteNames } from '../navigation/route-names.js';
const nuxTip = Object.freeze({
COMMUNITY_DRAWER: 'community_drawer',
- MUTED: 'muted',
HOME: 'home',
+ MUTED: 'muted',
});
export type NUXTip = $Values<typeof nuxTip>;
@@ -38,6 +39,11 @@
nextRouteName: CommunityDrawerTipRouteName,
},
[nuxTip.COMMUNITY_DRAWER]: {
+ nextTip: nuxTip.HOME,
+ tooltipLocation: 'below',
+ nextRouteName: HomeTabTipRouteName,
+ },
+ [nuxTip.HOME]: {
nextTip: nuxTip.MUTED,
tooltipLocation: 'below',
nextRouteName: MutedTabTipRouteName,
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
@@ -7,6 +7,7 @@
import ActionResultModal from './action-result-modal.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';
import MutedTabTip from './muted-tab-tip.react.js';
import NUXTipOverlayBackdrop from './nux-tip-overlay-backdrop.react.js';
import { createOverlayNavigator } from './overlay-navigator.react.js';
@@ -16,6 +17,7 @@
} from './overlay-navigator.react.js';
import type { RootNavigationProp } from './root-navigator.react.js';
import {
+ HomeTabTipRouteName,
CommunityDrawerTipRouteName,
MutedTabTipRouteName,
NUXTipOverlayBackdropRouteName,
@@ -165,6 +167,7 @@
name={CommunityDrawerTipRouteName}
component={CommunityDrawerTip}
/>
+ <App.Screen name={HomeTabTipRouteName} component={HomeTabTip} />
<App.Screen name={MutedTabTipRouteName} component={MutedTabTip} />
<App.Screen
name={NUXTipOverlayBackdropRouteName}
diff --git a/native/navigation/home-tab-tip.react.js b/native/navigation/home-tab-tip.react.js
new file mode 100644
--- /dev/null
+++ b/native/navigation/home-tab-tip.react.js
@@ -0,0 +1,22 @@
+// @flow
+
+import * as React from 'react';
+
+import { createChatTabBarButton } from './chat-tab-bar-button.react.js';
+import { homeChatThreadListOptions } from '../chat/chat-options.js';
+import {
+ type NUXTipsOverlayProps,
+ createNUXTipsOverlay,
+} from '../tooltip/nux-tips-overlay.react.js';
+
+const homeTabTipText =
+ 'Your home screen only shows the chats you’ve joined. ' +
+ 'When you join a community on Comm, you only join the root of the tree.';
+
+const HomeTabTip: React.ComponentType<NUXTipsOverlayProps<'HomeTabTip'>> =
+ createNUXTipsOverlay(
+ createChatTabBarButton<'HomeTabTip'>(homeChatThreadListOptions),
+ homeTabTipText,
+ );
+
+export default HomeTabTip;
diff --git a/native/navigation/overlay-navigator.react.js b/native/navigation/overlay-navigator.react.js
--- a/native/navigation/overlay-navigator.react.js
+++ b/native/navigation/overlay-navigator.react.js
@@ -42,11 +42,13 @@
CommunityDrawerTipRouteName,
MutedTabTipRouteName,
NUXTipOverlayBackdropRouteName,
+ HomeTabTipRouteName,
} from './route-names.js';
import { isMessageTooltipKey } from '../chat/utils.js';
const newReanimatedRoutes = new Set([
CommunityDrawerTipRouteName,
+ HomeTabTipRouteName,
MutedTabTipRouteName,
NUXTipOverlayBackdropRouteName,
]);
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
@@ -169,6 +169,7 @@
export const ThreadSettingsNotificationsRouteName =
'ThreadSettingsNotifications';
export const CommunityDrawerTipRouteName = 'CommunityDrawerTip';
+export const HomeTabTipRouteName = 'HomeTabTip';
export const MutedTabTipRouteName = 'MutedTabTip';
export const NUXTipOverlayBackdropRouteName = 'NUXTipOverlayBackdrop';
@@ -203,6 +204,7 @@
export type NUXTipRouteNames =
| typeof CommunityDrawerTipRouteName
+ | typeof HomeTabTipRouteName
| typeof MutedTabTipRouteName;
export type MessageTooltipRouteNames =
@@ -233,6 +235,7 @@
+VideoPlaybackModal: VideoPlaybackModalParams,
+TogglePinModal: TogglePinModalParams,
+CommunityDrawerTip: NUXTipsOverlayParams,
+ +HomeTabTip: NUXTipsOverlayParams,
+MutedTabTip: NUXTipsOverlayParams,
+NUXTipOverlayBackdrop: void,
...TooltipModalParamList,

File Metadata

Mime Type
text/plain
Expires
Sat, Dec 21, 5:01 AM (17 h, 57 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2683653
Default Alt Text
D13177.id43805.diff (4 KB)

Event Timeline