diff --git a/components/dashboard/src/components/WorkspaceClass.tsx b/components/dashboard/src/components/WorkspaceClass.tsx
new file mode 100644
index 00000000000000..22ab5fadb38dda
--- /dev/null
+++ b/components/dashboard/src/components/WorkspaceClass.tsx
@@ -0,0 +1,66 @@
+/**
+ * Copyright (c) 2022 Gitpod GmbH. All rights reserved.
+ * Licensed under the GNU Affero General Public License (AGPL).
+ * See License-AGPL.txt in the project root for license information.
+ */
+
+export interface WorkspaceClassProps {
+ selected: boolean;
+ additionalStyles?: string;
+ onClick: () => void;
+ children?: React.ReactNode;
+ category: string;
+ friendlyName: string;
+ description?: string;
+ powerUps?: number;
+}
+
+function WorkspaceClass(props: WorkspaceClassProps) {
+ return (
+
+
+
+ {props.category}
+
+
+
+
+
+ {props.friendlyName}
+
+
+ {props.description}
+
+
+
+
+
+
+ );
+}
+
+export default WorkspaceClass;
diff --git a/components/dashboard/src/settings/Preferences.tsx b/components/dashboard/src/settings/Preferences.tsx
index 0a9b5d6cf2c33f..3faa71731f6f48 100644
--- a/components/dashboard/src/settings/Preferences.tsx
+++ b/components/dashboard/src/settings/Preferences.tsx
@@ -57,7 +57,7 @@ export default function Preferences() {
if (!user) {
return;
}
- const showWorkspaceClasses = await getExperimentsClient().getValueAsync("workspace_classes", false, {
+ const showWorkspaceClasses = await getExperimentsClient().getValueAsync("workspace_classes", true, {
user,
});
setIsShowWorkspaceClasses(showWorkspaceClasses);
@@ -73,6 +73,7 @@ export default function Preferences() {
Editor
Choose the editor for opening workspaces.
+
Theme
Early bird or night owl? Choose your side.
@@ -152,7 +153,6 @@ export default function Preferences() {
-
);
diff --git a/components/dashboard/src/settings/selectClass.tsx b/components/dashboard/src/settings/selectClass.tsx
index 7805f4b661b806..17ec3f0223aabc 100644
--- a/components/dashboard/src/settings/selectClass.tsx
+++ b/components/dashboard/src/settings/selectClass.tsx
@@ -5,11 +5,11 @@
*/
import { useContext, useState } from "react";
-import SelectableCardSolid from "../components/SelectableCardSolid";
import { getGitpodService } from "../service/service";
import { UserContext } from "../user-context";
import { trackEvent } from "../Analytics";
import { WorkspaceClasses } from "@gitpod/gitpod-protocol";
+import WorkspaceClass from "../components/WorkspaceClass";
interface SelectWorkspaceClassProps {
enabled: boolean;
@@ -19,11 +19,11 @@ export default function SelectWorkspaceClass(props: SelectWorkspaceClassProps) {
const { user } = useContext(UserContext);
const [workspaceClass, setWorkspaceClass] = useState(
- user?.additionalData?.workspaceClasses?.regular || "standard",
+ user?.additionalData?.workspaceClasses?.regular || "g1-standard",
);
const actuallySetWorkspaceClass = async (value: string) => {
const additionalData = user?.additionalData || {};
- const prevWorkspaceClass = additionalData?.workspaceClasses?.regular || "standard";
+ const prevWorkspaceClass = additionalData?.workspaceClasses?.regular || "g1-standard";
const workspaceClasses = (additionalData?.workspaceClasses || {}) as WorkspaceClasses;
workspaceClasses.regular = value;
workspaceClasses.prebuild = value;
@@ -48,41 +48,24 @@ export default function SelectWorkspaceClass(props: SelectWorkspaceClassProps) {
Choose the workspace machine type for your workspaces.
-
actuallySetWorkspaceClass("standard")}
- >
-
-
-
actuallySetWorkspaceClass("XL")}
- >
-
-
+
actuallySetWorkspaceClass("g1-standard")}
+ category="GENERAL PURPOSE"
+ friendlyName="Standard"
+ description="Up to 4 vCPU, 8GB memory, 30GB disk"
+ powerUps={1}
+ />
+ actuallySetWorkspaceClass("g1-large")}
+ category="GENERAL PURPOSE"
+ friendlyName="Large"
+ description="Up to 8 vCPU, 16GB memory, 50GB disk"
+ powerUps={2}
+ />
);