Skip to content
This repository was archived by the owner on Sep 30, 2024. It is now read-only.

Commit c3ce26f

Browse files
authored
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
1 parent 673f9e8 commit c3ce26f

File tree

4 files changed

+6
-1799
lines changed

4 files changed

+6
-1799
lines changed

client/web/BUILD.bazel

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,6 @@ ts_project(
228228
"src/cody/components/ScopeSelector/index.tsx",
229229
"src/cody/components/ScopeSelector/useRepoSuggestions.ts",
230230
"src/cody/dashboard/CodyDashboardPage.tsx",
231-
"src/cody/dashboard/UpsellImage.tsx",
232231
"src/cody/editorGroups.ts",
233232
"src/cody/invites/AcceptInviteBanner.tsx",
234233
"src/cody/invites/InviteUsers.tsx",

client/web/src/cody/dashboard/CodyDashboardPage.module.scss

Lines changed: 0 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -99,41 +99,6 @@
9999
}
100100
}
101101
}
102-
103-
&-upsell {
104-
display: grid;
105-
grid-template-columns: 1fr 1fr;
106-
margin: 5rem auto;
107-
padding: 3rem;
108-
max-width: 60rem;
109-
border-radius: 0.5rem;
110-
background: linear-gradient(90.64deg, rgba(228, 211, 252, 0.32) 3.11%, rgba(215, 240, 253, 0.32) 83.64%),
111-
linear-gradient(0deg, #f9fafb, #f9fafb);
112-
113-
:global(.theme-dark) & {
114-
background: linear-gradient(0deg, #14171f, #14171f),
115-
linear-gradient(90.64deg, rgba(28, 34, 48, 0.32) 3.11%, rgba(17, 26, 40, 0.32) 83.64%);
116-
}
117-
118-
&-meta {
119-
align-self: center;
120-
}
121-
122-
&-title {
123-
color: var(--text-title);
124-
font-weight: 500;
125-
font-size: 1.5rem;
126-
margin-top: 1rem;
127-
margin-bottom: 0.75rem;
128-
}
129-
130-
&-description {
131-
font-size: 0.9375rem;
132-
font-weight: 400;
133-
color: var(--text-body);
134-
margin-bottom: 1.25rem;
135-
}
136-
}
137102
}
138103

139104
.cody-gradient {
@@ -197,11 +162,3 @@
197162
min-width: 12rem;
198163
}
199164
}
200-
201-
.luminant-image {
202-
mask-type: luminance;
203-
}
204-
205-
.alpha-image {
206-
mask-type: alpha;
207-
}

client/web/src/cody/dashboard/CodyDashboardPage.tsx

Lines changed: 6 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,26 @@
1-
import { type FC, useState, useEffect } from 'react'
1+
import { useEffect, useState, type FC } from 'react'
22

33
import { mdiChevronDown } from '@mdi/js'
44

55
import type { TelemetryV2Props } from '@sourcegraph/shared/src/telemetry'
6-
import { useIsLightTheme } from '@sourcegraph/shared/src/theme'
76
import {
8-
Text,
9-
H1,
107
ButtonLink,
8+
H1,
9+
Icon,
1110
Link,
1211
Menu,
1312
MenuButton,
14-
MenuList,
1513
MenuItem,
16-
Icon,
17-
Position,
1814
MenuLink,
15+
MenuList,
16+
Position,
17+
Text,
1918
} from '@sourcegraph/wildcard'
2019

21-
import { getLicenseFeatures } from '../../util/license'
2220
import { CodyColorIcon } from '../chat/CodyPageIcon'
2321
import { IntelliJIcon } from '../upsell/IntelliJ'
2422
import { VSCodeIcon } from '../upsell/vs-code'
2523

26-
import { UpsellImage } from './UpsellImage'
27-
2824
import styles from './CodyDashboardPage.module.scss'
2925

3026
interface SetupOption {
@@ -56,9 +52,7 @@ export const CodyDashboardPage: FC<CodyDashboardPageProps> = ({ telemetryRecorde
5652
telemetryRecorder.recordEvent('cody.dashboard', 'view')
5753
}, [telemetryRecorder])
5854

59-
const isLightTheme = useIsLightTheme()
6055
const codySetupLink = 'https://sourcegraph.com/docs/cody'
61-
const features = getLicenseFeatures()
6256
return (
6357
<section className={styles.dashboardContainer}>
6458
<section className={styles.dashboardHero}>
@@ -91,23 +85,6 @@ export const CodyDashboardPage: FC<CodyDashboardPageProps> = ({ telemetryRecorde
9185
</ButtonLink>
9286
</section>
9387
</section>
94-
95-
{!features.isCodeSearchEnabled && (
96-
<section className={styles.dashboardUpsell}>
97-
<section className={styles.dashboardUpsellMeta}>
98-
<SearchIcon />
99-
<Text className={styles.dashboardUpsellTitle}>
100-
Take control of your codebases with Code Search.
101-
</Text>
102-
<Text className={styles.dashboardUpsellDescription}>
103-
Code Search allows you to search, understand and fix code, across massive codebases.
104-
Discover vulnerabilities, improve code quality and more.
105-
</Text>
106-
<Link to="/search">Explore Code Search</Link>
107-
</section>
108-
<UpsellImage isLightTheme={isLightTheme} className="w-100" />
109-
</section>
110-
)}
11188
</section>
11289
)
11390
}
@@ -154,28 +131,3 @@ const LinkSelector: FC<LinkSelectorProps> = ({ options }) => {
154131
</section>
155132
)
156133
}
157-
158-
const SearchIcon: FC = () => (
159-
<svg xmlns="http://www.w3.org/2000/svg" width="37" height="40" fill="none" viewBox="0 0 37 40">
160-
<path
161-
fill="url(#paint0_linear_1070_2338)"
162-
fillRule="evenodd"
163-
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"
164-
clipRule="evenodd"
165-
/>
166-
<defs>
167-
<linearGradient
168-
id="paint0_linear_1070_2338"
169-
x1="0.885"
170-
x2="30.949"
171-
y1="26.786"
172-
y2="27.094"
173-
gradientUnits="userSpaceOnUse"
174-
>
175-
<stop stopColor="#00CBEC" />
176-
<stop offset="0.51" stopColor="#A112FF" />
177-
<stop offset="1" stopColor="#FF5543" />
178-
</linearGradient>
179-
</defs>
180-
</svg>
181-
)

0 commit comments

Comments
 (0)