(undefined);
- useEffect(() => {
- (async () => {
- setIdeOptions(await getGitpodService().server.getIDEOptions());
- })();
- }, []);
-
- const allIdeOptions = ideOptions && orderedIdeOptions(ideOptions);
+ //todo(ft): find a better way to group IDEs by vendor
+ const shouldShowJetbrainsNotice = !["code", "code-desktop"].includes(defaultIde); // a really hacky way to get just JetBrains IDEs
return (
<>
- {ideOptions && (
- <>
- {allIdeOptions && (
- <>
-
- {allIdeOptions.map(([id, option]) => {
- const selected = defaultIde === id;
- const version = useLatestVersion ? option.latestImageVersion : option.imageVersion;
- const onSelect = () => actuallySetDefaultIde(id);
- return renderIdeOption(option, selected, version, onSelect);
- })}
-
- {ideOptions.options[defaultIde]?.notes && (
-
-
- {ideOptions.options[defaultIde].notes?.map((x, idx) => (
- - 0 ? "mt-2" : ""}>{x}
- ))}
-
-
- )}
-
-
- JetBrains integration is currently in{" "}
-
-
- Beta
-
-
- ·
-
- Send feedback
-
-
- >
- )}
-
- Use the latest version for each editor.{" "}
-
- Insiders
- {" "}
- for VS Code,{" "}
-
- EAP
- {" "}
- for JetBrains IDEs.
-
- }
- checked={useLatestVersion}
- onChange={(e) => actuallySetUseLatestVersion(e.target.checked)}
- />
- >
- )}
- >
- );
-}
-
-function orderedIdeOptions(ideOptions: IDEOptions) {
- // TODO: Maybe convert orderKey to number before sort?
- return Object.entries(ideOptions.options)
- .filter(([_, x]) => !x.hidden)
- .sort((a, b) => {
- const keyA = a[1].orderKey || a[0];
- const keyB = b[1].orderKey || b[0];
- return keyA.localeCompare(keyB);
- });
-}
-
-function renderIdeOption(
- option: IDEOption,
- selected: boolean,
- version: IDEOption["imageVersion"],
- onSelect: () => void,
-): JSX.Element {
- const shouldShowOptionType = option.type !== "desktop" || option.title === "VS Code"; // Force show of "Desktop" in the list for VS Code Desktop
- const card = (
-
- {version ? (
-
- {version}
-
- ) : (
-
+ {
+ await actuallySetDefaultIde(ide);
}}
- >
- )}
-
-

+ selectedIdeOption={defaultIde}
+ useLatest={useLatestVersion}
+ />
- {shouldShowOptionType ? (
-
- {option.type}
-
- ) : (
- option.label && (
-
- {option.label}
+
+ {shouldShowJetbrainsNotice && (
+
+ JetBrains integration is currently in{" "}
+
+
+ Beta
+
- )
+ ·
+
+ Send feedback
+
+
)}
-
- );
- if (option.tooltip) {
- return {card};
- }
- return card;
+
+ Use the latest version for each editor.{" "}
+
+ Insiders
+ {" "}
+ for VS Code,{" "}
+
+ EAP
+ {" "}
+ for JetBrains IDEs.
+
+ }
+ checked={useLatestVersion}
+ onChange={(e) => actuallySetUseLatestVersion(e.target.checked)}
+ />
+ >
+ );
}
diff --git a/components/dashboard/src/user-settings/SelectIDEModal.tsx b/components/dashboard/src/user-settings/SelectIDEModal.tsx
deleted file mode 100644
index 340d4837b01158..00000000000000
--- a/components/dashboard/src/user-settings/SelectIDEModal.tsx
+++ /dev/null
@@ -1,60 +0,0 @@
-/**
- * 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.
- */
-
-import { useState, useContext } from "react";
-import { Link } from "react-router-dom";
-import { User } from "@gitpod/gitpod-protocol";
-import SelectIDE, { IDEChangedTrackLocation, updateUserIDEInfo } from "./SelectIDE";
-import Modal from "../components/Modal";
-import { UserContext } from "../user-context";
-
-export interface SelectIDEModalProps {
- location: IDEChangedTrackLocation;
- onClose?: () => void;
-}
-
-export default function SelectIDEModal(props: SelectIDEModalProps) {
- const { user, setUser } = useContext(UserContext);
- const [visible, setVisible] = useState(true);
-
- const actualUpdateUserIDEInfo = async (user: User, selectedIde: string, useLatestVersion: boolean) => {
- const newUserData = await updateUserIDEInfo(user, selectedIde, useLatestVersion, props.location);
- setUser({ ...newUserData });
- };
-
- const handleContinue = async () => {
- setVisible(false);
- if (!user || User.hasPreferredIde(user)) {
- props.onClose && props.onClose();
- return;
- }
- // TODO: We need to get defaultIde in ideOptions..
- const defaultIde = "code";
- await actualUpdateUserIDEInfo(user, defaultIde, false);
- props.onClose && props.onClose();
- };
-
- return (
- Continue}
- >
-
- Choose the editor for opening workspaces. You can always change later the editor in{" "}
-
- user preferences
-
- .
-
-
-
- );
-}
diff --git a/components/dashboard/src/workspaces/Workspaces.tsx b/components/dashboard/src/workspaces/Workspaces.tsx
index 83d46aaa19f418..2ed05825b030c9 100644
--- a/components/dashboard/src/workspaces/Workspaces.tsx
+++ b/components/dashboard/src/workspaces/Workspaces.tsx
@@ -8,29 +8,22 @@ import { FunctionComponent, useCallback, useMemo, useState } from "react";
import Header from "../components/Header";
import { WorkspaceEntry } from "./WorkspaceEntry";
import { ItemsList } from "../components/ItemsList";
-import { useCurrentUser } from "../user-context";
-import { User, WorkspaceInfo } from "@gitpod/gitpod-protocol";
-import SelectIDEModal from "../user-settings/SelectIDEModal";
+import { WorkspaceInfo } from "@gitpod/gitpod-protocol";
import Arrow from "../components/Arrow";
import ConfirmationModal from "../components/ConfirmationModal";
-import { ProfileState } from "../user-settings/ProfileInformation";
import { useListWorkspacesQuery } from "../data/workspaces/list-workspaces-query";
import { EmptyWorkspacesContent } from "./EmptyWorkspacesContent";
import { WorkspacesSearchBar } from "./WorkspacesSearchBar";
import { hoursBefore, isDateSmallerOrEqual } from "@gitpod/gitpod-protocol/lib/util/timeutil";
import { useDeleteInactiveWorkspacesMutation } from "../data/workspaces/delete-inactive-workspaces-mutation";
-import { useFeatureFlags } from "../contexts/FeatureFlagContext";
const WorkspacesPage: FunctionComponent = () => {
- const user = useCurrentUser();
const [limit, setLimit] = useState(50);
const [searchTerm, setSearchTerm] = useState("");
const [showInactive, setShowInactive] = useState(false);
const [deleteModalVisible, setDeleteModalVisible] = useState(false);
const { data, isLoading } = useListWorkspacesQuery({ limit });
- const isOnboardingUser = useMemo(() => user && User.isOnboardingUser(user), [user]);
const deleteInactiveWorkspaces = useDeleteInactiveWorkspacesMutation();
- const { newSignupFlow } = useFeatureFlags();
// Sort workspaces into active/inactive groups
const { activeWorkspaces, inactiveWorkspaces } = useMemo(() => {
@@ -96,12 +89,6 @@ const WorkspacesPage: FunctionComponent = () => {
/>
)}
- {/* TODO: can remove this once newSignupFlow flag is enabled */}
- {isOnboardingUser && !newSignupFlow && }
-
- {/* TODO: can remove this once newSignupFlow flag is enabled */}
- {!isOnboardingUser && !newSignupFlow && }
-
{!isLoading &&
(activeWorkspaces.length > 0 || inactiveWorkspaces.length > 0 || searchTerm ? (
<>
diff --git a/components/dashboard/tailwind.config.js b/components/dashboard/tailwind.config.js
index ec804e8b546e98..169575b206e67e 100644
--- a/components/dashboard/tailwind.config.js
+++ b/components/dashboard/tailwind.config.js
@@ -46,10 +46,6 @@ module.exports = {
112: "28rem",
128: "32rem",
},
- maxWidth: {
- // TODO(andreafalzetti): remove custom ide-modal class once we implement https://github.com/gitpod-io/gitpod/issues/13116
- 51.5: "51.5rem",
- },
lineHeight: {
64: "64px",
},