Skip to content

Commit 704c467

Browse files
jankeromnesgtsiolisgeropl
authored andcommitted
Address review feedback
Co-authored-by: George Tsiolis <[email protected]> Co-authored-by: Gero Posmyk-Leinemann <[email protected]>
1 parent 7305418 commit 704c467

File tree

6 files changed

+20
-12
lines changed

6 files changed

+20
-12
lines changed

components/dashboard/src/Menu.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ export default function Menu() {
219219
]}>
220220
<div className="flex h-full px-2 py-1 space-x-3.5">
221221
{ !projectSlug && <span className="text-base text-gray-600 dark:text-gray-400 font-semibold">{team?.name || userFullName}</span>}
222-
<img className="filter-grayscale" style={{marginTop: 5, marginBottom: 5}} src={CaretUpDown} />
222+
<img alt="" aria-label="Toggle team selection menu" className="filter-grayscale" style={{marginTop: 5, marginBottom: 5}} src={CaretUpDown} />
223223
</div>
224224
</ContextMenu>
225225
</div>
@@ -232,7 +232,7 @@ export default function Menu() {
232232
)}
233233
{ prebuildId && (
234234
<div className="flex h-full ml-2 py-1">
235-
<img className="mr-3 filter-grayscale m-auto transform -rotate-90" src={CaretDown} />
235+
<img alt="" className="mr-3 filter-grayscale m-auto transform -rotate-90" src={CaretDown} />
236236
<span className="text-base text-gray-600 dark:text-gray-400 font-semibold">{prebuildId}</span>
237237
</div>
238238
)}

components/dashboard/src/components/CheckBox.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ function CheckBox(props: {
2424

2525
const checkboxId = `checkbox-${props.title}-${String(Math.random())}`;
2626

27-
return <div className="flex mt-4">
27+
return <div className="flex mt-4 max-w-2xl">
2828
<input className={"h-4 w-4 focus:ring-0 mt-1 rounded cursor-pointer bg-transparent border-2 dark:filter-invert border-gray-800 dark:border-gray-900 focus:border-gray-900 dark:focus:border-gray-800 " + (props.checked ? 'bg-gray-800 dark:bg-gray-900' : '')} type="checkbox"
2929
id={checkboxId}
3030
{...inputProps}

components/dashboard/src/projects/Prebuild.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ import { getGitpodService, gitpodHostUrl } from "../service/service";
1515
import { TeamsContext, getCurrentTeam } from "../teams/teams-context";
1616
import { PrebuildInstanceStatus } from "./Prebuilds";
1717
import { shortCommitMessage } from "./render-utils";
18-
import { Link } from "react-router-dom";
1918

2019
export default function () {
2120
const history = useHistory();
@@ -81,7 +80,7 @@ export default function () {
8180
{!!prebuild.info.basedOnPrebuildId && <>
8281
<p className="mx-2 my-auto">·</p>
8382
<div className="my-auto">
84-
<p className="text-gray-500 dark:text-gray-50">Incremental Prebuild (<Link className="gp-link" title={prebuild.info.basedOnPrebuildId} to={`./${prebuild.info.basedOnPrebuildId}`}>base</Link>)</p>
83+
<p className="text-gray-500 dark:text-gray-50">Incremental Prebuild (<a className="gp-link" title={prebuild.info.basedOnPrebuildId} href={`./${prebuild.info.basedOnPrebuildId}`}>base</a>)</p>
8584
</div>
8685
</>}
8786
</div>)

components/dashboard/src/projects/ProjectSettings.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,12 @@ export function getProjectSettingsMenu(project?: Project, team?: Team) {
1717
const teamOrUserSlug = !!team ? 't/' + team.slug : 'projects';
1818
return [
1919
{
20-
title: 'Configuration',
21-
link: [`/${teamOrUserSlug}/${project?.slug || project?.name}/configure`],
20+
title: 'General',
21+
link: [`/${teamOrUserSlug}/${project?.slug || project?.name}/settings`],
2222
},
2323
{
24-
title: 'Project',
25-
link: [`/${teamOrUserSlug}/${project?.slug || project?.name}/settings`],
24+
title: 'Configuration',
25+
link: [`/${teamOrUserSlug}/${project?.slug || project?.name}/configure`],
2626
},
2727
];
2828
}
@@ -82,7 +82,7 @@ export default function () {
8282
}
8383
}
8484

85-
return <PageWithSubMenu subMenu={getProjectSettingsMenu(project, team)} title="Settings" subtitle={`Manage settings for your project ${project?.name}`}>
85+
return <PageWithSubMenu subMenu={getProjectSettingsMenu(project, team)} title="Settings" subtitle="Manage project settings and configuration">
8686
<h3>Incremental Prebuilds</h3>
8787
<CheckBox
8888
title={<span>Enable Incremental Prebuilds <PillLabel type="warn" className="font-semibold mt-2 py-0.5 px-2 self-center">Beta</PillLabel></span>}

components/dashboard/src/teams/TeamSettings.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import { getCurrentTeam, TeamsContext } from "./teams-context";
1717
export function getTeamSettingsMenu(team?: Team) {
1818
return [
1919
{
20-
title: 'Team',
20+
title: 'General',
2121
link: [`/t/${team?.slug}/settings`],
2222
},
2323
];
@@ -57,7 +57,7 @@ export default function TeamSettings() {
5757
return <>
5858
<PageWithSubMenu subMenu={getTeamSettingsMenu(team)} title="Settings" subtitle="Manage general team settings.">
5959
<h3>Delete Team</h3>
60-
<p className="text-base text-gray-500 pb-4">Deleting this team will also remove all associated data with this team, including projects and workspaces. Deleted teams cannot be restored!</p>
60+
<p className="text-base text-gray-500 pb-4 max-w-2xl">Deleting this team will also remove all associated data with this team, including projects and workspaces. Deleted teams cannot be restored!</p>
6161
<button className="danger secondary" onClick={() => setModal(true)}>Delete Team</button>
6262
</PageWithSubMenu>
6363

components/server/src/workspace/gitpod-server-impl.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1707,6 +1707,7 @@ export class GitpodServerImpl implements GitpodServerWithTracing, Disposable {
17071707

17081708
const user = this.checkAndBlockUser("setProjectConfiguration");
17091709
await this.guardProjectOperation(user, projectId, "update");
1710+
17101711
const parseResult = this.gitpodParser.parse(configString);
17111712
if (parseResult.validationErrors) {
17121713
throw new Error(`This configuration could not be parsed: ${parseResult.validationErrors.join(', ')}`);
@@ -1718,6 +1719,14 @@ export class GitpodServerImpl implements GitpodServerWithTracing, Disposable {
17181719
}
17191720

17201721
public async updateProjectPartial(ctx: TraceContext, partialProject: PartialProject): Promise<void> {
1722+
traceAPIParams(ctx, {
1723+
// censor everything irrelevant
1724+
partialProject: {
1725+
id: partialProject.id,
1726+
settings: partialProject.settings,
1727+
}
1728+
});
1729+
17211730
const user = this.checkUser("updateProjectPartial");
17221731
await this.guardProjectOperation(user, partialProject.id, "update");
17231732

0 commit comments

Comments
 (0)