Skip to content

Commit 2667e55

Browse files
chore: remove projectScopedStickinessFlag (#3620)
<!-- Thanks for creating a PR! To make it easier for reviewers and everyone else to understand what your changes relate to, please add some relevant content to the headings below. Feel free to ignore or delete sections that you don't think are relevant. Thank you! ❤️ --> ## About the changes <!-- Describe the changes introduced. What are they and why are they being introduced? Feel free to also add screenshots or steps to view the changes if they're visual. --> <!-- Does it close an issue? Multiple? --> Closes # <!-- (For internal contributors): Does it relate to an issue on public roadmap? --> <!-- Relates to [roadmap](https://github.com/orgs/Unleash/projects/10) item: # --> ### Important files <!-- PRs can contain a lot of changes, but not all changes are equally important. Where should a reviewer start looking to get an overview of the changes? Are any files particularly important? --> ## Discussion points <!-- Anything about the PR you'd like to discuss before it gets merged? Got any questions or doubts? --> Signed-off-by: andreas-unleash <[email protected]>
1 parent a7213bf commit 2667e55

File tree

6 files changed

+2
-22
lines changed

6 files changed

+2
-22
lines changed

frontend/src/component/project/Project/ProjectForm/ProjectForm.tsx

+1-8
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ import {
99
StyledInput,
1010
StyledTextField,
1111
} from './ProjectForm.styles';
12-
import useUiConfig from 'hooks/api/getters/useUiConfig/useUiConfig';
1312
import { StickinessSelect } from 'component/feature/StrategyTypes/FlexibleStrategy/StickinessSelect/StickinessSelect';
1413
import { ConditionallyRender } from 'component/common/ConditionallyRender/ConditionallyRender';
1514
import Select from 'component/common/select';
@@ -60,9 +59,6 @@ const ProjectForm: React.FC<IProjectForm> = ({
6059
validateProjectId,
6160
clearErrors,
6261
}) => {
63-
const { uiConfig } = useUiConfig();
64-
const { projectScopedStickiness } = uiConfig.flags;
65-
6662
return (
6763
<StyledForm onSubmit={handleSubmit}>
6864
<StyledContainer>
@@ -109,10 +105,7 @@ const ProjectForm: React.FC<IProjectForm> = ({
109105
/>
110106

111107
<ConditionallyRender
112-
condition={
113-
Boolean(projectScopedStickiness) &&
114-
setProjectStickiness != null
115-
}
108+
condition={setProjectStickiness != null}
116109
show={
117110
<>
118111
<StyledDescription>

frontend/src/hooks/useDefaultProjectSettings.ts

+1-6
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,10 @@
1-
import useUiConfig from './api/getters/useUiConfig/useUiConfig';
21
import useProject from './api/getters/useProject/useProject';
32

43
const DEFAULT_STICKINESS = 'default';
54
export const useDefaultProjectSettings = (projectId: string) => {
6-
const { uiConfig } = useUiConfig();
7-
8-
const { projectScopedStickiness } = uiConfig.flags;
9-
105
const { project, loading, error } = useProject(projectId);
116
return {
12-
defaultStickiness: Boolean(projectScopedStickiness)
7+
defaultStickiness: Boolean(project.defaultStickiness)
138
? project.defaultStickiness
149
: DEFAULT_STICKINESS,
1510
mode: project.mode,

frontend/src/interfaces/uiConfig.ts

-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ export interface IFlags {
4646
proPlanAutoCharge?: boolean;
4747
notifications?: boolean;
4848
bulkOperations?: boolean;
49-
projectScopedStickiness?: boolean;
5049
personalAccessTokensKillSwitch?: boolean;
5150
demo?: boolean;
5251
strategyTitle?: boolean;

src/lib/__snapshots__/create-config.test.ts.snap

-2
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,6 @@ exports[`should create default config 1`] = `
8585
"optimal304Differ": false,
8686
"personalAccessTokensKillSwitch": false,
8787
"proPlanAutoCharge": false,
88-
"projectScopedStickiness": false,
8988
"responseTimeWithAppNameKillSwitch": false,
9089
"strategyDisable": false,
9190
"strategyTitle": false,
@@ -113,7 +112,6 @@ exports[`should create default config 1`] = `
113112
"optimal304Differ": false,
114113
"personalAccessTokensKillSwitch": false,
115114
"proPlanAutoCharge": false,
116-
"projectScopedStickiness": false,
117115
"responseTimeWithAppNameKillSwitch": false,
118116
"strategyDisable": false,
119117
"strategyTitle": false,

src/lib/types/experimental.ts

-4
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,6 @@ const flags = {
5353
process.env.UNLEASH_BULK_OPERATIONS,
5454
false,
5555
),
56-
projectScopedStickiness: parseEnvVarBoolean(
57-
process.env.PROJECT_SCOPED_STICKINESS,
58-
false,
59-
),
6056
personalAccessTokensKillSwitch: parseEnvVarBoolean(
6157
process.env.UNLEASH_PAT_KILL_SWITCH,
6258
false,

src/server-dev.ts

-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ process.nextTick(async () => {
4040
responseTimeWithAppNameKillSwitch: false,
4141
newProjectOverview: true,
4242
bulkOperations: true,
43-
projectScopedStickiness: true,
4443
optimal304: true,
4544
optimal304Differ: false,
4645
},

0 commit comments

Comments
 (0)