Skip to content

Commit e142906

Browse files
feat: add announcement support CTA and social icons (#9945)
1 parent 8a98f14 commit e142906

File tree

21 files changed

+93
-84
lines changed

21 files changed

+93
-84
lines changed

pnpm-lock.yaml

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

webview-ui/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@
5858
"react": "^18.3.1",
5959
"react-dom": "^18.3.1",
6060
"react-i18next": "^15.4.1",
61+
"react-icons": "^5.5.0",
6162
"react-markdown": "^9.0.3",
6263
"react-remark": "^2.1.0",
6364
"react-textarea-autosize": "^8.5.3",

webview-ui/src/components/chat/Announcement.tsx

Lines changed: 35 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
import { useState, memo } from "react"
1+
import { memo, type ReactNode, useState } from "react"
22
import { Trans } from "react-i18next"
3+
import { SiDiscord, SiReddit, SiX } from "react-icons/si"
34
import { VSCodeLink } from "@vscode/webview-ui-toolkit/react"
45

56
import { Package } from "@roo/package"
@@ -48,15 +49,28 @@ const Announcement = ({ hideAnnouncement }: AnnouncementProps) => {
4849
</ul>
4950
</div>
5051

51-
<div className="mt-4 text-sm text-center">
52-
<Trans
53-
i18nKey="chat:announcement.socialLinks"
54-
components={{
55-
xLink: <XLink />,
56-
discordLink: <DiscordLink />,
57-
redditLink: <RedditLink />,
58-
}}
59-
/>
52+
<div className="mt-4 text-sm text-center text-vscode-descriptionForeground">
53+
<div className="flex items-center justify-center gap-4">
54+
<SocialLink
55+
icon={<SiX className="w-4 h-4" aria-hidden />}
56+
label="X"
57+
href="https://x.com/roocode"
58+
/>
59+
<SocialLink
60+
icon={<SiDiscord className="w-4 h-4" aria-hidden />}
61+
label="Discord"
62+
href="https://discord.gg/rCQcvT7Fnt"
63+
/>
64+
<SocialLink
65+
icon={<SiReddit className="w-4 h-4" aria-hidden />}
66+
label="Reddit"
67+
href="https://www.reddit.com/r/RooCode/"
68+
/>
69+
</div>
70+
</div>
71+
72+
<div className="mt-3 text-sm text-center text-vscode-descriptionForeground">
73+
<Trans i18nKey="chat:announcement.support" components={{ githubLink: <GitHubLink /> }} />
6074
</div>
6175

6276
{/* Careers Section */}
@@ -74,40 +88,31 @@ const Announcement = ({ hideAnnouncement }: AnnouncementProps) => {
7488
)
7589
}
7690

77-
const XLink = () => (
78-
<VSCodeLink
79-
href="https://x.com/roocode"
80-
onClick={(e) => {
81-
e.preventDefault()
82-
vscode.postMessage({ type: "openExternal", url: "https://x.com/roocode" })
83-
}}>
84-
X
85-
</VSCodeLink>
86-
)
87-
88-
const DiscordLink = () => (
91+
const SocialLink = ({ icon, label, href }: { icon: ReactNode; label: string; href: string }) => (
8992
<VSCodeLink
90-
href="https://discord.gg/rCQcvT7Fnt"
93+
href={href}
94+
className="inline-flex items-center gap-1"
9195
onClick={(e) => {
9296
e.preventDefault()
93-
vscode.postMessage({ type: "openExternal", url: "https://discord.gg/rCQcvT7Fnt" })
97+
vscode.postMessage({ type: "openExternal", url: href })
9498
}}>
95-
Discord
99+
{icon}
100+
<span className="sr-only">{label}</span>
96101
</VSCodeLink>
97102
)
98103

99-
const RedditLink = () => (
104+
const GitHubLink = ({ children }: { children?: ReactNode }) => (
100105
<VSCodeLink
101-
href="https://www.reddit.com/r/RooCode/"
106+
href="https://github.com/RooCodeInc/Roo-Code"
102107
onClick={(e) => {
103108
e.preventDefault()
104-
vscode.postMessage({ type: "openExternal", url: "https://www.reddit.com/r/RooCode/" })
109+
vscode.postMessage({ type: "openExternal", url: "https://github.com/RooCodeInc/Roo-Code" })
105110
}}>
106-
r/RooCode
111+
{children}
107112
</VSCodeLink>
108113
)
109114

110-
const CareersLink = ({ children }: { children?: React.ReactNode }) => (
115+
const CareersLink = ({ children }: { children?: ReactNode }) => (
111116
<VSCodeLink
112117
href="https://careers.roocode.com"
113118
onClick={(e) => {

webview-ui/src/i18n/locales/ca/chat.json

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

webview-ui/src/i18n/locales/de/chat.json

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

webview-ui/src/i18n/locales/en/chat.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,8 @@
310310
"triggerLabelAll": "YOLO"
311311
},
312312
"announcement": {
313-
"title": "🎉 Roo Code {{version}} Released",
313+
"title": "Roo Code {{version}} Released",
314+
"support": "Please support Roo Code by starring us on <githubLink>GitHub</githubLink>.",
314315
"stealthModel": {
315316
"feature": "<bold>Limited-time FREE stealth model</bold> - Code Supernova: Now upgraded with a <bold>1M token context window</bold>! A versatile agentic coding model that supports image inputs, accessible through Roo Code Cloud.",
316317
"note": "(Note: prompts and completions are logged by the model creator and used to improve the model)",
@@ -329,8 +330,7 @@
329330
"description": "The agents work together in the cloud and can be triggered from the web or through Slack.",
330331
"tryButton": "Try Cloud Agents"
331332
},
332-
"careers": "Also, <careersLink>we're hiring!</careersLink>",
333-
"socialLinks": "Join us on <xLink>X</xLink>, <discordLink>Discord</discordLink>, or <redditLink>r/RooCode</redditLink> 🚀"
333+
"careers": "Also, <careersLink>we're hiring!</careersLink>"
334334
},
335335
"reasoning": {
336336
"thinking": "Thinking",

webview-ui/src/i18n/locales/es/chat.json

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

webview-ui/src/i18n/locales/fr/chat.json

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

webview-ui/src/i18n/locales/hi/chat.json

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

webview-ui/src/i18n/locales/id/chat.json

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)