From 294af41c02ebdd429350451d348eb0890bab6137 Mon Sep 17 00:00:00 2001 From: "Laurie T. Malau" Date: Thu, 2 Sep 2021 10:16:24 +0000 Subject: [PATCH] Remove Theia settings and point to Code image Fixes #4486 --- chart/templates/server-configmap.yaml | 4 +-- chart/templates/server-deployment.yaml | 4 +-- .../dashboard/src/settings/Preferences.tsx | 28 +++++-------------- 3 files changed, 11 insertions(+), 25 deletions(-) diff --git a/chart/templates/server-configmap.yaml b/chart/templates/server-configmap.yaml index f414774b8771b5..34388321800bea 100644 --- a/chart/templates/server-configmap.yaml +++ b/chart/templates/server-configmap.yaml @@ -33,8 +33,8 @@ data: "license": "{{ .Values.license }}", "workspaceHeartbeat": {{ $comp.workspaceHeartbeat | toJson }}, "workspaceDefaults": { - "ideVersion": "{{ template "gitpod.comp.version" (dict "root" . "gp" $.Values "comp" .Values.components.workspace.theiaImage) }}", - "ideImageRepo": "{{ template "gitpod.comp.imageRepo" (dict "root" . "gp" $.Values "comp" .Values.components.workspace.theiaImage) }}", + "ideVersion": "{{ .Values.components.workspace.codeImage.stableVersion }}", + "ideImageRepo": "{{ template "gitpod.comp.imageRepo" (dict "root" . "gp" $.Values "comp" .Values.components.workspace.codeImage) }}", "ideImageAliases": {{ (dict "code-latest" (include "gitpod.comp.imageFull" (dict "root" . "gp" $.Values "comp" .Values.components.workspace.codeImage)) "code" (include "stable-image-full" (dict "root" . "gp" $.Values "comp" .Values.components.workspace.codeImage))) | toJson }}, "workspaceImage": "{{ template "gitpod.comp.imageFull" (dict "root" . "gp" $.Values "comp" .Values.components.workspace.defaultImage) }}", "previewFeatureFlags": {{ $comp.previewFeatureFlags | toJson }}, diff --git a/chart/templates/server-deployment.yaml b/chart/templates/server-deployment.yaml index 76b355696f5b87..763af1f5f5e849 100644 --- a/chart/templates/server-deployment.yaml +++ b/chart/templates/server-deployment.yaml @@ -161,9 +161,9 @@ spec: - name: THEIA_PORT value: "{{ .Values.components.workspace.ports.http.containerPort | toString }}" - name: THEIA_IMAGE_REPO - value: "{{ template "gitpod.comp.imageRepo" (dict "root" . "gp" $.Values "comp" .Values.components.workspace.theiaImage) }}" + value: "{{ template "gitpod.comp.imageRepo" (dict "root" . "gp" $.Values "comp" .Values.components.workspace.codeImage) }}" - name: THEIA_VERSION - value: "{{ template "gitpod.comp.version" (dict "root" . "gp" $.Values "comp" .Values.components.workspace.theiaImage) }}" + value: "{{ .Values.components.workspace.codeImage.stableVersion }}" - name: CODE_IMAGE_REPO value: "{{ template "gitpod.comp.imageRepo" (dict "root" . "gp" $.Values "comp" .Values.components.workspace.codeImage) }}" - name: EXPERIMENTAL_FEATURE_FLAGS diff --git a/components/dashboard/src/settings/Preferences.tsx b/components/dashboard/src/settings/Preferences.tsx index 065d6418c62ff7..47eda5babf90dd 100644 --- a/components/dashboard/src/settings/Preferences.tsx +++ b/components/dashboard/src/settings/Preferences.tsx @@ -5,31 +5,25 @@ */ import { useContext, useState } from "react"; -import { getGitpodService } from "../service/service"; +import { PageWithSubMenu } from "../components/PageWithSubMenu"; import SelectableCard from "../components/SelectableCard"; -import { UserContext } from "../user-context"; -import { ThemeContext } from "../theme-context"; -import theia from '../images/theia-gray.svg'; +import Tooltip from "../components/Tooltip"; import vscode from '../images/vscode.svg'; -import { PageWithSubMenu } from "../components/PageWithSubMenu"; +import { getGitpodService } from "../service/service"; +import { ThemeContext } from "../theme-context"; +import { UserContext } from "../user-context"; import settingsMenu from "./settings-menu"; -import AlertBox from "../components/AlertBox"; -import Tooltip from "../components/Tooltip"; type Theme = 'light' | 'dark' | 'system'; export default function Preferences() { const { user } = useContext(UserContext); const { setIsDark } = useContext(ThemeContext); - const [defaultIde, setDefaultIde] = useState(user?.additionalData?.ideSettings?.defaultIde || 'theia'); + const [defaultIde, setDefaultIde] = useState(user?.additionalData?.ideSettings?.defaultIde || 'code'); const actuallySetDefaultIde = async (value: string) => { const additionalData = user?.additionalData || {}; const settings = additionalData.ideSettings || {}; - if (value === 'theia') { - delete settings.defaultIde; - } else { - settings.defaultIde = value; - } + settings.defaultIde = value; additionalData.ideSettings = settings; await getGitpodService().server.updateLoggedInUser({ additionalData }); setDefaultIde(value); @@ -50,9 +44,6 @@ export default function Preferences() {

Default IDE

Choose which IDE you want to use.

- - We're deprecating the Theia editor. You can still switch back to Theia for the next few weeks but the preference will be removed by the end of August 2021. -
actuallySetDefaultIde('code')}>
@@ -67,11 +58,6 @@ export default function Preferences() { LATEST - actuallySetDefaultIde('theia')}> -
- -
-

Theme

Early bird or night owl? Choose your side.