remove Code Search upsell from Cody page (#63440)

The general principle here is that we want to remove non-functional
upsells in our product. They add clutter and complexity and sometimes
annoy admins and users. As we unify the products, we will be adding a
lot more functional CTAs in the product to the same effect.

## Test plan

n/a; removal only
This commit is contained in:
Quinn Slack 2024-06-24 08:39:15 -07:00 committed by GitHub
parent 673f9e87dd
commit c3ce26f308
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 6 additions and 1799 deletions

View File

@ -228,7 +228,6 @@ ts_project(
"src/cody/components/ScopeSelector/index.tsx",
"src/cody/components/ScopeSelector/useRepoSuggestions.ts",
"src/cody/dashboard/CodyDashboardPage.tsx",
"src/cody/dashboard/UpsellImage.tsx",
"src/cody/editorGroups.ts",
"src/cody/invites/AcceptInviteBanner.tsx",
"src/cody/invites/InviteUsers.tsx",

View File

@ -99,41 +99,6 @@
}
}
}
&-upsell {
display: grid;
grid-template-columns: 1fr 1fr;
margin: 5rem auto;
padding: 3rem;
max-width: 60rem;
border-radius: 0.5rem;
background: linear-gradient(90.64deg, rgba(228, 211, 252, 0.32) 3.11%, rgba(215, 240, 253, 0.32) 83.64%),
linear-gradient(0deg, #f9fafb, #f9fafb);
:global(.theme-dark) & {
background: linear-gradient(0deg, #14171f, #14171f),
linear-gradient(90.64deg, rgba(28, 34, 48, 0.32) 3.11%, rgba(17, 26, 40, 0.32) 83.64%);
}
&-meta {
align-self: center;
}
&-title {
color: var(--text-title);
font-weight: 500;
font-size: 1.5rem;
margin-top: 1rem;
margin-bottom: 0.75rem;
}
&-description {
font-size: 0.9375rem;
font-weight: 400;
color: var(--text-body);
margin-bottom: 1.25rem;
}
}
}
.cody-gradient {
@ -197,11 +162,3 @@
min-width: 12rem;
}
}
.luminant-image {
mask-type: luminance;
}
.alpha-image {
mask-type: alpha;
}

View File

@ -1,30 +1,26 @@
import { type FC, useState, useEffect } from 'react'
import { useEffect, useState, type FC } from 'react'
import { mdiChevronDown } from '@mdi/js'
import type { TelemetryV2Props } from '@sourcegraph/shared/src/telemetry'
import { useIsLightTheme } from '@sourcegraph/shared/src/theme'
import {
Text,
H1,
ButtonLink,
H1,
Icon,
Link,
Menu,
MenuButton,
MenuList,
MenuItem,
Icon,
Position,
MenuLink,
MenuList,
Position,
Text,
} from '@sourcegraph/wildcard'
import { getLicenseFeatures } from '../../util/license'
import { CodyColorIcon } from '../chat/CodyPageIcon'
import { IntelliJIcon } from '../upsell/IntelliJ'
import { VSCodeIcon } from '../upsell/vs-code'
import { UpsellImage } from './UpsellImage'
import styles from './CodyDashboardPage.module.scss'
interface SetupOption {
@ -56,9 +52,7 @@ export const CodyDashboardPage: FC<CodyDashboardPageProps> = ({ telemetryRecorde
telemetryRecorder.recordEvent('cody.dashboard', 'view')
}, [telemetryRecorder])
const isLightTheme = useIsLightTheme()
const codySetupLink = 'https://sourcegraph.com/docs/cody'
const features = getLicenseFeatures()
return (
<section className={styles.dashboardContainer}>
<section className={styles.dashboardHero}>
@ -91,23 +85,6 @@ export const CodyDashboardPage: FC<CodyDashboardPageProps> = ({ telemetryRecorde
</ButtonLink>
</section>
</section>
{!features.isCodeSearchEnabled && (
<section className={styles.dashboardUpsell}>
<section className={styles.dashboardUpsellMeta}>
<SearchIcon />
<Text className={styles.dashboardUpsellTitle}>
Take control of your codebases with Code Search.
</Text>
<Text className={styles.dashboardUpsellDescription}>
Code Search allows you to search, understand and fix code, across massive codebases.
Discover vulnerabilities, improve code quality and more.
</Text>
<Link to="/search">Explore Code Search</Link>
</section>
<UpsellImage isLightTheme={isLightTheme} className="w-100" />
</section>
)}
</section>
)
}
@ -154,28 +131,3 @@ const LinkSelector: FC<LinkSelectorProps> = ({ options }) => {
</section>
)
}
const SearchIcon: FC = () => (
<svg xmlns="http://www.w3.org/2000/svg" width="37" height="40" fill="none" viewBox="0 0 37 40">
<path
fill="url(#paint0_linear_1070_2338)"
fillRule="evenodd"
d="M18.067 4.53c-7.441 0-13.5 6.029-13.5 13.5 0 7.47 6.059 13.5 13.5 13.5a2.274 2.274 0 012.284 2.264 2.274 2.274 0 01-2.284 2.265C8.074 36.059 0 27.972 0 18.029 0 8.087 8.074 0 18.067 0c9.994 0 18.068 8.087 18.068 18.03 0 4.964-2.013 9.463-5.268 12.724l5.393 5.386a2.251 2.251 0 01-.011 3.202 2.296 2.296 0 01-3.23-.01l-7.101-7.094a2.254 2.254 0 01.243-3.402 13.476 13.476 0 005.408-10.807c0-7.47-6.06-13.5-13.502-13.5z"
clipRule="evenodd"
/>
<defs>
<linearGradient
id="paint0_linear_1070_2338"
x1="0.885"
x2="30.949"
y1="26.786"
y2="27.094"
gradientUnits="userSpaceOnUse"
>
<stop stopColor="#00CBEC" />
<stop offset="0.51" stopColor="#A112FF" />
<stop offset="1" stopColor="#FF5543" />
</linearGradient>
</defs>
</svg>
)

File diff suppressed because one or more lines are too long