Skip to content

Commit

Permalink
chore: add flag for the new project creation form layout (#6959)
Browse files Browse the repository at this point in the history
Add a flag to enable/disable the new UI for project creation.
This flag is separate from the impl on the back end so that we can
enable one without the other (but uses flag dependencies in Unleash, so
that we can never enable the new UI without the new back end).

I have not set the flag to `true` in server startup because the form
doesn't work yet, so it's a manual step for now.
  • Loading branch information
thomasheartman committed Apr 29, 2024
1 parent 491cd58 commit a66b3c6
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions frontend/src/interfaces/uiConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ export type UiFlags = {
projectListFilterMyProjects?: boolean;
createProjectWithEnvironmentConfig?: boolean;
projectsListNewCards?: boolean;
newCreateProjectUI?: boolean;
};

export interface IVersionInfo {
Expand Down
1 change: 1 addition & 0 deletions src/lib/__snapshots__/create-config.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ exports[`should create default config 1`] = `
},
},
"migrationLock": true,
"newCreateProjectUI": false,
"outdatedSdksBanner": false,
"parseProjectFromSession": false,
"personalAccessTokensKillSwitch": false,
Expand Down
7 changes: 6 additions & 1 deletion src/lib/types/experimental.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,8 @@ export type IFlagKey =
| 'projectListFilterMyProjects'
| 'projectsListNewCards'
| 'parseProjectFromSession'
| 'createProjectWithEnvironmentConfig';
| 'createProjectWithEnvironmentConfig'
| 'newCreateProjectUI';

export type IFlags = Partial<{ [key in IFlagKey]: boolean | Variant }>;

Expand Down Expand Up @@ -283,6 +284,10 @@ const flags: IFlags = {
process.env.UNLEASH_EXPERIMENTAL_PROJECTS_LIST_NEW_CARDS,
false,
),
newCreateProjectUI: parseEnvVarBoolean(
process.env.UNLEASH_EXPERIMENTAL_NEW_CREATE_PROJECT_UI,
false,
),
};

export const defaultExperimentalOptions: IExperimentalOptions = {
Expand Down

0 comments on commit a66b3c6

Please sign in to comment.