From 5f59bfd4fb2205248ab554c1a9e48c85d1cfaeaf Mon Sep 17 00:00:00 2001 From: Ansh Nanda Date: Fri, 15 Sep 2023 12:27:39 +0530 Subject: [PATCH 01/17] upgrade api package --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index baf4f2843d..77daf28af8 100644 --- a/package.json +++ b/package.json @@ -25,7 +25,7 @@ "build:apk": "eas build -p android --profile dev-android-apk" }, "dependencies": { - "@atproto/api": "^0.6.12", + "@atproto/api": "^0.6.13", "@bam.tech/react-native-image-resizer": "^3.0.4", "@braintree/sanitize-url": "^6.0.2", "@emoji-mart/react": "^1.1.1", diff --git a/yarn.lock b/yarn.lock index 308e3fd969..242bee4783 100644 --- a/yarn.lock +++ b/yarn.lock @@ -45,10 +45,10 @@ tlds "^1.234.0" typed-emitter "^2.1.0" -"@atproto/api@^0.6.12": - version "0.6.12" - resolved "https://registry.yarnpkg.com/@atproto/api/-/api-0.6.12.tgz#f39ad9d225aafc5fd90f07d0011d63435c657775" - integrity sha512-9R8F78553GI47Iq4FDVwL05LorWTQZQ6FmFsDF/+yryiA+a/VVyvYG4USSptURBZCRgZA5VgTW1We/PwAcDfEA== +"@atproto/api@^0.6.13": + version "0.6.13" + resolved "https://registry.yarnpkg.com/@atproto/api/-/api-0.6.13.tgz#26caeae983c577dfedf6ab1f054b31eb158d8ca6" + integrity sha512-MudGswKKFJmeh4RoN9LZnYoHib0L7QEIzOdkRU26Fr0dBqSQrnWwLYA9zsNjNg/mZKDyweYkP1ChTNkQvNiYFw== dependencies: "@atproto/common-web" "^0.2.0" "@atproto/lexicon" "^0.2.0" From 778d6f4af33419537b4b87818658e3cbf0c6eab5 Mon Sep 17 00:00:00 2001 From: Ansh Nanda Date: Fri, 15 Sep 2023 12:27:52 +0530 Subject: [PATCH 02/17] add RecommendedFollows as a step in onboarding --- src/state/models/discovery/onboarding.ts | 4 + src/view/com/auth/Onboarding.tsx | 4 + .../com/auth/onboarding/RecommendedFeeds.tsx | 2 +- .../auth/onboarding/RecommendedFollows.tsx | 177 ++++++++++++++++++ 4 files changed, 186 insertions(+), 1 deletion(-) create mode 100644 src/view/com/auth/onboarding/RecommendedFollows.tsx diff --git a/src/state/models/discovery/onboarding.ts b/src/state/models/discovery/onboarding.ts index 09c9eac041..8c3d6e7f3d 100644 --- a/src/state/models/discovery/onboarding.ts +++ b/src/state/models/discovery/onboarding.ts @@ -6,6 +6,7 @@ import {track} from 'lib/analytics/analytics' export const OnboardingScreenSteps = { Welcome: 'Welcome', RecommendedFeeds: 'RecommendedFeeds', + RecommendedFollows: 'RecommendedFollows', Home: 'Home', } as const @@ -56,6 +57,9 @@ export class OnboardingModel { this.step = 'RecommendedFeeds' return this.step } else if (this.step === 'RecommendedFeeds') { + this.step = 'RecommendedFollows' + return this.step + } else if (this.step === 'RecommendedFollows') { this.finish() return this.step } else { diff --git a/src/view/com/auth/Onboarding.tsx b/src/view/com/auth/Onboarding.tsx index 6ea8cd79e1..a36544a037 100644 --- a/src/view/com/auth/Onboarding.tsx +++ b/src/view/com/auth/Onboarding.tsx @@ -7,6 +7,7 @@ import {usePalette} from 'lib/hooks/usePalette' import {useStores} from 'state/index' import {Welcome} from './onboarding/Welcome' import {RecommendedFeeds} from './onboarding/RecommendedFeeds' +import {RecommendedFollows} from './onboarding/RecommendedFollows' export const Onboarding = observer(function OnboardingImpl() { const pal = usePalette('default') @@ -28,6 +29,9 @@ export const Onboarding = observer(function OnboardingImpl() { {store.onboarding.step === 'RecommendedFeeds' && ( )} + {store.onboarding.step === 'RecommendedFollows' && ( + + )} ) diff --git a/src/view/com/auth/onboarding/RecommendedFeeds.tsx b/src/view/com/auth/onboarding/RecommendedFeeds.tsx index 99cdcafd03..cfe73df781 100644 --- a/src/view/com/auth/onboarding/RecommendedFeeds.tsx +++ b/src/view/com/auth/onboarding/RecommendedFeeds.tsx @@ -68,7 +68,7 @@ export const RecommendedFeeds = observer(function RecommendedFeedsImpl({ - Done + Next diff --git a/src/view/com/auth/onboarding/RecommendedFollows.tsx b/src/view/com/auth/onboarding/RecommendedFollows.tsx new file mode 100644 index 0000000000..9562510e88 --- /dev/null +++ b/src/view/com/auth/onboarding/RecommendedFollows.tsx @@ -0,0 +1,177 @@ +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 RecommendedFollows = observer(function RecommendedFollowsImpl({ + next, +}: Props) { + const pal = usePalette('default') + const {isTabletOrMobile} = useWebMediaQueries() + + const title = ( + <> + + Follow some + + + Recommended + + + Users + + + Follow some users to get started. We can recommend you more users based + on who you find interesting. + + + + + + ) + + return ( + <> + + + } + keyExtractor={item => item.did + item.rkey} + style={{flex: 1}} + /> + + + + + + + Check out some recommended users. Follow them to see similar users. + + + } + keyExtractor={item => item.did + item.rkey} + style={{flex: 1}} + /> + +