diff --git a/web/src/repogroups/RepogroupPage.scss b/web/src/repogroups/RepogroupPage.scss index 66941f1f1212d9..add5899f519485 100644 --- a/web/src/repogroups/RepogroupPage.scss +++ b/web/src/repogroups/RepogroupPage.scss @@ -13,7 +13,7 @@ } &__logo-container { - margin-top: 4rem; + margin-top: 6rem; } &__container { diff --git a/web/src/repogroups/RepogroupPage.tsx b/web/src/repogroups/RepogroupPage.tsx index 46739d68bac6f0..2b2041255d9c71 100644 --- a/web/src/repogroups/RepogroupPage.tsx +++ b/web/src/repogroups/RepogroupPage.tsx @@ -58,7 +58,6 @@ export interface RepogroupPageProps /** Whether globbing is enabled for filters. */ globbing: boolean - lowProfile?: boolean } export const RepogroupPage: React.FunctionComponent = (props: RepogroupPageProps) => { @@ -97,7 +96,7 @@ export const RepogroupPage: React.FunctionComponent = (props text={props.repogroupMetadata.title} />
- {props.lowProfile ? ( + {props.repogroupMetadata.lowProfile ? ( <>{props.repogroupMetadata.description} ) : ( @@ -107,13 +106,18 @@ export const RepogroupPage: React.FunctionComponent = (props )}
- {props.lowProfile ? ( - + {props.repogroupMetadata.lowProfile ? ( + ) : ( )}
- {!props.lowProfile && ( + {!props.repogroupMetadata.lowProfile && (

diff --git a/web/src/repogroups/cncf.tsx b/web/src/repogroups/cncf.tsx index 8acadc7c4be9e2..ec322fff057837 100644 --- a/web/src/repogroups/cncf.tsx +++ b/web/src/repogroups/cncf.tsx @@ -8,8 +8,8 @@ export const cncf: RepogroupMetadata = { description: ( <> Search the{' '} - - 67 CNCF projects + + CNCF projects . @@ -17,4 +17,5 @@ export const cncf: RepogroupMetadata = { examples: [], homepageDescription: 'Search CNCF projects', homepageIcon: 'https://github.com/cncf/artwork/blob/master/other/cncf/icon/color/cncf-icon-color.png?raw=true', + lowProfile: true, } diff --git a/web/src/repogroups/types.ts b/web/src/repogroups/types.ts index 18e870ba1d3001..de2c0856a80f59 100644 --- a/web/src/repogroups/types.ts +++ b/web/src/repogroups/types.ts @@ -39,4 +39,9 @@ export interface RepogroupMetadata { * A description when displayed on the search homepage. */ homepageDescription: string + + /** + * Whether to display this in a minimal repogroup page, without examples/repositories/descriptions below the search bar. + */ + lowProfile?: boolean } diff --git a/web/src/routes.tsx b/web/src/routes.tsx index 2b8dd6ac4a63eb..6a64d0cb1617d2 100644 --- a/web/src/routes.tsx +++ b/web/src/routes.tsx @@ -215,7 +215,7 @@ export const routes: readonly LayoutRouteProps[] = [ }, { path: '/cncf', - render: props => , + render: props => , condition: props => window.context.sourcegraphDotComMode, }, { diff --git a/web/src/search/input/SearchPageInput.tsx b/web/src/search/input/SearchPageInput.tsx index 16b03f809a9c62..b3ada350ecbc85 100644 --- a/web/src/search/input/SearchPageInput.tsx +++ b/web/src/search/input/SearchPageInput.tsx @@ -68,7 +68,9 @@ interface Props /** A query fragment to appear at the beginning of the input. */ queryPrefix?: string /** A query fragment to be appended to queries. This will not appear in the input until a search is submitted. */ - hiddenQuerySuffix?: string + hiddenQueryPrefix?: string + /** Don't show the version contexts dropdown. */ + hideVersionContexts?: boolean autoFocus?: boolean } @@ -238,8 +240,8 @@ export const SearchPageInput: React.FunctionComponent = (props: Props) => event?.preventDefault() submitSearch({ ...props, - query: props.hiddenQuerySuffix - ? `${userQueryState.query} ${props.hiddenQuerySuffix}` + query: props.hiddenQueryPrefix + ? `${props.hiddenQueryPrefix} ${userQueryState.query}` : userQueryState.query, source: 'home', searchParameters: tourWasActive ? [{ key: 'onboardingTour', value: 'true' }] : undefined, @@ -265,15 +267,17 @@ export const SearchPageInput: React.FunctionComponent = (props: Props) => {props.splitSearchModes && ( )} - + {!props.hideVersionContexts && ( + + )}