Skip to content

Commit a5bb7e3

Browse files
committed
Introduce new version designs
1 parent 0b4662b commit a5bb7e3

File tree

17 files changed

+88
-30
lines changed

17 files changed

+88
-30
lines changed

components/dashboard/src/components/PillLabel.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,13 @@
44
* See License.AGPL.txt in the project root for license information.
55
*/
66

7-
export type PillType = "info" | "warn" | "success";
7+
export type PillType = "info" | "warn" | "success" | "neutral";
88

99
const PillClsMap: Record<PillType, string> = {
1010
info: "bg-blue-50 text-blue-500 dark:bg-blue-500 dark:text-blue-100",
1111
warn: "bg-orange-100 text-orange-700 dark:bg-orange-600 dark:text-orange-100",
1212
success: "bg-green-100 text-green-700 dark:bg-green-600 dark:text-green-100",
13+
neutral: "bg-gray-300 text-gray-800 dark:bg-gray-600 dark:text-gray-100",
1314
};
1415

1516
/**
@@ -19,6 +20,7 @@ const PillClsMap: Record<PillType, string> = {
1920
* info: Renders a blue pile label (default).\
2021
* warn: Renders an orange pile label.
2122
* success: Renders an green pile label.
23+
* subtle: Renders a grey pile label.
2224
*
2325
* **className**\
2426
* Add additional css classes to style this component.

components/dashboard/src/settings/SelectIDE.tsx

Lines changed: 27 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -176,42 +176,40 @@ function renderIdeOption(
176176
version: IDEOption["imageVersion"],
177177
onSelect: () => void,
178178
): JSX.Element {
179-
const label = option.type === "desktop" ? "" : option.type;
179+
const shouldShowOptionType = option.type !== "desktop" || option.title === "VS Code"; // Force show of "Desktop" in the list for VS Code Desktop
180180
const card = (
181181
<SelectableCardSolid className="w-36 h-44" title={option.title} selected={selected} onClick={onSelect}>
182-
<div className="flex justify-center mt-3">
183-
<img className="w-16 filter-grayscale self-center" src={option.logo} alt="logo" />
184-
</div>
185-
<div
186-
className="mt-2 px-3 py-1 self-center"
187-
style={{
188-
minHeight: "1.75rem",
189-
}}
190-
>
191-
{label ? (
192-
<span
193-
className={`font-semibold text-sm ${
194-
selected ? "text-gray-100 dark:text-gray-600" : "text-gray-600 dark:text-gray-500"
195-
} uppercase`}
196-
>
197-
{label}
198-
</span>
199-
) : (
200-
<></>
201-
)}
202-
</div>
203-
204182
{version ? (
205-
<div
206-
className={`font-semibold text-xs ${
207-
selected ? "text-gray-100 dark:text-gray-600" : "text-gray-600 dark:text-gray-500"
208-
} uppercase px-3 self-center`}
183+
<span
184+
className={`font-normal font-mono text-xs ${
185+
selected
186+
? "text-gray-100 dark:text-gray-600"
187+
: "text-gray-400 contrast-more:text-gray-600 dark:text-gray-500"
188+
} pl-1 self-start`}
209189
title="The IDE's current version on Gitpod"
210190
>
211191
{version}
212-
</div>
192+
</span>
193+
) : (
194+
<span
195+
style={{
196+
minHeight: "1rem",
197+
}}
198+
></span>
199+
)}
200+
<div className="flex justify-center mt-3 mb-2">
201+
<img className="w-16 filter-grayscale self-center" src={option.logo} alt="logo" />
202+
</div>
203+
{shouldShowOptionType ? (
204+
<PillLabel type="warn" className="place-self-start py-0.5 my-2 flex">
205+
<span className="text-xs capitalize">{option.type}</span>
206+
</PillLabel>
213207
) : (
214-
<></>
208+
option.label && (
209+
<PillLabel type="neutral" className="place-self-start py-0.5 my-2 flex">
210+
<span className="text-xs normal-case font-medium">{option.label}</span>
211+
</PillLabel>
212+
)
215213
)}
216214
</SelectableCardSolid>
217215
);

install/installer/cmd/testdata/render/aws-setup/output.golden

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

install/installer/cmd/testdata/render/azure-setup/output.golden

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

install/installer/cmd/testdata/render/customization/output.golden

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

install/installer/cmd/testdata/render/external-registry/output.golden

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

install/installer/cmd/testdata/render/gcp-setup/output.golden

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

install/installer/cmd/testdata/render/http-proxy/output.golden

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

install/installer/cmd/testdata/render/kind-ide/output.golden

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

install/installer/cmd/testdata/render/kind-meta/output.golden

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

0 commit comments

Comments
 (0)