Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3497840
D13180.id43735.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
4 KB
Referenced Files
None
Subscribers
None
D13180.id43735.diff
View Options
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 (nuxTipParams[type].tooltipLocation === 'absolute') {
+ 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
Details
Attached
Mime Type
text/plain
Expires
Fri, Dec 20, 8:00 PM (15 h, 42 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2682737
Default Alt Text
D13180.id43735.diff (4 KB)
Attached To
Mode
D13180: [native] Create intro tip
Attached
Detach File
Event Timeline
Log In to Comment