From 11997e93445bf7cfbaa92239b3276e22f5cfceca Mon Sep 17 00:00:00 2001 From: Dmitry Bushev Date: Tue, 10 Oct 2023 02:15:21 +0100 Subject: [PATCH] Fix opening projects with arbitrary name (#8012) related #7973 Fixes opening the projects with names that are not in Upper_Snake_Case. # Important Notes https://github.com/enso-org/enso/assets/357683/ea820658-5dee-474a-9dce-201d09796af7 --- .../src/authentication/src/dashboard/components/editor.tsx | 1 + .../dashboard/src/authentication/src/dashboard/localBackend.ts | 2 +- .../src/authentication/src/dashboard/projectManager.ts | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/app/ide-desktop/lib/dashboard/src/authentication/src/dashboard/components/editor.tsx b/app/ide-desktop/lib/dashboard/src/authentication/src/dashboard/components/editor.tsx index d54c4c1e617..e3d711b1d2d 100644 --- a/app/ide-desktop/lib/dashboard/src/authentication/src/dashboard/components/editor.tsx +++ b/app/ide-desktop/lib/dashboard/src/authentication/src/dashboard/components/editor.tsx @@ -144,6 +144,7 @@ export default function Editor(props: EditorProps) { }, startup: { project: project.packageName, + displayedProjectName: project.name, }, window: { topBarOffset: `${TOP_BAR_X_OFFSET_PX}`, diff --git a/app/ide-desktop/lib/dashboard/src/authentication/src/dashboard/localBackend.ts b/app/ide-desktop/lib/dashboard/src/authentication/src/dashboard/localBackend.ts index b4765f38b6e..3811f1c74d2 100644 --- a/app/ide-desktop/lib/dashboard/src/authentication/src/dashboard/localBackend.ts +++ b/app/ide-desktop/lib/dashboard/src/authentication/src/dashboard/localBackend.ts @@ -194,7 +194,7 @@ export class LocalBackend extends backend.Backend { jsonAddress: ipWithSocketToAddress(cachedProject.languageServerJsonAddress), binaryAddress: ipWithSocketToAddress(cachedProject.languageServerBinaryAddress), organizationId: '', - packageName: cachedProject.projectName, + packageName: cachedProject.projectNormalizedName, projectId, state: { type: backend.ProjectState.opened, diff --git a/app/ide-desktop/lib/dashboard/src/authentication/src/dashboard/projectManager.ts b/app/ide-desktop/lib/dashboard/src/authentication/src/dashboard/projectManager.ts index e59010e4da7..e6e1545616a 100644 --- a/app/ide-desktop/lib/dashboard/src/authentication/src/dashboard/projectManager.ts +++ b/app/ide-desktop/lib/dashboard/src/authentication/src/dashboard/projectManager.ts @@ -104,6 +104,7 @@ export interface OpenProject { languageServerJsonAddress: IpWithSocket languageServerBinaryAddress: IpWithSocket projectName: ProjectName + projectNormalizedName: string projectNamespace: string }