Page MenuHomePhabricator

D13180.id43807.diff
No OneTemporary

D13180.id43807.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
@@ -10,9 +10,11 @@
CommunityDrawerTipRouteName,
MutedTabTipRouteName,
HomeTabTipRouteName,
+ IntroTipRouteName,
} from '../navigation/route-names.js';
const nuxTip = Object.freeze({
+ INTRO: 'intro',
COMMUNITY_DRAWER: 'community_drawer',
HOME: 'home',
MUTED: 'muted',
@@ -22,7 +24,7 @@
type NUXTipParams = {
+nextTip: ?NUXTip,
- +tooltipLocation: 'below' | 'above',
+ +tooltipLocation: 'below' | 'above' | 'absolute',
+nextRouteName: ?NUXTipRouteNames,
+exitingCallback?: <Route: NUXTipRouteNames>(
navigation: AppNavigationProp<Route>,
@@ -34,6 +36,11 @@
const nuxTipParams: { +[NUXTipParamsKeys]: NUXTipParams } = {
[firstNUXTipKey]: {
+ nextTip: nuxTip.INTRO,
+ tooltipLocation: 'absolute',
+ nextRouteName: IntroTipRouteName,
+ },
+ [nuxTip.INTRO]: {
nextTip: nuxTip.COMMUNITY_DRAWER,
tooltipLocation: 'below',
nextRouteName: CommunityDrawerTipRouteName,
@@ -102,6 +109,9 @@
const tipsProps = React.useMemo(() => {
const result: { [tip: NUXTip]: TipProps } = {};
for (const type of values(nuxTip)) {
+ if (type === nuxTip.INTRO) {
+ continue;
+ }
if (!tipsPropsState[type]) {
return null;
}
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
@@ -8,6 +8,7 @@
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 IntroTip from './intro-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';
@@ -21,6 +22,7 @@
CommunityDrawerTipRouteName,
MutedTabTipRouteName,
NUXTipOverlayBackdropRouteName,
+ IntroTipRouteName,
} from './route-names.js';
import {
UserAvatarCameraModalRouteName,
@@ -163,6 +165,7 @@
name={VideoPlaybackModalRouteName}
component={VideoPlaybackModal}
/>
+ <App.Screen name={IntroTipRouteName} component={IntroTip} />
<App.Screen
name={CommunityDrawerTipRouteName}
component={CommunityDrawerTip}
diff --git a/native/navigation/intro-tip.react.js b/native/navigation/intro-tip.react.js
new file mode 100644
--- /dev/null
+++ b/native/navigation/intro-tip.react.js
@@ -0,0 +1,17 @@
+// @flow
+
+import * as React from 'react';
+
+import {
+ type NUXTipsOverlayProps,
+ createNUXTipsOverlay,
+} from '../tooltip/nux-tips-overlay.react.js';
+
+const introTipText =
+ 'Chats on Comm are either DMs (which work like Signal) ' +
+ 'or channels inside of a community (which work like a federated Discord).';
+
+const HomeTabTip: React.ComponentType<NUXTipsOverlayProps<'IntroTip'>> =
+ createNUXTipsOverlay(undefined, introTipText);
+
+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
@@ -43,10 +43,12 @@
MutedTabTipRouteName,
NUXTipOverlayBackdropRouteName,
HomeTabTipRouteName,
+ IntroTipRouteName,
} from './route-names.js';
import { isMessageTooltipKey } from '../chat/utils.js';
const newReanimatedRoutes = new Set([
+ IntroTipRouteName,
CommunityDrawerTipRouteName,
HomeTabTipRouteName,
MutedTabTipRouteName,
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
@@ -168,6 +168,7 @@
export const TagFarcasterChannelByNameRouteName = 'TagFarcasterChannelByName';
export const ThreadSettingsNotificationsRouteName =
'ThreadSettingsNotifications';
+export const IntroTipRouteName = 'IntroTip';
export const CommunityDrawerTipRouteName = 'CommunityDrawerTip';
export const HomeTabTipRouteName = 'HomeTabTip';
export const MutedTabTipRouteName = 'MutedTabTip';
@@ -203,6 +204,7 @@
};
export type NUXTipRouteNames =
+ | typeof IntroTipRouteName
| typeof CommunityDrawerTipRouteName
| typeof HomeTabTipRouteName
| typeof MutedTabTipRouteName;
@@ -234,6 +236,7 @@
+ThreadAvatarCameraModal: ThreadAvatarCameraModalParams,
+VideoPlaybackModal: VideoPlaybackModalParams,
+TogglePinModal: TogglePinModalParams,
+ +IntroTip: NUXTipsOverlayParams,
+CommunityDrawerTip: NUXTipsOverlayParams,
+HomeTabTip: NUXTipsOverlayParams,
+MutedTabTip: NUXTipsOverlayParams,

File Metadata

Mime Type
text/plain
Expires
Sat, Dec 21, 3:52 AM (16 h, 13 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2682914
Default Alt Text
D13180.id43807.diff (4 KB)

Event Timeline