This repository has no description
0

Configure Feed

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

hide connections behind feature flag

+23 -9
+7 -3
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'; 6 7 7 8 interface Props { 8 9 handle: string; ··· 13 14 const segment = pathname.split('/')[3]; 14 15 const currentTab = segment || 'profile'; // treat base route as 'profile' 15 16 const basePath = `/profile/${props.handle}`; 17 + const { data: featureFlags } = useFeatureFlags(); 16 18 17 19 return ( 18 20 <Tabs value={currentTab}> ··· 29 31 <TabItem value="collections" href={`${basePath}/collections`}> 30 32 Collections 31 33 </TabItem> 32 - <TabItem value="connections" href={`${basePath}/connections`}> 33 - Connections 34 - </TabItem> 34 + {featureFlags?.connections && ( 35 + <TabItem value="connections" href={`${basePath}/connections`}> 36 + Connections 37 + </TabItem> 38 + )} 35 39 <TabItem value="network" href={`${basePath}/network`}> 36 40 Network 37 41 </TabItem>
+12 -6
src/webapp/features/semble/components/sembleTabs/SembleTabs.tsx
··· 10 10 TabsPanel, 11 11 } from '@mantine/core'; 12 12 import TabItem from './TabItem'; 13 + import { useFeatureFlags } from '@/lib/clientFeatureFlags'; 13 14 14 15 import SembleNotesContainer from '../../containers/sembleNotesContainer/SembleNotesContainer'; 15 16 import SembleNotesContainerSkeleton from '../../containers/sembleNotesContainer/Skeleton.SembleNotesContainer'; ··· 36 37 37 38 export default function SembleTabs(props: Props) { 38 39 const [activeTab, setActiveTab] = useState<TabValue>('similar'); 40 + const { data: featureFlags } = useFeatureFlags(); 39 41 40 42 return ( 41 43 <Tabs ··· 47 49 <TabsList> 48 50 <Group wrap="nowrap"> 49 51 <TabItem value="similar">Similar cards</TabItem> 50 - <TabItem value="connections">Connections</TabItem> 52 + {featureFlags?.connections && ( 53 + <TabItem value="connections">Connections</TabItem> 54 + )} 51 55 <TabItem value="notes">Notes</TabItem> 52 56 <TabItem value="collections">Collections</TabItem> 53 57 <TabItem value="addedBy">Added by</TabItem> ··· 81 85 </Suspense> 82 86 </TabsPanel> 83 87 84 - <TabsPanel value="connections"> 85 - <Suspense fallback={<SembleConnectionsContainerSkeleton />}> 86 - <SembleConnectionsContainer url={props.url} /> 87 - </Suspense> 88 - </TabsPanel> 88 + {featureFlags?.connections && ( 89 + <TabsPanel value="connections"> 90 + <Suspense fallback={<SembleConnectionsContainerSkeleton />}> 91 + <SembleConnectionsContainer url={props.url} /> 92 + </Suspense> 93 + </TabsPanel> 94 + )} 89 95 90 96 <TabsPanel value="mentions"> 91 97 <Suspense fallback={<SembleMentionsContainerSkeleton />}>
+1
src/webapp/lib/clientFeatureFlags.ts
··· 9 9 animatedLandingTitle: boolean; 10 10 openCollections: boolean; 11 11 following: boolean; 12 + connections: boolean; 12 13 } 13 14 14 15 async function fetchFeatureFlags(): Promise<FeatureFlags> {
+3
src/webapp/lib/serverFeatureFlags.ts
··· 15 15 'atproto.science', 16 16 'chrisshank.com', 17 17 'jasmine-pyz.bsky.social', 18 + 'uppy-hacker.bsky.social', 19 + 'joelchan86.bsky.social', 18 20 ]); 19 21 20 22 export async function getServerFeatureFlags() { ··· 31 33 animatedLandingTitle: show, 32 34 openCollections: true, 33 35 following: true, 36 + connections: show, 34 37 }; 35 38 }