From 08fe7fb08451d4d286f5013d9ad14b4e32afa50b Mon Sep 17 00:00:00 2001 From: Ansh Nanda Date: Fri, 25 Aug 2023 14:36:10 -0700 Subject: create onboarding model --- src/state/models/discovery/onboarding.ts | 63 ++++++++++++++++++++++++++++++++ src/state/models/root-store.ts | 6 +++ 2 files changed, 69 insertions(+) create mode 100644 src/state/models/discovery/onboarding.ts (limited to 'src') diff --git a/src/state/models/discovery/onboarding.ts b/src/state/models/discovery/onboarding.ts new file mode 100644 index 000000000..c75c49d0b --- /dev/null +++ b/src/state/models/discovery/onboarding.ts @@ -0,0 +1,63 @@ +import {makeAutoObservable} from 'mobx' +import {RootStoreModel} from '../root-store' +import {NavigationProp} from 'lib/routes/types' +import {hasProp} from 'lib/type-guards' + +enum OnboardingStep { + WELCOME = 'WELCOME', + BROWSE_FEEDS = 'BROWSE_FEEDS', + COMPLETE = 'COMPLETE', +} + +export class OnboardingModel { + // state + step: OnboardingStep + + constructor(public rootStore: RootStoreModel) { + makeAutoObservable(this, {rootStore: false}) + this.step = OnboardingStep.WELCOME + } + + serialize() { + return { + step: this.step, + } + } + + hydrate(v: unknown) { + if (typeof v === 'object' && v !== null) { + if (hasProp(v, 'step') && typeof v.step === 'string') { + this.step = v.step as OnboardingStep + } + } + } + + nextStep(navigation?: NavigationProp) { + switch (this.step) { + case OnboardingStep.WELCOME: + this.step = OnboardingStep.COMPLETE + break + case OnboardingStep.BROWSE_FEEDS: + this.step = OnboardingStep.COMPLETE + break + case OnboardingStep.COMPLETE: + if (!navigation) { + throw new Error('Navigation prop required to complete onboarding') + } + this.complete(navigation) + break + } + } + + complete(navigation: NavigationProp) { + navigation.navigate('Home') + } + + reset() { + this.step = OnboardingStep.WELCOME + } + + get isComplete() { + return this.step === OnboardingStep.COMPLETE + } +} diff --git a/src/state/models/root-store.ts b/src/state/models/root-store.ts index 1d6d3a0d0..6204e0d10 100644 --- a/src/state/models/root-store.ts +++ b/src/state/models/root-store.ts @@ -27,6 +27,7 @@ import {reset as resetNavigation} from '../../Navigation' // remove after backend testing finishes // -prf import {applyDebugHeader} from 'lib/api/debug-appview-proxy-header' +import {OnboardingModel} from './discovery/onboarding' export const appInfo = z.object({ build: z.string(), @@ -44,6 +45,7 @@ export class RootStoreModel { shell = new ShellUiModel(this) preferences = new PreferencesModel(this) me = new MeModel(this) + onboarding = new OnboardingModel(this) invitedUsers = new InvitedUsers(this) handleResolutions = new HandleResolutionsCache() profiles = new ProfilesCache(this) @@ -70,6 +72,7 @@ export class RootStoreModel { appInfo: this.appInfo, session: this.session.serialize(), me: this.me.serialize(), + onboarding: this.onboarding.serialize(), shell: this.shell.serialize(), preferences: this.preferences.serialize(), invitedUsers: this.invitedUsers.serialize(), @@ -88,6 +91,9 @@ export class RootStoreModel { if (hasProp(v, 'me')) { this.me.hydrate(v.me) } + if (hasProp(v, 'onboarding')) { + this.onboarding.hydrate(v.onboarding) + } if (hasProp(v, 'session')) { this.session.hydrate(v.session) } -- cgit 1.4.1 From edfd326069319c80f4825eb33a74295ccf667d71 Mon Sep 17 00:00:00 2001 From: Ansh Nanda Date: Mon, 28 Aug 2023 13:37:44 -0700 Subject: move onboarding to screens --- src/Navigation.tsx | 15 ++++++ src/lib/routes/types.ts | 5 ++ src/state/models/discovery/onboarding.ts | 58 ++++++++++++-------- src/view/com/auth/onboarding/Onboarding.tsx | 66 ----------------------- src/view/com/auth/onboarding/RecommendedFeeds.tsx | 55 +++++++++++++++++++ src/view/com/auth/onboarding/Welcome.tsx | 19 ++++++- src/view/com/modals/Modal.tsx | 4 -- src/view/com/modals/Modal.web.tsx | 3 -- src/view/com/modals/OnboardingModal.tsx | 8 --- src/view/screens/Home.tsx | 8 ++- src/view/screens/Settings.tsx | 15 ++++++ 11 files changed, 149 insertions(+), 107 deletions(-) delete mode 100644 src/view/com/auth/onboarding/Onboarding.tsx create mode 100644 src/view/com/auth/onboarding/RecommendedFeeds.tsx delete mode 100644 src/view/com/modals/OnboardingModal.tsx (limited to 'src') diff --git a/src/Navigation.tsx b/src/Navigation.tsx index 48bab182d..6ea92e1d4 100644 --- a/src/Navigation.tsx +++ b/src/Navigation.tsx @@ -67,6 +67,8 @@ import {getRoutingInstrumentation} from 'lib/sentry' import {bskyTitle} from 'lib/strings/headings' import {JSX} from 'react/jsx-runtime' import {timeout} from 'lib/async/timeout' +import {Welcome} from 'view/com/auth/onboarding/Welcome' +import {RecommendedFeeds} from 'view/com/auth/onboarding/RecommendedFeeds' const navigationRef = createNavigationContainerRef() @@ -219,6 +221,18 @@ function commonScreens(Stack: typeof HomeTab, unreadCountLabel?: string) { component={SavedFeeds} options={{title: title('Edit My Feeds')}} /> + + + + ) } @@ -254,6 +268,7 @@ function TabsNavigator() { function HomeTabNavigator() { const contentStyle = useColorSchemeStyle(styles.bgLight, styles.bgDark) + return ( { - switch (action.type) { - case 'NEXT_STEP': - switch (state.currentStep) { - case OnboardingStep.WELCOME: - track('Onboarding:Begin') - return {...state, currentStep: OnboardingStep.COMPLETE} - case OnboardingStep.COMPLETE: - track('Onboarding:Complete') - return state - default: - return state - } - default: - return state - } -} - -export const Onboarding = () => { - const pal = usePalette('default') - const rootStore = useStores() - const [state, dispatch] = React.useReducer(reducer, initialState) - const next = React.useCallback( - () => dispatch({type: 'NEXT_STEP'}), - [dispatch], - ) - - React.useEffect(() => { - if (state.currentStep === OnboardingStep.COMPLETE) { - // navigate to home - rootStore.shell.closeModal() - } - }, [state.currentStep, rootStore.shell]) - - return ( - - {state.currentStep === OnboardingStep.WELCOME && } - - ) -} - -const styles = StyleSheet.create({ - container: { - flex: 1, - paddingHorizontal: 20, - }, -}) diff --git a/src/view/com/auth/onboarding/RecommendedFeeds.tsx b/src/view/com/auth/onboarding/RecommendedFeeds.tsx new file mode 100644 index 000000000..d3aacb70b --- /dev/null +++ b/src/view/com/auth/onboarding/RecommendedFeeds.tsx @@ -0,0 +1,55 @@ +import React from 'react' +import {StyleSheet, View} from 'react-native' +import {Text} from 'view/com/util/text/Text' +import {usePalette} from 'lib/hooks/usePalette' +import {Button} from 'view/com/util/forms/Button' +import {NativeStackScreenProps} from '@react-navigation/native-stack' +import {HomeTabNavigatorParams} from 'lib/routes/types' +import {useStores} from 'state/index' +import {observer} from 'mobx-react-lite' + +type Props = NativeStackScreenProps +export const RecommendedFeeds = observer(({navigation}: Props) => { + const pal = usePalette('default') + const store = useStores() + + const next = () => { + const nextScreenName = store.onboarding.nextScreenName() + console.log('nextScreenName', store.onboarding.nextScreenName()) + if (nextScreenName) { + navigation.navigate(nextScreenName) + } + } + + return ( + + + + Check out some recommended feeds. Click + to add them to your list of + pinned feeds. + + + + + + + ) + + return ( + + } + keyExtractor={item => item.did + item.rkey} + style={{flex: 1}} + /> + + ) +}) + +const Item = observer(({did, rkey}: {did: string; rkey: string}) => { + const pal = usePalette('default') + const uri = makeRecordUri(did, 'app.bsky.feed.generator', rkey) + const item = useCustomFeed(uri) + if (!item) return null + const onToggle = async () => { + if (item.isSaved) { + try { + await item.unsave() + } catch (e) { + Toast.show('There was an issue contacting your server') + console.error('Failed to unsave feed', {e}) + } + } else { + try { + await item.save() + await item.pin() + } catch (e) { + Toast.show('There was an issue contacting your server') + console.error('Failed to pin feed', {e}) + } + } + } + return ( + + + + + + + + {item.displayName} + + + + by {sanitizeHandle(item.data.creator.handle, '@')} + + + {item.data.description ? ( + + {item.data.description} + + ) : null} + + + + + + + + {item.data.likeCount || 0} + + + + + + + ) +}) + +const styles = StyleSheet.create({ + container: { + flex: 1, + marginHorizontal: 16, + justifyContent: 'space-between', + }, + title1: { + fontSize: 36, + fontWeight: '800', + textAlign: 'right', + }, + title2: { + fontSize: 58, + fontWeight: '800', + textAlign: 'right', + }, + description: { + maxWidth: 400, + marginTop: 10, + marginLeft: 'auto', + textAlign: 'right', + }, +}) diff --git a/src/view/com/auth/onboarding/Welcome.tsx b/src/view/com/auth/onboarding/Welcome.tsx index a322e4d4f..6f95c0853 100644 --- a/src/view/com/auth/onboarding/Welcome.tsx +++ b/src/view/com/auth/onboarding/Welcome.tsx @@ -41,8 +41,10 @@ export const Welcome = observer(({next, skip}: Props) => { }} /> - Welcome to - Bluesky + + Welcome to{' '} + Bluesky + @@ -98,7 +100,7 @@ const styles = StyleSheet.create({ justifyContent: 'space-between', }, title: { - fontSize: 48, + fontSize: 42, fontWeight: '800', }, row: { diff --git a/src/view/com/auth/onboarding/Welcome.web.tsx b/src/view/com/auth/onboarding/Welcome.web.tsx new file mode 100644 index 000000000..af3ca7074 --- /dev/null +++ b/src/view/com/auth/onboarding/Welcome.web.tsx @@ -0,0 +1,123 @@ +import React from 'react' +import {StyleSheet, View} from 'react-native' +import {useMediaQuery} from 'react-responsive' +import {Text} from 'view/com/util/text/Text' +import {s} from 'lib/styles' +import {usePalette} from 'lib/hooks/usePalette' +import {FontAwesomeIcon} from '@fortawesome/react-native-fontawesome' +import {TitleColumnLayout} from 'view/com/util/layouts/TitleColumnLayout' +import {Button} from 'view/com/util/forms/Button' +import {observer} from 'mobx-react-lite' + +type Props = { + next: () => void + skip: () => void +} + +export const Welcome = observer(({next}: Props) => { + const pal = usePalette('default') + const horizontal = useMediaQuery({ + query: '(min-width: 1230px)', + }) + const title = ( + <> + + Welcome to + + + Bluesky + + + ) + return ( + + + + + + Bluesky is public. + + + Your posts, likes, and blocks are public. Mutes are private. + + + + + + + + Bluesky is open. + + + Never lose access to your followers and data. + + + + + + + + Bluesky is flexible. + + + Choose the algorithms that power your experience with custom feeds. + + + + + + + + + ) +}) + +const styles = StyleSheet.create({ + row: { + flexDirection: 'row', + columnGap: 20, + alignItems: 'center', + marginVertical: 20, + }, + rowText: { + flex: 1, + }, + spacer: { + height: 20, + }, +}) diff --git a/src/view/com/util/layouts/TitleColumnLayout.tsx b/src/view/com/util/layouts/TitleColumnLayout.tsx new file mode 100644 index 000000000..3ca10868e --- /dev/null +++ b/src/view/com/util/layouts/TitleColumnLayout.tsx @@ -0,0 +1,62 @@ +import React from 'react' +import {StyleProp, StyleSheet, View, ViewStyle} from 'react-native' +import {usePalette} from 'lib/hooks/usePalette' + +interface Props { + testID?: string + title: React.Component + horizontal: boolean + titleStyle?: StyleProp + contentStyle?: StyleProp +} + +export function TitleColumnLayout({ + testID, + title, + horizontal, + children, + titleStyle, + contentStyle, +}: React.PropsWithChildren) { + const pal = usePalette('default') + + const layoutStyles = horizontal ? styles2Column : styles1Column + return ( + + + {title} + + {children} + + ) +} + +const styles2Column = StyleSheet.create({ + container: { + flexDirection: 'row', + height: '100%', + }, + title: { + flex: 1, + paddingHorizontal: 40, + paddingBottom: 80, + justifyContent: 'center', + }, + content: { + flex: 2, + paddingHorizontal: 40, + justifyContent: 'center', + }, +}) + +const styles1Column = StyleSheet.create({ + container: {}, + title: { + paddingHorizontal: 40, + paddingVertical: 40, + }, + content: { + paddingHorizontal: 40, + paddingVertical: 40, + }, +}) diff --git a/src/view/shell/index.web.tsx b/src/view/shell/index.web.tsx index 16ed17a5b..9ad8007f6 100644 --- a/src/view/shell/index.web.tsx +++ b/src/view/shell/index.web.tsx @@ -20,7 +20,6 @@ import {NavigationProp} from 'lib/routes/types' const ShellInner = observer(() => { const store = useStores() const {isDesktop} = useWebMediaQueries() - const navigator = useNavigation() useEffect(() => { @@ -29,6 +28,8 @@ const ShellInner = observer(() => { }) }, [navigator, store.shell]) + const showSideNavs = + isDesktop && store.session.hasSession && !store.onboarding.isActive return ( <> @@ -36,7 +37,7 @@ const ShellInner = observer(() => { - {isDesktop && store.session.hasSession && ( + {showSideNavs && ( <> -- cgit 1.4.1 From b847917969a2b86388ca88a84d6c8616bc40aeaf Mon Sep 17 00:00:00 2001 From: Paul Frazee Date: Tue, 29 Aug 2023 23:02:37 -0700 Subject: Tweaks to mobile onboard --- src/view/com/auth/onboarding/RecommendedFeeds.tsx | 9 +++++---- src/view/com/util/ViewHeader.tsx | 4 ++-- 2 files changed, 7 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/view/com/auth/onboarding/RecommendedFeeds.tsx b/src/view/com/auth/onboarding/RecommendedFeeds.tsx index f6b40b88d..4a3200168 100644 --- a/src/view/com/auth/onboarding/RecommendedFeeds.tsx +++ b/src/view/com/auth/onboarding/RecommendedFeeds.tsx @@ -19,9 +19,9 @@ export const RecommendedFeeds = observer(({next}: Props) => { return ( - + - Check out some recommended feeds. Click + to add them to your list of + Check out some recommended feeds. Tap + to add them to your list of pinned feeds. @@ -72,14 +72,15 @@ const Item = ({item}: {item: ItemProps}) => { const styles = StyleSheet.create({ container: { flex: 1, - marginHorizontal: 16, justifyContent: 'space-between', }, header: { marginBottom: 16, + marginHorizontal: 16, }, button: { - marginBottom: 48, + marginBottom: 24, + marginHorizontal: 16, marginTop: 16, }, buttonText: { diff --git a/src/view/com/util/ViewHeader.tsx b/src/view/com/util/ViewHeader.tsx index 47e631072..7482db8eb 100644 --- a/src/view/com/util/ViewHeader.tsx +++ b/src/view/com/util/ViewHeader.tsx @@ -100,9 +100,9 @@ export const ViewHeader = observer(function ({ {renderButton ? ( renderButton() - ) : ( + ) : showBackButton ? ( - )} + ) : null} ) } -- cgit 1.4.1 From cd8ae1298e6ef67e5c40cdde24449b49ae2d914b Mon Sep 17 00:00:00 2001 From: Paul Frazee Date: Wed, 30 Aug 2023 10:56:07 -0700 Subject: Tweak dark mode on web --- src/view/com/util/layouts/TitleColumnLayout.tsx | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/view/com/util/layouts/TitleColumnLayout.tsx b/src/view/com/util/layouts/TitleColumnLayout.tsx index 3ca10868e..7047446e3 100644 --- a/src/view/com/util/layouts/TitleColumnLayout.tsx +++ b/src/view/com/util/layouts/TitleColumnLayout.tsx @@ -1,6 +1,7 @@ import React from 'react' import {StyleProp, StyleSheet, View, ViewStyle} from 'react-native' import {usePalette} from 'lib/hooks/usePalette' +import {useColorSchemeStyle} from 'lib/hooks/useColorSchemeStyle' interface Props { testID?: string @@ -19,14 +20,20 @@ export function TitleColumnLayout({ contentStyle, }: React.PropsWithChildren) { const pal = usePalette('default') + const titleBg = useColorSchemeStyle(pal.viewLight, pal.view) + const contentBg = useColorSchemeStyle(pal.view, { + backgroundColor: pal.colors.background, + borderColor: pal.colors.border, + borderLeftWidth: 1, + }) const layoutStyles = horizontal ? styles2Column : styles1Column return ( - - {title} + {title} + + {children} - {children} ) } -- cgit 1.4.1 From 05d1d8d8a4565e7d042f8c09760186b4037dcd2f Mon Sep 17 00:00:00 2001 From: Paul Frazee Date: Wed, 30 Aug 2023 14:57:03 -0700 Subject: Fix onboarding on mobile web --- src/view/com/auth/onboarding/RecommendedFeeds.tsx | 101 +--------- .../com/auth/onboarding/RecommendedFeeds.web.tsx | 214 --------------------- .../auth/onboarding/RecommendedFeedsDesktop.tsx | 214 +++++++++++++++++++++ .../com/auth/onboarding/RecommendedFeedsMobile.tsx | 95 +++++++++ src/view/com/auth/onboarding/Welcome.tsx | 133 +------------ src/view/com/auth/onboarding/Welcome.web.tsx | 123 ------------ src/view/com/auth/onboarding/WelcomeDesktop.tsx | 123 ++++++++++++ src/view/com/auth/onboarding/WelcomeMobile.tsx | 123 ++++++++++++ src/view/com/util/layouts/withBreakpoints.tsx | 22 +++ 9 files changed, 597 insertions(+), 551 deletions(-) delete mode 100644 src/view/com/auth/onboarding/RecommendedFeeds.web.tsx create mode 100644 src/view/com/auth/onboarding/RecommendedFeedsDesktop.tsx create mode 100644 src/view/com/auth/onboarding/RecommendedFeedsMobile.tsx delete mode 100644 src/view/com/auth/onboarding/Welcome.web.tsx create mode 100644 src/view/com/auth/onboarding/WelcomeDesktop.tsx create mode 100644 src/view/com/auth/onboarding/WelcomeMobile.tsx create mode 100644 src/view/com/util/layouts/withBreakpoints.tsx (limited to 'src') diff --git a/src/view/com/auth/onboarding/RecommendedFeeds.tsx b/src/view/com/auth/onboarding/RecommendedFeeds.tsx index 4a3200168..76204ce31 100644 --- a/src/view/com/auth/onboarding/RecommendedFeeds.tsx +++ b/src/view/com/auth/onboarding/RecommendedFeeds.tsx @@ -1,91 +1,10 @@ -import React from 'react' -import {FlatList, StyleSheet, View} from 'react-native' -import {Text} from 'view/com/util/text/Text' -import {usePalette} from 'lib/hooks/usePalette' -import {Button} from 'view/com/util/forms/Button' -import {observer} from 'mobx-react-lite' -import {CustomFeed} from 'view/com/feeds/CustomFeed' -import {useCustomFeed} from 'lib/hooks/useCustomFeed' -import {makeRecordUri} from 'lib/strings/url-helpers' -import {ViewHeader} from 'view/com/util/ViewHeader' -import {isDesktopWeb} from 'platform/detection' -import {RECOMMENDED_FEEDS} from 'lib/constants' - -type Props = { - next: () => void -} -export const RecommendedFeeds = observer(({next}: Props) => { - const pal = usePalette('default') - - return ( - - - - Check out some recommended feeds. Tap + to add them to your list of - pinned feeds. - - - } - keyExtractor={item => item.did + item.rkey} - style={{flex: 1}} - /> - - - - - ) - - return ( - - } - keyExtractor={item => item.did + item.rkey} - style={{flex: 1}} - /> - - ) -}) - -const Item = observer(({did, rkey}: {did: string; rkey: string}) => { - const pal = usePalette('default') - const uri = makeRecordUri(did, 'app.bsky.feed.generator', rkey) - const item = useCustomFeed(uri) - if (!item) return null - const onToggle = async () => { - if (item.isSaved) { - try { - await item.unsave() - } catch (e) { - Toast.show('There was an issue contacting your server') - console.error('Failed to unsave feed', {e}) - } - } else { - try { - await item.save() - await item.pin() - } catch (e) { - Toast.show('There was an issue contacting your server') - console.error('Failed to pin feed', {e}) - } - } - } - return ( - - - - - - - - {item.displayName} - - - - by {sanitizeHandle(item.data.creator.handle, '@')} - - - {item.data.description ? ( - - {item.data.description} - - ) : null} - - - - - - - - {item.data.likeCount || 0} - - - - - - - ) -}) - -const styles = StyleSheet.create({ - container: { - flex: 1, - marginHorizontal: 16, - justifyContent: 'space-between', - }, - title1: { - fontSize: 36, - fontWeight: '800', - textAlign: 'right', - }, - title2: { - fontSize: 58, - fontWeight: '800', - textAlign: 'right', - }, - description: { - maxWidth: 400, - marginTop: 10, - marginLeft: 'auto', - textAlign: 'right', - }, -}) diff --git a/src/view/com/auth/onboarding/RecommendedFeedsDesktop.tsx b/src/view/com/auth/onboarding/RecommendedFeedsDesktop.tsx new file mode 100644 index 000000000..d305f4a82 --- /dev/null +++ b/src/view/com/auth/onboarding/RecommendedFeedsDesktop.tsx @@ -0,0 +1,214 @@ +import React from 'react' +import {FlatList, StyleSheet, View} from 'react-native' +import {observer} from 'mobx-react-lite' +import {FontAwesomeIcon} from '@fortawesome/react-native-fontawesome' +import {Text} from 'view/com/util/text/Text' +import {TitleColumnLayout} from 'view/com/util/layouts/TitleColumnLayout' +import {UserAvatar} from 'view/com/util/UserAvatar' +import {Button} from 'view/com/util/forms/Button' +import * as Toast from 'view/com/util/Toast' +import {usePalette} from 'lib/hooks/usePalette' +import {useCustomFeed} from 'lib/hooks/useCustomFeed' +import {makeRecordUri} from 'lib/strings/url-helpers' +import {sanitizeHandle} from 'lib/strings/handles' +import {HeartIcon} from 'lib/icons' +import {RECOMMENDED_FEEDS} from 'lib/constants' + +type Props = { + next: () => void +} +export const RecommendedFeedsDesktop = observer(({next}: Props) => { + const pal = usePalette('default') + + const title = ( + <> + Choose your + Recomended + Feeds + + Feeds are created by users to curate content. Choose some feeds that you + find interesting. + + + + + + ) + + return ( + + } + keyExtractor={item => item.did + item.rkey} + style={{flex: 1}} + /> + + ) +}) + +const Item = observer(({did, rkey}: {did: string; rkey: string}) => { + const pal = usePalette('default') + const uri = makeRecordUri(did, 'app.bsky.feed.generator', rkey) + const item = useCustomFeed(uri) + if (!item) return null + const onToggle = async () => { + if (item.isSaved) { + try { + await item.unsave() + } catch (e) { + Toast.show('There was an issue contacting your server') + console.error('Failed to unsave feed', {e}) + } + } else { + try { + await item.save() + await item.pin() + } catch (e) { + Toast.show('There was an issue contacting your server') + console.error('Failed to pin feed', {e}) + } + } + } + return ( + + + + + + + + {item.displayName} + + + + by {sanitizeHandle(item.data.creator.handle, '@')} + + + {item.data.description ? ( + + {item.data.description} + + ) : null} + + + + + + + + {item.data.likeCount || 0} + + + + + + + ) +}) + +const styles = StyleSheet.create({ + container: { + flex: 1, + marginHorizontal: 16, + justifyContent: 'space-between', + }, + title1: { + fontSize: 36, + fontWeight: '800', + textAlign: 'right', + }, + title2: { + fontSize: 58, + fontWeight: '800', + textAlign: 'right', + }, + description: { + maxWidth: 400, + marginTop: 10, + marginLeft: 'auto', + textAlign: 'right', + }, +}) diff --git a/src/view/com/auth/onboarding/RecommendedFeedsMobile.tsx b/src/view/com/auth/onboarding/RecommendedFeedsMobile.tsx new file mode 100644 index 000000000..b84b75df7 --- /dev/null +++ b/src/view/com/auth/onboarding/RecommendedFeedsMobile.tsx @@ -0,0 +1,95 @@ +import React from 'react' +import {FlatList, StyleSheet, View} from 'react-native' +import {Text} from 'view/com/util/text/Text' +import {usePalette} from 'lib/hooks/usePalette' +import {Button} from 'view/com/util/forms/Button' +import {observer} from 'mobx-react-lite' +import {CustomFeed} from 'view/com/feeds/CustomFeed' +import {useCustomFeed} from 'lib/hooks/useCustomFeed' +import {makeRecordUri} from 'lib/strings/url-helpers' +import {ViewHeader} from 'view/com/util/ViewHeader' +import {isDesktopWeb} from 'platform/detection' +import {RECOMMENDED_FEEDS} from 'lib/constants' + +type Props = { + next: () => void +} +export const RecommendedFeedsMobile = observer(({next}: Props) => { + const pal = usePalette('default') + + return ( + + + + Check out some recommended feeds. Tap + to add them to your list of + pinned feeds. + + + } + keyExtractor={item => item.did + item.rkey} + style={{flex: 1}} + /> + + - - - ) -}) - -const styles = StyleSheet.create({ - row: { - flexDirection: 'row', - columnGap: 20, - alignItems: 'center', - marginVertical: 20, - }, - rowText: { - flex: 1, - }, - spacer: { - height: 20, - }, -}) diff --git a/src/view/com/auth/onboarding/WelcomeDesktop.tsx b/src/view/com/auth/onboarding/WelcomeDesktop.tsx new file mode 100644 index 000000000..e63693443 --- /dev/null +++ b/src/view/com/auth/onboarding/WelcomeDesktop.tsx @@ -0,0 +1,123 @@ +import React from 'react' +import {StyleSheet, View} from 'react-native' +import {useMediaQuery} from 'react-responsive' +import {Text} from 'view/com/util/text/Text' +import {s} from 'lib/styles' +import {usePalette} from 'lib/hooks/usePalette' +import {FontAwesomeIcon} from '@fortawesome/react-native-fontawesome' +import {TitleColumnLayout} from 'view/com/util/layouts/TitleColumnLayout' +import {Button} from 'view/com/util/forms/Button' +import {observer} from 'mobx-react-lite' + +type Props = { + next: () => void + skip: () => void +} + +export const WelcomeDesktop = observer(({next}: Props) => { + const pal = usePalette('default') + const horizontal = useMediaQuery({ + query: '(min-width: 1230px)', + }) + const title = ( + <> + + Welcome to + + + Bluesky + + + ) + return ( + + + + + + Bluesky is public. + + + Your posts, likes, and blocks are public. Mutes are private. + + + + + + + + Bluesky is open. + + + Never lose access to your followers and data. + + + + + + + + Bluesky is flexible. + + + Choose the algorithms that power your experience with custom feeds. + + + + + + + + + ) +}) + +const styles = StyleSheet.create({ + row: { + flexDirection: 'row', + columnGap: 20, + alignItems: 'center', + marginVertical: 20, + }, + rowText: { + flex: 1, + }, + spacer: { + height: 20, + }, +}) diff --git a/src/view/com/auth/onboarding/WelcomeMobile.tsx b/src/view/com/auth/onboarding/WelcomeMobile.tsx new file mode 100644 index 000000000..eb72de836 --- /dev/null +++ b/src/view/com/auth/onboarding/WelcomeMobile.tsx @@ -0,0 +1,123 @@ +import React from 'react' +import {Pressable, StyleSheet, View} from 'react-native' +import {Text} from 'view/com/util/text/Text' +import {s} from 'lib/styles' +import {usePalette} from 'lib/hooks/usePalette' +import {FontAwesomeIcon} from '@fortawesome/react-native-fontawesome' +import {Button} from 'view/com/util/forms/Button' +import {observer} from 'mobx-react-lite' +import {ViewHeader} from 'view/com/util/ViewHeader' +import {isDesktopWeb} from 'platform/detection' + +type Props = { + next: () => void + skip: () => void +} + +export const WelcomeMobile = observer(({next, skip}: Props) => { + const pal = usePalette('default') + + return ( + + { + return ( + + Skip + + + ) + }} + /> + + + Welcome to{' '} + Bluesky + + + + + + + Bluesky is public. + + + Your posts, likes, and blocks are public. Mutes are private. + + + + + + + + Bluesky is open. + + + Never lose access to your followers and data. + + + + + + + + Bluesky is flexible. + + + Choose the algorithms that power your experience with custom + feeds. + + + + + + - - - - - {item.data.likeCount || 0} - - - - - - - ) -}) - const styles = StyleSheet.create({ container: { flex: 1, diff --git a/src/view/com/auth/onboarding/RecommendedFeedsItem.tsx b/src/view/com/auth/onboarding/RecommendedFeedsItem.tsx new file mode 100644 index 000000000..d16b3213e --- /dev/null +++ b/src/view/com/auth/onboarding/RecommendedFeedsItem.tsx @@ -0,0 +1,142 @@ +import React from 'react' +import {View} from 'react-native' +import {observer} from 'mobx-react-lite' +import {FontAwesomeIcon} from '@fortawesome/react-native-fontawesome' +import {Text} from 'view/com/util/text/Text' +import {Button} from 'view/com/util/forms/Button' +import {UserAvatar} from 'view/com/util/UserAvatar' +import * as Toast from 'view/com/util/Toast' +import {HeartIcon} from 'lib/icons' +import {usePalette} from 'lib/hooks/usePalette' +import {useCustomFeed} from 'lib/hooks/useCustomFeed' +import {useWebMediaQueries} from 'lib/hooks/useWebMediaQueries' +import {makeRecordUri} from 'lib/strings/url-helpers' +import {sanitizeHandle} from 'lib/strings/handles' + +export const RecommendedFeedsItem = observer( + ({did, rkey}: {did: string; rkey: string}) => { + const {isMobile} = useWebMediaQueries() + const pal = usePalette('default') + const uri = makeRecordUri(did, 'app.bsky.feed.generator', rkey) + const item = useCustomFeed(uri) + if (!item) return null + const onToggle = async () => { + if (item.isSaved) { + try { + await item.unsave() + } catch (e) { + Toast.show('There was an issue contacting your server') + console.error('Failed to unsave feed', {e}) + } + } else { + try { + await item.save() + await item.pin() + } catch (e) { + Toast.show('There was an issue contacting your server') + console.error('Failed to pin feed', {e}) + } + } + } + return ( + + + + + + + + {item.displayName} + + + + by {sanitizeHandle(item.data.creator.handle, '@')} + + + {item.data.description ? ( + + {item.data.description} + + ) : null} + + + + + + + + {item.data.likeCount || 0} + + + + + + + ) + }, +) diff --git a/src/view/com/auth/onboarding/RecommendedFeedsMobile.tsx b/src/view/com/auth/onboarding/RecommendedFeedsMobile.tsx index b84b75df7..a3e379883 100644 --- a/src/view/com/auth/onboarding/RecommendedFeedsMobile.tsx +++ b/src/view/com/auth/onboarding/RecommendedFeedsMobile.tsx @@ -1,14 +1,11 @@ import React from 'react' import {FlatList, StyleSheet, View} from 'react-native' +import {observer} from 'mobx-react-lite' import {Text} from 'view/com/util/text/Text' -import {usePalette} from 'lib/hooks/usePalette' import {Button} from 'view/com/util/forms/Button' -import {observer} from 'mobx-react-lite' -import {CustomFeed} from 'view/com/feeds/CustomFeed' -import {useCustomFeed} from 'lib/hooks/useCustomFeed' -import {makeRecordUri} from 'lib/strings/url-helpers' import {ViewHeader} from 'view/com/util/ViewHeader' -import {isDesktopWeb} from 'platform/detection' +import {RecommendedFeedsItem} from './RecommendedFeedsItem' +import {usePalette} from 'lib/hooks/usePalette' import {RECOMMENDED_FEEDS} from 'lib/constants' type Props = { @@ -31,7 +28,7 @@ export const RecommendedFeedsMobile = observer(({next}: Props) => { } + renderItem={({item}) => } keyExtractor={item => item.did + item.rkey} style={{flex: 1}} /> @@ -47,32 +44,6 @@ export const RecommendedFeedsMobile = observer(({next}: Props) => { ) }) -type ItemProps = { - did: string - rkey: string -} - -const Item = ({item}: {item: ItemProps}) => { - const uri = makeRecordUri(item.did, 'app.bsky.feed.generator', item.rkey) - const data = useCustomFeed(uri) - if (!data) return null - return ( - - ) -} - const styles = StyleSheet.create({ container: { flex: 1, @@ -83,7 +54,7 @@ const styles = StyleSheet.create({ marginHorizontal: 16, }, button: { - marginBottom: 24, + marginBottom: 16, marginHorizontal: 16, marginTop: 16, }, diff --git a/src/view/com/auth/onboarding/RecommendedFeedsTablet.tsx b/src/view/com/auth/onboarding/RecommendedFeedsTablet.tsx new file mode 100644 index 000000000..bc2e57ade --- /dev/null +++ b/src/view/com/auth/onboarding/RecommendedFeedsTablet.tsx @@ -0,0 +1,91 @@ +import React from 'react' +import {FlatList, StyleSheet, View} from 'react-native' +import {observer} from 'mobx-react-lite' +import {FontAwesomeIcon} from '@fortawesome/react-native-fontawesome' +import {Text} from 'view/com/util/text/Text' +import {TitleColumnLayout} from 'view/com/util/layouts/TitleColumnLayout' +import {Button} from 'view/com/util/forms/Button' +import {RecommendedFeedsItem} from './RecommendedFeedsItem' +import {usePalette} from 'lib/hooks/usePalette' +import {RECOMMENDED_FEEDS} from 'lib/constants' + +type Props = { + next: () => void +} +export const RecommendedFeedsTablet = observer(({next}: Props) => { + const pal = usePalette('default') + + const title = ( + <> + Choose your + Recomended + Feeds + + Feeds are created by users to curate content. Choose some feeds that you + find interesting. + + + + + + ) + + return ( + + } + keyExtractor={item => item.did + item.rkey} + style={{flex: 1}} + /> + + ) +}) + +const styles = StyleSheet.create({ + container: { + flex: 1, + marginHorizontal: 16, + justifyContent: 'space-between', + }, + title1: { + fontSize: 24, + fontWeight: '800', + textAlign: 'right', + }, + title2: { + fontSize: 36, + fontWeight: '800', + textAlign: 'right', + }, + description: { + maxWidth: 400, + marginTop: 10, + marginLeft: 'auto', + textAlign: 'right', + }, +}) diff --git a/src/view/com/util/layouts/withBreakpoints.tsx b/src/view/com/util/layouts/withBreakpoints.tsx index 4214c1040..dc3f50dc9 100644 --- a/src/view/com/util/layouts/withBreakpoints.tsx +++ b/src/view/com/util/layouts/withBreakpoints.tsx @@ -1,6 +1,6 @@ import React from 'react' -import {useMediaQuery} from 'react-responsive' import {isNative} from 'platform/detection' +import {useWebMediaQueries} from 'lib/hooks/useWebMediaQueries' export const withBreakpoints =

( @@ -9,8 +9,7 @@ export const withBreakpoints = Desktop: React.ComponentType

, ): React.FC

=> (props: P) => { - const isTabletOrMobile = useMediaQuery({query: '(max-width: 1224px)'}) - const isMobile = useMediaQuery({query: '(max-width: 800px)'}) + const {isMobile, isTabletOrMobile} = useWebMediaQueries() if (isMobile || isNative) { return diff --git a/src/view/shell/index.web.tsx b/src/view/shell/index.web.tsx index 9ad8007f6..e36439c82 100644 --- a/src/view/shell/index.web.tsx +++ b/src/view/shell/index.web.tsx @@ -28,6 +28,7 @@ const ShellInner = observer(() => { }) }, [navigator, store.shell]) + const showBottomBar = !isDesktop && !store.onboarding.isActive const showSideNavs = isDesktop && store.session.hasSession && !store.onboarding.isActive return ( @@ -52,7 +53,7 @@ const ShellInner = observer(() => { onPost={store.shell.composerOpts?.onPost} mention={store.shell.composerOpts?.mention} /> - {!isDesktop && } + {showBottomBar && } {!isDesktop && store.shell.isDrawerOpen && ( -- cgit 1.4.1 From 3fa9b6daba1950c79a69cd0806627e38a30cac6b Mon Sep 17 00:00:00 2001 From: Paul Frazee Date: Wed, 30 Aug 2023 15:30:26 -0700 Subject: Fix types and remove dead code --- src/view/com/auth/Onboarding.tsx | 7 ------ src/view/com/util/layouts/TitleColumnLayout.tsx | 2 +- src/view/screens/onboarding/RecommendedFeeds.tsx | 20 --------------- src/view/screens/onboarding/Welcome.tsx | 32 ------------------------ 4 files changed, 1 insertion(+), 60 deletions(-) delete mode 100644 src/view/screens/onboarding/RecommendedFeeds.tsx delete mode 100644 src/view/screens/onboarding/Welcome.tsx (limited to 'src') diff --git a/src/view/com/auth/Onboarding.tsx b/src/view/com/auth/Onboarding.tsx index 2f0acfc47..429fdddb3 100644 --- a/src/view/com/auth/Onboarding.tsx +++ b/src/view/com/auth/Onboarding.tsx @@ -5,19 +5,12 @@ import {ErrorBoundary} from 'view/com/util/ErrorBoundary' import {s} from 'lib/styles' import {usePalette} from 'lib/hooks/usePalette' import {useStores} from 'state/index' -import {useAnalytics} from 'lib/analytics/analytics' import {Welcome} from './onboarding/Welcome' import {RecommendedFeeds} from './onboarding/RecommendedFeeds' export const Onboarding = observer(() => { const pal = usePalette('default') const store = useStores() - const {screen} = useAnalytics() - - React.useEffect(() => { - screen('Onboarding') - store.shell.setMinimalShellMode(true) - }, [store, screen]) const next = () => store.onboarding.next() const skip = () => store.onboarding.skip() diff --git a/src/view/com/util/layouts/TitleColumnLayout.tsx b/src/view/com/util/layouts/TitleColumnLayout.tsx index 7047446e3..49ad9fcdb 100644 --- a/src/view/com/util/layouts/TitleColumnLayout.tsx +++ b/src/view/com/util/layouts/TitleColumnLayout.tsx @@ -5,7 +5,7 @@ import {useColorSchemeStyle} from 'lib/hooks/useColorSchemeStyle' interface Props { testID?: string - title: React.Component + title: JSX.Element horizontal: boolean titleStyle?: StyleProp contentStyle?: StyleProp diff --git a/src/view/screens/onboarding/RecommendedFeeds.tsx b/src/view/screens/onboarding/RecommendedFeeds.tsx deleted file mode 100644 index d27278456..000000000 --- a/src/view/screens/onboarding/RecommendedFeeds.tsx +++ /dev/null @@ -1,20 +0,0 @@ -import React from 'react' -import {NativeStackScreenProps} from '@react-navigation/native-stack' -import {HomeTabNavigatorParams} from 'lib/routes/types' -import {useStores} from 'state/index' -import {observer} from 'mobx-react-lite' -import {RecommendedFeeds} from 'view/com/auth/onboarding/RecommendedFeeds' - -type Props = NativeStackScreenProps -export const RecommendedFeedsScreen = observer(({navigation}: Props) => { - const store = useStores() - - const next = () => { - const nextScreenName = store.onboarding.next('RecommendedFeeds') - if (nextScreenName) { - navigation.navigate(nextScreenName) - } - } - - return -}) diff --git a/src/view/screens/onboarding/Welcome.tsx b/src/view/screens/onboarding/Welcome.tsx deleted file mode 100644 index ea3e5ed77..000000000 --- a/src/view/screens/onboarding/Welcome.tsx +++ /dev/null @@ -1,32 +0,0 @@ -import React from 'react' -import {NativeStackScreenProps} from '@react-navigation/native-stack' -import {HomeTabNavigatorParams} from 'lib/routes/types' -import {useStores} from 'state/index' -import {observer} from 'mobx-react-lite' -import {Welcome} from 'view/com/auth/onboarding/Welcome' - -type Props = NativeStackScreenProps -export const WelcomeScreen = observer(({navigation}: Props) => { - const store = useStores() - - // make sure bottom nav is hidden - React.useEffect(() => { - if (!store.shell.minimalShellMode) { - store.shell.setMinimalShellMode(true) - } - }, [store.shell.minimalShellMode, store]) - - const next = () => { - const nextScreenName = store.onboarding.next('Welcome') - if (nextScreenName) { - navigation.navigate(nextScreenName) - } - } - - const skip = () => { - store.onboarding.skip() - navigation.navigate('Home') - } - - return -}) -- cgit 1.4.1 From 8bc8dcc094cd21daec639ff8db5ebb08dc5fe92f Mon Sep 17 00:00:00 2001 From: Paul Frazee Date: Wed, 30 Aug 2023 16:13:09 -0700 Subject: Simplify the RecommendedFeeds with breakpoint components --- src/view/com/auth/onboarding/RecommendedFeeds.tsx | 187 +++++++++++++++++++-- .../auth/onboarding/RecommendedFeedsDesktop.tsx | 92 ---------- .../com/auth/onboarding/RecommendedFeedsMobile.tsx | 66 -------- .../com/auth/onboarding/RecommendedFeedsTablet.tsx | 91 ---------- src/view/com/util/layouts/Breakpoints.tsx | 8 + src/view/com/util/layouts/Breakpoints.web.tsx | 20 +++ 6 files changed, 204 insertions(+), 260 deletions(-) delete mode 100644 src/view/com/auth/onboarding/RecommendedFeedsDesktop.tsx delete mode 100644 src/view/com/auth/onboarding/RecommendedFeedsMobile.tsx delete mode 100644 src/view/com/auth/onboarding/RecommendedFeedsTablet.tsx create mode 100644 src/view/com/util/layouts/Breakpoints.tsx create mode 100644 src/view/com/util/layouts/Breakpoints.web.tsx (limited to 'src') diff --git a/src/view/com/auth/onboarding/RecommendedFeeds.tsx b/src/view/com/auth/onboarding/RecommendedFeeds.tsx index 12c984e71..28dc2cdd0 100644 --- a/src/view/com/auth/onboarding/RecommendedFeeds.tsx +++ b/src/view/com/auth/onboarding/RecommendedFeeds.tsx @@ -1,11 +1,176 @@ -import 'react' -import {withBreakpoints} from 'view/com/util/layouts/withBreakpoints' -import {RecommendedFeedsDesktop} from './RecommendedFeedsDesktop' -import {RecommendedFeedsTablet} from './RecommendedFeedsTablet' -import {RecommendedFeedsMobile} from './RecommendedFeedsMobile' - -export const RecommendedFeeds = withBreakpoints( - RecommendedFeedsMobile, - RecommendedFeedsTablet, - RecommendedFeedsDesktop, -) +import React from 'react' +import {FlatList, StyleSheet, View} from 'react-native' +import {observer} from 'mobx-react-lite' +import {FontAwesomeIcon} from '@fortawesome/react-native-fontawesome' +import {TabletOrDesktop, Mobile} from 'view/com/util/layouts/Breakpoints' +import {Text} from 'view/com/util/text/Text' +import {ViewHeader} from 'view/com/util/ViewHeader' +import {TitleColumnLayout} from 'view/com/util/layouts/TitleColumnLayout' +import {Button} from 'view/com/util/forms/Button' +import {RecommendedFeedsItem} from './RecommendedFeedsItem' +import {useWebMediaQueries} from 'lib/hooks/useWebMediaQueries' +import {usePalette} from 'lib/hooks/usePalette' +import {RECOMMENDED_FEEDS} from 'lib/constants' + +type Props = { + next: () => void +} +export const RecommendedFeeds = observer(({next}: Props) => { + const pal = usePalette('default') + const {isTabletOrMobile} = useWebMediaQueries() + + const title = ( + <> + + Choose your + + + Recomended + + + Feeds + + + Feeds are created by users to curate content. Choose some feeds that you + find interesting. + + + + + + ) + + return ( + <> + + + } + keyExtractor={item => item.did + item.rkey} + style={{flex: 1}} + /> + + + + + + + Check out some recommended feeds. Tap + to add them to your list of + pinned feeds. + + + } + keyExtractor={item => item.did + item.rkey} + style={{flex: 1}} + /> + + - - - ) - - return ( - - } - keyExtractor={item => item.did + item.rkey} - style={{flex: 1}} - /> - - ) -}) - -const styles = StyleSheet.create({ - container: { - flex: 1, - marginHorizontal: 16, - justifyContent: 'space-between', - }, - title1: { - fontSize: 36, - fontWeight: '800', - textAlign: 'right', - }, - title2: { - fontSize: 58, - fontWeight: '800', - textAlign: 'right', - }, - description: { - maxWidth: 400, - marginTop: 10, - marginLeft: 'auto', - textAlign: 'right', - }, -}) diff --git a/src/view/com/auth/onboarding/RecommendedFeedsMobile.tsx b/src/view/com/auth/onboarding/RecommendedFeedsMobile.tsx deleted file mode 100644 index a3e379883..000000000 --- a/src/view/com/auth/onboarding/RecommendedFeedsMobile.tsx +++ /dev/null @@ -1,66 +0,0 @@ -import React from 'react' -import {FlatList, StyleSheet, View} from 'react-native' -import {observer} from 'mobx-react-lite' -import {Text} from 'view/com/util/text/Text' -import {Button} from 'view/com/util/forms/Button' -import {ViewHeader} from 'view/com/util/ViewHeader' -import {RecommendedFeedsItem} from './RecommendedFeedsItem' -import {usePalette} from 'lib/hooks/usePalette' -import {RECOMMENDED_FEEDS} from 'lib/constants' - -type Props = { - next: () => void -} -export const RecommendedFeedsMobile = observer(({next}: Props) => { - const pal = usePalette('default') - - return ( - - - - Check out some recommended feeds. Tap + to add them to your list of - pinned feeds. - - - } - keyExtractor={item => item.did + item.rkey} - style={{flex: 1}} - /> - - - - - ) - - return ( - - } - keyExtractor={item => item.did + item.rkey} - style={{flex: 1}} - /> - - ) -}) - -const styles = StyleSheet.create({ - container: { - flex: 1, - marginHorizontal: 16, - justifyContent: 'space-between', - }, - title1: { - fontSize: 24, - fontWeight: '800', - textAlign: 'right', - }, - title2: { - fontSize: 36, - fontWeight: '800', - textAlign: 'right', - }, - description: { - maxWidth: 400, - marginTop: 10, - marginLeft: 'auto', - textAlign: 'right', - }, -}) diff --git a/src/view/com/util/layouts/Breakpoints.tsx b/src/view/com/util/layouts/Breakpoints.tsx new file mode 100644 index 000000000..51c3ccd5a --- /dev/null +++ b/src/view/com/util/layouts/Breakpoints.tsx @@ -0,0 +1,8 @@ +import React from 'react' + +export const Desktop = ({}: React.PropsWithChildren<{}>) => null +export const TabletOrDesktop = ({}: React.PropsWithChildren<{}>) => null +export const Tablet = ({}: React.PropsWithChildren<{}>) => null +export const TabletOrMobile = ({children}: React.PropsWithChildren<{}>) => + children +export const Mobile = ({children}: React.PropsWithChildren<{}>) => children diff --git a/src/view/com/util/layouts/Breakpoints.web.tsx b/src/view/com/util/layouts/Breakpoints.web.tsx new file mode 100644 index 000000000..7031a1735 --- /dev/null +++ b/src/view/com/util/layouts/Breakpoints.web.tsx @@ -0,0 +1,20 @@ +import React from 'react' +import MediaQuery from 'react-responsive' + +export const Desktop = ({children}: React.PropsWithChildren<{}>) => ( + {children} +) +export const TabletOrDesktop = ({children}: React.PropsWithChildren<{}>) => ( + {children} +) +export const Tablet = ({children}: React.PropsWithChildren<{}>) => ( + + {children} + +) +export const TabletOrMobile = ({children}: React.PropsWithChildren<{}>) => ( + {children} +) +export const Mobile = ({children}: React.PropsWithChildren<{}>) => ( + {children} +) -- cgit 1.4.1 From 59dcedeea25804188b3503dbf166fa794af20612 Mon Sep 17 00:00:00 2001 From: Paul Frazee Date: Wed, 30 Aug 2023 16:15:06 -0700 Subject: Fix: remove bottom bar during onboard --- src/view/com/auth/Onboarding.tsx | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src') diff --git a/src/view/com/auth/Onboarding.tsx b/src/view/com/auth/Onboarding.tsx index 429fdddb3..065d4d244 100644 --- a/src/view/com/auth/Onboarding.tsx +++ b/src/view/com/auth/Onboarding.tsx @@ -12,6 +12,10 @@ export const Onboarding = observer(() => { const pal = usePalette('default') const store = useStores() + React.useEffect(() => { + store.shell.setMinimalShellMode(true) + }, [store]) + const next = () => store.onboarding.next() const skip = () => store.onboarding.skip() -- cgit 1.4.1