-
Notifications
You must be signed in to change notification settings - Fork 335
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(webviews): add Sourcegraph Workspaces CTA #6604
Merged
Merged
Changes from 5 commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
145ebaa
feat(chat): add WelcomeNotice component to WelcomeMessage
abeatrix 0d79663
add isTeamsUpgradeCtaEnabled prop to WelcomeMessage component
abeatrix 6d20724
todo
abeatrix 3754ae8
update text size and notice position
abeatrix 9487bc9
apply feedback changes
abeatrix 3b3c3f3
flag
abeatrix 6a9c4aa
feat(webview): add Upgrade to Pro & Enterprise plan to user menu (#6606)
abeatrix 3327780
feat(webview): add Sourcegraph Workspaces upgrade CTA (#6605)
abeatrix 9b6dd91
import DOTCOM_WORKSPACE_LEARN_MORE_URL
abeatrix File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
import { XIcon } from 'lucide-react' | ||
import { type FunctionComponent, useCallback } from 'react' | ||
import { useLocalStorage } from '../../components/hooks' | ||
import { Badge } from '../../components/shadcn/ui/badge' | ||
import { Button } from '../../components/shadcn/ui/button' | ||
import graphDarkCTA from '../../graph_dark.svg' | ||
import graphLightCTA from '../../graph_light.svg' | ||
import { SourcegraphLogo } from '../../icons/SourcegraphLogo' | ||
import { useTelemetryRecorder } from '../../utils/telemetry' | ||
|
||
const WORKSPACES_URL = 'https://workspaces.sourcegraph.com' | ||
// TODO: Update to live link https://linear.app/sourcegraph/issue/CORE-535/ | ||
const DOCS_URL = 'https://docs.sourcegraph.com' | ||
|
||
export const WelcomeNotice: FunctionComponent = () => { | ||
const [dismissed, setDismissed] = useLocalStorage('sg_welcome_notice_00', 0) | ||
if (dismissed) { | ||
return null | ||
} | ||
const telemetryRecorder = useTelemetryRecorder() | ||
const dismissNotice = useCallback(() => { | ||
setDismissed(1) | ||
telemetryRecorder.recordEvent('cody.notice.cta', 'clicked') | ||
}, [telemetryRecorder, setDismissed]) | ||
|
||
return ( | ||
<div className="tw-w-full tw-relative tw-shadow-xl tw-bg-muted tw-border tw-border-input-border tw-p-8 tw-h-full tw-overflow-hidden tw-rounded-lg tw-flex tw-flex-col tw-justify-end tw-items-start tw-gap-4 tw-pb-0"> | ||
<div className="tw-flex tw-mb-2"> | ||
<SourcegraphLogo width={22} height={22} /> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. TODO: replace with new logo once available |
||
<Badge className="tw-ml-3 tw-text-sm tw-py-[3px]">Enterprise Starter</Badge> | ||
</div> | ||
<h1 className="tw-font-semibold tw-text-[14px] tw-my-6">Unlock the Sourcegraph platform</h1> | ||
<p className="tw-text-muted-foreground tw-mb-2 tw-text-[12px]"> | ||
Get search, AI chat, autocompletes and inline edits for your entire team to find, | ||
understand and fix code across all of your codebases. | ||
</p> | ||
<div id="welcome-notice-buttons" className="tw-flex tw-gap-4 tw-mb-4 tw-text-[12px]"> | ||
<Button variant="outline" className="tw-px-2"> | ||
<a | ||
href={WORKSPACES_URL} | ||
className="tw-text-foreground hover:tw-text-foreground" | ||
rel="noreferrer" | ||
target="_blank" | ||
> | ||
Create a workspace | ||
</a> | ||
</Button> | ||
<Button type="button" variant="ghost" className="tw-px-2"> | ||
<a href={DOCS_URL} className="" rel="noreferrer" target="_blank"> | ||
Learn more | ||
</a> | ||
</Button> | ||
</div> | ||
<img src={graphDarkCTA} alt="graph_dark" className="light:tw-hidden tw-w-full tw-m" /> | ||
<img src={graphLightCTA} alt="graph_light" className="dark:tw-hidden tw-w-full" /> | ||
<button | ||
type="button" | ||
className="tw-absolute tw-h-5 tw-w-5 tw-text-muted-foreground tw-top-6 tw-right-6" | ||
onClick={dismissNotice} | ||
> | ||
<XIcon size={16} /> | ||
</button> | ||
</div> | ||
) | ||
} |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should link to marketing content here, not a docs page - can you check with marketing if they have a link for a landing page yet?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated the placeholder. we can replace the URL in a follow up once the landing page is ready 😄