Skip to content

Rename editor preference section heading #7428

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion components/dashboard/src/settings/Preferences.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ export default function Preferences() {
return <div>
<PageWithSubMenu subMenu={settingsMenu} title='Preferences' subtitle='Configure user preferences.'>
{ideOptions && browserIdeOptions && <>
<h3>Default IDE</h3>
<h3>Editor</h3>
<p className="text-base text-gray-500 dark:text-gray-400">Choose which IDE you want to use.</p>
<div className="my-4 space-x-4 flex">
{
Expand Down
2 changes: 1 addition & 1 deletion components/dashboard/src/whatsnew/WhatsNew-2021-04.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { WhatsNewEntry } from "./WhatsNew";

export const switchToVSCodeAction = async (user: User) => {
const additionalData = user.additionalData = user.additionalData || {};
// make sure code is set as the default IDE
// make sure code is set as the editor preference
const ideSettings = additionalData.ideSettings = additionalData.ideSettings || {};
ideSettings.defaultIde = 'code';
user = await getGitpodService().server.updateLoggedInUser({
Expand Down
6 changes: 3 additions & 3 deletions components/server/src/ide-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -131,16 +131,16 @@ export class IDEConfigService {
}

if (!(newValue.ideOptions.defaultIde in newValue.ideOptions.options)) {
throw new Error(`invalid: There is no IDEOption entry for default IDE '${newValue.ideOptions.defaultIde}'.`);
throw new Error(`invalid: There is no IDEOption entry for editor '${newValue.ideOptions.defaultIde}'.`);
}
if (!(newValue.ideOptions.defaultDesktopIde in newValue.ideOptions.options)) {
throw new Error(`invalid: There is no IDEOption entry for default desktop IDE '${newValue.ideOptions.defaultDesktopIde}'.`);
}
if (newValue.ideOptions.options[newValue.ideOptions.defaultIde].type != "browser") {
throw new Error(`invalid: Default IDE '${newValue.ideOptions.defaultIde}' needs to be of type 'browser' but is '${newValue.ideOptions.options[newValue.ideOptions.defaultIde].type}'.`);
throw new Error(`invalid: Editor '${newValue.ideOptions.defaultIde}' needs to be of type 'browser' but is '${newValue.ideOptions.options[newValue.ideOptions.defaultIde].type}'.`);
}
if (newValue.ideOptions.options[newValue.ideOptions.defaultDesktopIde].type != "desktop") {
throw new Error(`invalid: Default desktop IDE '${newValue.ideOptions.defaultDesktopIde}' needs to be of type 'desktop' but is '${newValue.ideOptions.options[newValue.ideOptions.defaultIde].type}'.`);
throw new Error(`invalid: Editor (desktop), '${newValue.ideOptions.defaultDesktopIde}' needs to be of type 'desktop' but is '${newValue.ideOptions.options[newValue.ideOptions.defaultIde].type}'.`);
}

value = newValue;
Expand Down
2 changes: 1 addition & 1 deletion installer/pkg/components/server/ide/configmap.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ func configmap(ctx *common.RenderContext) ([]runtime.Object, error) {
}

if idecfg.IDEOptions.Options[idecfg.IDEOptions.DefaultIDE].Type != typeBrowser {
return nil, fmt.Errorf("default IDE '%s' does not point to a browser IDE option", idecfg.IDEOptions.DefaultIDE)
return nil, fmt.Errorf("editor '%s' does not point to a browser IDE option", idecfg.IDEOptions.DefaultIDE)
}

if idecfg.IDEOptions.Options[idecfg.IDEOptions.DefaultDesktopIDE].Type != typeDesktop {
Expand Down