Skip to content

Commit 7319465

Browse files
[dashboard] Add BETA label to JetBrains IDEs
1 parent 17b6bb6 commit 7319465

File tree

2 files changed

+21
-9
lines changed

2 files changed

+21
-9
lines changed

components/dashboard/src/components/PillLabel.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,13 @@
1010
* **type**\
1111
* info: Renders a blue pile label (default).\
1212
* warn: Renders an orange pile label.
13+
*
14+
* **className**\
15+
* Add additional css classes to style this component.
1316
*/
14-
export default function PillLabel(props: { children?: React.ReactNode, type?: "info" | "warn" }) {
17+
export default function PillLabel(props: { children?: React.ReactNode, type?: "info" | "warn", className?: string }) {
1518
const infoStyle = "bg-blue-50 text-blue-500 dark:bg-blue-500 dark:text-blue-100";
1619
const warnStyle = "bg-orange-100 text-orange-700 dark:bg-orange-600 dark:text-orange-100";
17-
const style = `ml-2 px-3 py-1 text-sm uppercase rounded-xl ${props.type === "warn" ? warnStyle : infoStyle}`;
20+
const style = `ml-2 px-3 py-1 text-sm uppercase rounded-xl ${props.type === "warn" ? warnStyle : infoStyle} ${props.className}`;
1821
return <span className={style}>{props.children}</span>;
1922
}

components/dashboard/src/settings/Preferences.tsx

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,17 @@
55
*/
66

77
import { useContext, useState } from "react";
8+
import AlertBox from "../components/AlertBox";
89
import CheckBox from "../components/CheckBox";
10+
import CodeText from "../components/CodeText";
11+
import InfoBox from "../components/InfoBox";
912
import { PageWithSubMenu } from "../components/PageWithSubMenu";
13+
import PillLabel from "../components/PillLabel";
1014
import SelectableCard from "../components/SelectableCard";
1115
import Tooltip from "../components/Tooltip";
12-
import vscode from '../images/vscode.svg';
13-
import ideaLogo from '../images/intellijIdeaLogo.svg';
1416
import golandLogo from '../images/golandLogo.svg';
17+
import ideaLogo from '../images/intellijIdeaLogo.svg';
18+
import vscode from '../images/vscode.svg';
1519
import { getGitpodService } from "../service/service";
1620
import { ThemeContext } from "../theme-context";
1721
import { UserContext } from "../user-context";
@@ -82,7 +86,7 @@ export default function Preferences() {
8286
<div className="flex justify-center mt-3">
8387
<img className="w-16 filter-grayscale self-center" src={vscode} />
8488
</div>
85-
<span className="mt-2 ml-2 self-center rounded-xl py-0.5 px-2 text-sm bg-orange-100 text-orange-700 dark:bg-orange-600 dark:text-orange-100 font-semibold">INSIDERS</span>
89+
<PillLabel type="warn" className="font-semibold mt-2 py-0.5 px-2 self-center">Insiders</PillLabel>
8690
</SelectableCard>
8791
</Tooltip>
8892
</div>
@@ -93,20 +97,25 @@ export default function Preferences() {
9397
checked={useDesktopIde}
9498
onChange={(evt) => actuallySetUseDesktopIde(evt.target.checked)} />
9599
</div>
96-
{useDesktopIde &&
100+
{useDesktopIde && <>
101+
{/* TODO: Use proper issue link! */}
102+
<AlertBox className="my-3">The <strong>JetBrains desktop IDEs</strong> are currently in beta. <a href="https://github.com/gitpod-io/gitpod/issues/link-to-github-issue" className="gp-link" target="_blank">Send feedback</a> and <a href="https://www.gitpod.io/docs/integrations/jetbrains" className="gp-link" target="_blank">refer to our documentation</a> for more information.</AlertBox>
103+
<InfoBox className="my-3">When you start the <strong>JetBrains desktop IDE</strong> to access your workspace, you will be currently asked for a password. The password is always <CodeText>gitpod</CodeText>. <i>This is subject to change.</i></InfoBox>
97104
<div className="mt-4 space-x-4 flex">
98105
<SelectableCard className="w-36 h-40" title="IntelliJ IDEA" selected={defaultDesktopIde === 'intellij'} onClick={() => actuallySetDefaultDesktopIde('intellij')}>
99106
<div className="flex justify-center mt-3">
100-
<img className="w-16 filter-grayscale self-center" src={ideaLogo} />
107+
<img className="w-16 filter-grayscale self-center" src={ideaLogo} />
101108
</div>
109+
<PillLabel type="warn" className="font-semibold mt-2 py-0.5 px-2 self-center">Beta</PillLabel>
102110
</SelectableCard>
103111
<SelectableCard className="w-36 h-40" title="GoLand" selected={defaultDesktopIde === 'goland'} onClick={() => actuallySetDefaultDesktopIde('goland')}>
104112
<div className="flex justify-center mt-3">
105-
<img className="w-16 filter-grayscale self-center" src={golandLogo} />
113+
<img className="w-16 filter-grayscale self-center" src={golandLogo} />
106114
</div>
115+
<PillLabel type="warn" className="font-semibold mt-2 py-0.5 px-2 self-center">Beta</PillLabel>
107116
</SelectableCard>
108117
</div>
109-
}
118+
</>}
110119
<h3 className="mt-12">Theme</h3>
111120
<p className="text-base text-gray-500">Early bird or night owl? Choose your side.</p>
112121
<div className="mt-4 space-x-4 flex">

0 commit comments

Comments
 (0)