This repository has no description
0

Configure Feed

Select the types of activity you want to include in your feed.

remove following feature flag

+44 -65
+13 -18
src/webapp/features/collections/components/collectionHeader/CollectionHeader.tsx
··· 24 24 import MarginLogo from '@/components/MarginLogo'; 25 25 import { getRelativeTime } from '@/lib/utils/time'; 26 26 import CollectionContributorsSummarySkeleton from '../collectionContributorsSummary/Skeleton.CollectionContributorsSummary'; 27 - import { useFeatureFlags } from '@/lib/clientFeatureFlags'; 28 27 29 28 interface Props { 30 29 rkey: string; ··· 36 35 rkey: props.rkey, 37 36 handle: props.handle, 38 37 }); 39 - 40 - const { data: featureFlags } = useFeatureFlags(); 41 38 42 39 if (isPending) { 43 40 return null; // You can add a skeleton here if needed ··· 167 164 168 165 <Divider orientation="vertical" /> 169 166 170 - {featureFlags?.following && ( 171 - <> 172 - <Group gap={5}> 173 - <Text fw={500} fz={'sm'} c={'bright'}> 174 - {collection.followerCount} 175 - </Text> 176 - <Text fw={500} fz={'sm'} c={'dimmed'}> 177 - {collection.followerCount === 1 178 - ? 'Follower' 179 - : 'Followers'} 180 - </Text> 181 - </Group> 182 - <Divider orientation="vertical" /> 183 - </> 184 - )} 167 + <> 168 + <Group gap={5}> 169 + <Text fw={500} fz={'sm'} c={'bright'}> 170 + {collection.followerCount} 171 + </Text> 172 + <Text fw={500} fz={'sm'} c={'dimmed'}> 173 + {collection.followerCount === 1 174 + ? 'Follower' 175 + : 'Followers'} 176 + </Text> 177 + </Group> 178 + <Divider orientation="vertical" /> 179 + </> 185 180 186 181 <Group gap={5}> 187 182 <Text fw={500} fz={'sm'} c={'bright'}>
+16 -20
src/webapp/features/feeds/components/feedControls/FeedControls.tsx
··· 14 14 import { useOptimistic, useState, useTransition } from 'react'; 15 15 import { FaSeedling } from 'react-icons/fa6'; 16 16 import { IoMdCheckmark } from 'react-icons/io'; 17 - import { useFeatureFlags } from '@/lib/clientFeatureFlags'; 18 17 import MarginLogo from '@/components/MarginLogo'; 19 18 import SembleLogo from '@/assets/semble-logo.svg'; 20 19 import { getUrlTypeIcon } from '@/lib/utils/icon'; ··· 45 44 ]; 46 45 47 46 export default function FeedControls() { 48 - const { data: featureFlags } = useFeatureFlags(); 49 47 const router = useRouter(); 50 48 const searchParams = useSearchParams(); 51 49 const sourceFromUrl = searchParams.get('source') as ActivitySource | null; ··· 132 130 <Menu.Target> 133 131 <Button variant="light" color="cyan" leftSection={<MdFilterList />}> 134 132 {selectedSource?.label} 135 - {featureFlags?.following !== false && ` / ${selectedFeed?.label}`} 133 + {` / ${selectedFeed?.label}`} 136 134 {optimisticType && ` / ${upperFirst(optimisticType)}s`} 137 135 </Button> 138 136 </Menu.Target> ··· 153 151 </Menu.Item> 154 152 ))} 155 153 156 - {featureFlags?.following && ( 157 - <> 158 - <Menu.Label>Feed</Menu.Label> 159 - {feedOptions.map((option) => ( 160 - <Menu.Item 161 - key={option.value} 162 - onClick={() => handleFeedClick(option.value)} 163 - rightSection={ 164 - option.value === optimisticFeed ? <IoMdCheckmark /> : null 165 - } 166 - closeMenuOnClick={false} 167 - > 168 - {option.label} 169 - </Menu.Item> 170 - ))} 171 - </> 172 - )} 154 + <> 155 + <Menu.Label>Feed</Menu.Label> 156 + {feedOptions.map((option) => ( 157 + <Menu.Item 158 + key={option.value} 159 + onClick={() => handleFeedClick(option.value)} 160 + rightSection={ 161 + option.value === optimisticFeed ? <IoMdCheckmark /> : null 162 + } 163 + closeMenuOnClick={false} 164 + > 165 + {option.label} 166 + </Menu.Item> 167 + ))} 168 + </> 173 169 174 170 <Menu.Label>Type</Menu.Label> 175 171 <Popover
-6
src/webapp/features/follows/components/followButton/FollowButton.tsx
··· 3 3 import { Button } from '@mantine/core'; 4 4 import { startTransition } from 'react'; 5 5 import { useToggleFollow } from '../../lib/mutations/useToggleFollow'; 6 - import { useFeatureFlags } from '@/lib/clientFeatureFlags'; 7 6 8 7 interface Props { 9 8 targetId: string; ··· 14 13 } 15 14 16 15 export default function FollowButton(props: Props) { 17 - const { data: featureFlags } = useFeatureFlags(); 18 16 const { isFollowing, toggleAction, setOptimisticIsFollowing } = 19 17 useToggleFollow(props.initialIsFollowing ?? false); 20 - 21 - if (!featureFlags?.following) { 22 - return null; 23 - } 24 18 25 19 return ( 26 20 <Button
+11 -13
src/webapp/features/profile/components/profileHeader/ProfileHeader.tsx
··· 77 77 {profile.name} 78 78 </Title> 79 79 <Group gap={'xs'}> 80 - {featureFlags.following && profile.followsYou && ( 80 + {profile.followsYou && ( 81 81 <Badge variant="light" color="gray"> 82 82 Follows you 83 83 </Badge> ··· 111 111 )} 112 112 113 113 {/* follow stats */} 114 - {featureFlags.following && ( 115 - <Suspense fallback={<FollowStatsSkeleton />}> 116 - <ProfileFollowStats 117 - handle={props.handle} 118 - initialFollowerCount={profile.followerCount ?? 0} 119 - initialFollowingCount={profile.followingCount ?? 0} 120 - initialFollowedCollectionsCount={ 121 - profile.followedCollectionsCount ?? 0 122 - } 123 - /> 124 - </Suspense> 125 - )} 114 + <Suspense fallback={<FollowStatsSkeleton />}> 115 + <ProfileFollowStats 116 + handle={props.handle} 117 + initialFollowerCount={profile.followerCount ?? 0} 118 + initialFollowingCount={profile.followingCount ?? 0} 119 + initialFollowedCollectionsCount={ 120 + profile.followedCollectionsCount ?? 0 121 + } 122 + /> 123 + </Suspense> 126 124 </Stack> 127 125 </Stack> 128 126 </Stack>
+3 -7
src/webapp/features/profile/components/profileTabs/ProfileTabs.tsx
··· 3 3 import { Group, Paper, ScrollAreaAutosize, Tabs } from '@mantine/core'; 4 4 import TabItem from './TabItem'; 5 5 import { usePathname } from 'next/navigation'; 6 - import { useFeatureFlags } from '@/lib/clientFeatureFlags'; 7 6 8 7 interface Props { 9 8 handle: string; ··· 14 13 const segment = pathname.split('/')[3]; 15 14 const currentTab = segment || 'profile'; // treat base route as 'profile' 16 15 const basePath = `/profile/${props.handle}`; 17 - const { data: featureFlags } = useFeatureFlags(); 18 16 19 17 return ( 20 18 <Tabs value={currentTab}> ··· 31 29 <TabItem value="collections" href={`${basePath}/collections`}> 32 30 Collections 33 31 </TabItem> 34 - {featureFlags?.following && ( 35 - <TabItem value="network" href={`${basePath}/network`}> 36 - Network 37 - </TabItem> 38 - )} 32 + <TabItem value="network" href={`${basePath}/network`}> 33 + Network 34 + </TabItem> 39 35 </Group> 40 36 </Tabs.List> 41 37 </ScrollAreaAutosize>
+1 -1
src/webapp/lib/serverFeatureFlags.ts
··· 30 30 leafletMentions: show, 31 31 animatedLandingTitle: show, 32 32 openCollections: true, 33 - following: show, 33 + following: true, 34 34 }; 35 35 }