From ea5f02067f9d12964db172ad58d9076ea7223672 Mon Sep 17 00:00:00 2001 From: Camden Cheek Date: Tue, 12 Mar 2024 09:04:16 -0600 Subject: [PATCH] Chore: remove Own from global navbar (#61008) remove Own from global navbar --- client/web/src/LegacyLayout.tsx | 1 - client/web/src/nav/GlobalNavbar.tsx | 7 +------ .../NewGlobalNavigationBar.story.tsx | 1 - .../nav/new-global-navigation/NewGlobalNavigationBar.tsx | 9 --------- 4 files changed, 1 insertion(+), 17 deletions(-) diff --git a/client/web/src/LegacyLayout.tsx b/client/web/src/LegacyLayout.tsx index 6b461c9529c..5d6a257d0d6 100644 --- a/client/web/src/LegacyLayout.tsx +++ b/client/web/src/LegacyLayout.tsx @@ -230,7 +230,6 @@ export const LegacyLayout: FC = props => { showSearchBox={showNavigationSearchBox} authenticatedUser={props.authenticatedUser} isSourcegraphDotCom={props.isSourcegraphDotCom} - ownEnabled={props.ownEnabled} notebooksEnabled={props.notebooksEnabled} searchContextsEnabled={props.searchContextsEnabled} codeMonitoringEnabled={props.codeMonitoringEnabled} diff --git a/client/web/src/nav/GlobalNavbar.tsx b/client/web/src/nav/GlobalNavbar.tsx index 38f4b29b611..93a1a775d98 100644 --- a/client/web/src/nav/GlobalNavbar.tsx +++ b/client/web/src/nav/GlobalNavbar.tsx @@ -147,7 +147,6 @@ export const GlobalNavbar: React.FunctionComponent = props => { const { showSearchContext, - showOwn, showCodySearch, showSearchJobs, showSearchNotebook, @@ -320,7 +316,6 @@ export const InlineNavigationPanel: FC = props => { // We hardcode the code monitoring path here because PageRoutes.CodeMonitoring is a catch-all // path for all code monitoring sub links. showCodeMonitoring && { path: '/code-monitoring', content: 'Monitoring' }, - showOwn && { path: PageRoutes.Own, content: 'Code ownership' }, showCodySearch && { path: PageRoutes.CodySearch, content: ( @@ -339,7 +334,7 @@ export const InlineNavigationPanel: FC = props => { }, ] return items.filter((item): item is NavDropdownItem => !!item) - }, [showOwn, showSearchContext, showCodySearch, showSearchJobs, showCodeMonitoring, showSearchNotebook]) + }, [showSearchContext, showCodySearch, showSearchJobs, showCodeMonitoring, showSearchNotebook]) const searchNavigation = searchNavBarItems.length > 0 ? ( diff --git a/client/web/src/nav/new-global-navigation/NewGlobalNavigationBar.story.tsx b/client/web/src/nav/new-global-navigation/NewGlobalNavigationBar.story.tsx index c87f1979233..7c848d5f669 100644 --- a/client/web/src/nav/new-global-navigation/NewGlobalNavigationBar.story.tsx +++ b/client/web/src/nav/new-global-navigation/NewGlobalNavigationBar.story.tsx @@ -26,7 +26,6 @@ export const NewGlobalNavigationBarDemo: StoryFn = () => ( = props => { const { isSourcegraphDotCom, - ownEnabled, notebooksEnabled, searchContextsEnabled, codeMonitoringEnabled, @@ -72,7 +70,6 @@ export const NewGlobalNavigationBar: FC = props => { // Features enablement flags and conditions const isLicensed = !!window.context?.licenseInfo - const showOwn = ownEnabled const showSearchContext = searchContextsEnabled && !isSourcegraphDotCom const [showCodySearch] = useFeatureFlag('cody-web-search') const showSearchJobs = isSearchJobsEnabled() @@ -112,7 +109,6 @@ export const NewGlobalNavigationBar: FC = props => { ) : ( = props => { {isSideMenuOpen && ( = props => { interface SidebarNavigationProps { isSourcegraphDotCom: boolean showSearchContext: boolean - showOwn: boolean showCodySearch: boolean showSearchJobs: boolean showSearchNotebook: boolean @@ -305,7 +299,6 @@ interface SidebarNavigationProps { const SidebarNavigation: FC = props => { const { showSearchContext, - showOwn, showCodySearch, showSearchJobs, showSearchNotebook, @@ -354,13 +347,11 @@ const SidebarNavigation: FC = props => { Context )} - {showOwn && Code ownership} {showSearchNotebook && ( Notebooks )} - {showCodeMonitoring && ( Code Monitoring