From db63442360dfea8da18bec1390fa44f6abdb4310 Mon Sep 17 00:00:00 2001 From: Ansh Nanda Date: Thu, 25 May 2023 12:54:31 -0700 Subject: [PATCH 1/8] adjust styling for feeds tab bar on mobile --- src/view/com/pager/FeedsTabBarMobile.tsx | 6 +++++- src/view/com/pager/TabBar.tsx | 8 +++++--- src/view/screens/Home.tsx | 2 +- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/src/view/com/pager/FeedsTabBarMobile.tsx b/src/view/com/pager/FeedsTabBarMobile.tsx index b99efcfe..2c26561a 100644 --- a/src/view/com/pager/FeedsTabBarMobile.tsx +++ b/src/view/com/pager/FeedsTabBarMobile.tsx @@ -54,7 +54,11 @@ export const FeedsTabBar = observer( - + From 8bb3f40a59232f71ae2b09509e3ae2559a04e4a7 Mon Sep 17 00:00:00 2001 From: Ansh Nanda Date: Thu, 25 May 2023 13:14:40 -0700 Subject: [PATCH 2/8] add saved feeds to left nav on desktop --- src/view/com/pager/FeedsTabBar.web.tsx | 2 +- src/view/com/pager/TabBar.tsx | 9 ++++++--- src/view/shell/desktop/LeftNav.tsx | 18 ++++++++++++++++++ 3 files changed, 25 insertions(+), 4 deletions(-) diff --git a/src/view/com/pager/FeedsTabBar.web.tsx b/src/view/com/pager/FeedsTabBar.web.tsx index b51db174..0df91595 100644 --- a/src/view/com/pager/FeedsTabBar.web.tsx +++ b/src/view/com/pager/FeedsTabBar.web.tsx @@ -28,7 +28,7 @@ const FeedsTabBarDesktop = observer( ) => { const store = useStores() const items = useMemo( - () => ['Following', ...store.me.savedFeeds.pinnedFeedNames, 'My Feeds'], + () => ['Following', ...store.me.savedFeeds.pinnedFeedNames], [store.me.savedFeeds.pinnedFeedNames], ) const pal = usePalette('default') diff --git a/src/view/com/pager/TabBar.tsx b/src/view/com/pager/TabBar.tsx index 2a1f2899..ec636d05 100644 --- a/src/view/com/pager/TabBar.tsx +++ b/src/view/com/pager/TabBar.tsx @@ -110,13 +110,16 @@ const styles = isDesktopWeb outer: { flexDirection: 'row', width: 598, - paddingHorizontal: 14, }, - contentContainer: {}, + contentContainer: { + columnGap: 14, + marginLeft: 14, + paddingRight: 14, + backgroundColor: 'transparent', + }, item: { paddingTop: 14, paddingBottom: 12, - paddingHorizontal: 12, borderBottomWidth: 3, borderBottomColor: 'transparent', }, diff --git a/src/view/shell/desktop/LeftNav.tsx b/src/view/shell/desktop/LeftNav.tsx index ba48dd2a..01cace15 100644 --- a/src/view/shell/desktop/LeftNav.tsx +++ b/src/view/shell/desktop/LeftNav.tsx @@ -204,6 +204,24 @@ export const DesktopLeftNav = observer(function DesktopLeftNav() { } label="Notifications" /> + + } + iconFilled={ + + } + label="My Feeds" + /> Date: Thu, 25 May 2023 13:42:26 -0700 Subject: [PATCH 3/8] fix padding on Discover Feeds screen --- src/view/screens/DiscoverFeeds.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/view/screens/DiscoverFeeds.tsx b/src/view/screens/DiscoverFeeds.tsx index 82a37942..cd32ec65 100644 --- a/src/view/screens/DiscoverFeeds.tsx +++ b/src/view/screens/DiscoverFeeds.tsx @@ -72,6 +72,7 @@ export const DiscoverFeedsScreen = withAuthRequired( style={[!isDesktopWeb && s.flex1]} data={feeds.feeds} keyExtractor={item => item.data.uri} + contentContainerStyle={styles.contentContainer} refreshControl={ Date: Thu, 25 May 2023 13:46:06 -0700 Subject: [PATCH 4/8] delete old My Feeds / Saved Feeds screen --- src/view/com/feeds/SavedFeeds.tsx | 151 ------------------------------ 1 file changed, 151 deletions(-) delete mode 100644 src/view/com/feeds/SavedFeeds.tsx diff --git a/src/view/com/feeds/SavedFeeds.tsx b/src/view/com/feeds/SavedFeeds.tsx deleted file mode 100644 index 1214e7ab..00000000 --- a/src/view/com/feeds/SavedFeeds.tsx +++ /dev/null @@ -1,151 +0,0 @@ -import React, {useEffect, useCallback} from 'react' -import {RefreshControl, StyleSheet, View} from 'react-native' -import {FontAwesomeIcon} from '@fortawesome/react-native-fontawesome' -import {usePalette} from 'lib/hooks/usePalette' -import {observer} from 'mobx-react-lite' -import {useStores} from 'state/index' -import {FlatList} from 'view/com/util/Views' -import {Text} from 'view/com/util/text/Text' -import {isDesktopWeb} from 'platform/detection' -import {s} from 'lib/styles' -import {Link, TextLink} from 'view/com/util/Link' -import {CustomFeed} from './CustomFeed' - -export const SavedFeeds = observer( - ({ - headerOffset = 0, - isPageFocused, - }: { - headerOffset?: number - isPageFocused: boolean - }) => { - const pal = usePalette('default') - const store = useStores() - - useEffect(() => { - if (isPageFocused) { - store.shell.setMinimalShellMode(false) - store.me.savedFeeds.refresh(true) - } - }, [store, isPageFocused]) - - const onRefresh = useCallback(() => { - store.me.savedFeeds.refresh() - }, [store]) - - const renderListEmptyComponent = useCallback(() => { - return ( - - - You don't have any saved feeds. You can find feeds by searching on - Bluesky. - - - ) - }, [pal]) - - const renderListFooterComponent = useCallback(() => { - return ( - <> - - - - - Discover new feeds - - - {!store.me.savedFeeds.isEmpty && ( - - - - Change Order - - - )} - - - - Feeds are custom algorithms that users build with a little coding - expertise.{' '} - {' '} - for more information. - - - - ) - }, [pal, store.me.savedFeeds.isEmpty]) - - const renderItem = useCallback( - ({item}) => , - [], - ) - - return ( - item.data.uri} - refreshing={store.me.savedFeeds.isRefreshing} - refreshControl={ - - } - renderItem={renderItem} - initialNumToRender={10} - ListFooterComponent={renderListFooterComponent} - ListEmptyComponent={renderListEmptyComponent} - extraData={store.me.savedFeeds.isLoading} - contentOffset={{x: 0, y: headerOffset * -1}} - // @ts-ignore our .web version only -prf - desktopFixedHeight - /> - ) - }, -) - -const styles = StyleSheet.create({ - footerLinks: { - marginTop: 8, - borderBottomWidth: 1, - }, - footerLink: { - flexDirection: 'row', - borderTopWidth: 1, - paddingHorizontal: 26, - paddingVertical: 18, - gap: 18, - }, - empty: { - paddingHorizontal: 18, - paddingVertical: 16, - borderRadius: 8, - marginHorizontal: 18, - marginTop: 10, - }, - footerText: { - paddingHorizontal: 26, - paddingVertical: 22, - }, -}) From 14619cf8a30f1c4e75de926ad3898ac86b0a7dd0 Mon Sep 17 00:00:00 2001 From: Ansh Nanda Date: Thu, 25 May 2023 13:46:17 -0700 Subject: [PATCH 5/8] fix type errors on Custom Feed screen --- src/view/screens/CustomFeed.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/view/screens/CustomFeed.tsx b/src/view/screens/CustomFeed.tsx index 49798d75..79b10de0 100644 --- a/src/view/screens/CustomFeed.tsx +++ b/src/view/screens/CustomFeed.tsx @@ -338,7 +338,11 @@ export const CustomFeedScreen = withAuthRequired( extraData={[uri, isPinned]} /> {isScrolledDown ? ( - + ) : null} Date: Thu, 25 May 2023 13:50:59 -0700 Subject: [PATCH 6/8] turn of auto correct and capitalize on search --- src/view/com/search/HeaderWithInput.tsx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/view/com/search/HeaderWithInput.tsx b/src/view/com/search/HeaderWithInput.tsx index 7a9e0cc6..7d0eeb2d 100644 --- a/src/view/com/search/HeaderWithInput.tsx +++ b/src/view/com/search/HeaderWithInput.tsx @@ -87,6 +87,8 @@ export function HeaderWithInput({ accessibilityRole="search" accessibilityLabel="Search" accessibilityHint="" + autoCorrect={false} + autoCapitalize="none" /> {query ? ( Date: Thu, 25 May 2023 13:51:08 -0700 Subject: [PATCH 7/8] rename Algos to Feeds on profile --- src/state/models/ui/profile.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/state/models/ui/profile.ts b/src/state/models/ui/profile.ts index 35831d1f..81daf797 100644 --- a/src/state/models/ui/profile.ts +++ b/src/state/models/ui/profile.ts @@ -8,7 +8,7 @@ import {ListsListModel} from '../lists/lists-list' export enum Sections { Posts = 'Posts', PostsWithReplies = 'Posts & replies', - CustomAlgorithms = 'Algos', + CustomAlgorithms = 'Feeds', Lists = 'Lists', } From 881be748d52f0bbf19543ac8a08d81b46bb8af5d Mon Sep 17 00:00:00 2001 From: Ansh Nanda Date: Thu, 25 May 2023 13:54:43 -0700 Subject: [PATCH 8/8] increase save custom feed btn hitslop --- src/view/com/feeds/CustomFeed.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/view/com/feeds/CustomFeed.tsx b/src/view/com/feeds/CustomFeed.tsx index 9a71eb84..748b89c0 100644 --- a/src/view/com/feeds/CustomFeed.tsx +++ b/src/view/com/feeds/CustomFeed.tsx @@ -98,6 +98,7 @@ export const CustomFeed = observer( } accessibilityHint="" onPress={onToggleSaved} + hitSlop={15} style={styles.btn}> {item.isSaved ? (