Skip to content

Commit 83e56d5

Browse files
Add the Browser Terminal as an IDE (#17196)
* Add xterm as an IDE * Move the IDE to our GCP registry 🎉 * Also resolve the source code commit for IDEs in `ide-service` * Add feature flag * Xterm => terminal * Revert "Also resolve the source code commit for IDEs in `ide-service`" This reverts commit 06aee00. * always add `<iframe>` to the top of `<body>` * Add the next non-jb IDE :) * Add latest image * Filter out IDEs on the backend (#17324) * Address review comments Never mutate `s.ideConfig` itself and make an in-memory copy of it to not use it every time. * Pre-compute outside * Stringify config instead of options
1 parent 09bb1b2 commit 83e56d5

File tree

14 files changed

+207
-118
lines changed

14 files changed

+207
-118
lines changed

components/dashboard/src/components/SelectIDEComponent.tsx

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,10 @@
55
*/
66

77
import { IDEOption, IDEOptions } from "@gitpod/gitpod-protocol/lib/ide-protocol";
8-
import { useCallback, useContext, useEffect, useState } from "react";
8+
import { useCallback, useEffect, useState } from "react";
99
import { getGitpodService } from "../service/service";
1010
import { DropDown2, DropDown2Element } from "./DropDown2";
1111
import Editor from "../icons/Editor.svg";
12-
import { FeatureFlagContext } from "../contexts/FeatureFlagContext";
1312

1413
interface SelectIDEComponentProps {
1514
selectedIdeOption?: string;
@@ -18,15 +17,12 @@ interface SelectIDEComponentProps {
1817
setError?: (error?: string) => void;
1918
}
2019

21-
function filteredIdeOptions(ideOptions: IDEOptions, experimentalTurnedOn: boolean) {
22-
return IDEOptions.asArray(ideOptions)
23-
.filter((x) => !x.hidden)
24-
.filter((x) => (x.experimental ? experimentalTurnedOn : true));
20+
function filteredIdeOptions(ideOptions: IDEOptions) {
21+
return IDEOptions.asArray(ideOptions).filter((x) => !x.hidden);
2522
}
2623

2724
export default function SelectIDEComponent(props: SelectIDEComponentProps) {
2825
const [ideOptions, setIdeOptions] = useState<IDEOptions>();
29-
const { experimentalIdes } = useContext(FeatureFlagContext);
3026

3127
useEffect(() => {
3228
getGitpodService().server.getIDEOptions().then(setIdeOptions);
@@ -36,7 +32,7 @@ export default function SelectIDEComponent(props: SelectIDEComponentProps) {
3632
if (!ideOptions) {
3733
return [];
3834
}
39-
const options = filteredIdeOptions(ideOptions, experimentalIdes);
35+
const options = filteredIdeOptions(ideOptions);
4036
const result: DropDown2Element[] = [];
4137
for (const ide of options.filter((ide) =>
4238
`${ide.label}${ide.title}${ide.notes}${ide.id}`.toLowerCase().includes(search.toLowerCase()),
@@ -57,7 +53,7 @@ export default function SelectIDEComponent(props: SelectIDEComponentProps) {
5753
}
5854
return result;
5955
},
60-
[experimentalIdes, ideOptions, props.useLatest],
56+
[ideOptions, props.useLatest],
6157
);
6258
const internalOnSelectionChange = (id: string) => {
6359
const { ide, useLatest } = parseId(id);

components/dashboard/src/contexts/FeatureFlagContext.tsx

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ const defaultFeatureFlags = {
2929
userGitAuthProviders: false,
3030
newSignupFlow: false,
3131
linkedinConnectionForOnboarding: false,
32-
experimentalIdes: false,
3332
};
3433

3534
const FeatureFlagContext = createContext<FeatureFlagsType>(defaultFeatureFlags);
@@ -48,7 +47,6 @@ const FeatureFlagContextProvider: React.FC = ({ children }) => {
4847
const [userGitAuthProviders, setUserGitAuthProviders] = useState<boolean>(false);
4948
const [newSignupFlow, setNewSignupFlow] = useState<boolean>(false);
5049
const [linkedinConnectionForOnboarding, setLinkedinConnectionForOnboarding] = useState<boolean>(false);
51-
const [experimentalIdes, setExperimentalIdes] = useState<boolean>(false);
5250

5351
useEffect(() => {
5452
if (!user) return;
@@ -67,7 +65,6 @@ const FeatureFlagContextProvider: React.FC = ({ children }) => {
6765
userGitAuthProviders: { defaultValue: false, setter: setUserGitAuthProviders },
6866
newSignupFlow: { defaultValue: false, setter: setNewSignupFlow },
6967
linkedinConnectionForOnboarding: { defaultValue: false, setter: setLinkedinConnectionForOnboarding },
70-
experimentalIdes: { defaultValue: false, setter: setExperimentalIdes },
7168
};
7269

7370
for (const [flagName, config] of Object.entries(featureFlags)) {
@@ -115,7 +112,6 @@ const FeatureFlagContextProvider: React.FC = ({ children }) => {
115112
userGitAuthProviders,
116113
newSignupFlow,
117114
linkedinConnectionForOnboarding,
118-
experimentalIdes,
119115
};
120116
}, [
121117
enablePersonalAccessTokens,
@@ -127,7 +123,6 @@ const FeatureFlagContextProvider: React.FC = ({ children }) => {
127123
startWithOptions,
128124
usePublicApiWorkspacesService,
129125
userGitAuthProviders,
130-
experimentalIdes,
131126
]);
132127

133128
return <FeatureFlagContext.Provider value={flags}>{children}</FeatureFlagContext.Provider>;

components/dashboard/src/user-settings/SelectIDE.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ export default function SelectIDE(props: SelectIDEProps) {
7171
);
7272

7373
//todo(ft): find a better way to group IDEs by vendor
74-
const shouldShowJetbrainsNotice = !["code", "code-desktop"].includes(defaultIde); // a really hacky way to get just JetBrains IDEs
74+
const shouldShowJetbrainsNotice = !["code", "code-desktop", "xterm"].includes(defaultIde); // a really hacky way to get just JetBrains IDEs
7575

7676
return (
7777
<>
Lines changed: 4 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)