1
0
mirror of https://github.com/Unleash/unleash.git synced 2024-12-22 19:07:54 +01:00

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 <andreas@getunleash.ai>
This commit is contained in:
andreas-unleash 2023-04-26 17:07:09 +03:00 committed by GitHub
parent a7213bf70b
commit 2667e55d4a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 2 additions and 22 deletions

View File

@ -9,7 +9,6 @@ import {
StyledInput,
StyledTextField,
} from './ProjectForm.styles';
import useUiConfig from 'hooks/api/getters/useUiConfig/useUiConfig';
import { StickinessSelect } from 'component/feature/StrategyTypes/FlexibleStrategy/StickinessSelect/StickinessSelect';
import { ConditionallyRender } from 'component/common/ConditionallyRender/ConditionallyRender';
import Select from 'component/common/select';
@ -60,9 +59,6 @@ const ProjectForm: React.FC<IProjectForm> = ({
validateProjectId,
clearErrors,
}) => {
const { uiConfig } = useUiConfig();
const { projectScopedStickiness } = uiConfig.flags;
return (
<StyledForm onSubmit={handleSubmit}>
<StyledContainer>
@ -109,10 +105,7 @@ const ProjectForm: React.FC<IProjectForm> = ({
/>
<ConditionallyRender
condition={
Boolean(projectScopedStickiness) &&
setProjectStickiness != null
}
condition={setProjectStickiness != null}
show={
<>
<StyledDescription>

View File

@ -1,15 +1,10 @@
import useUiConfig from './api/getters/useUiConfig/useUiConfig';
import useProject from './api/getters/useProject/useProject';
const DEFAULT_STICKINESS = 'default';
export const useDefaultProjectSettings = (projectId: string) => {
const { uiConfig } = useUiConfig();
const { projectScopedStickiness } = uiConfig.flags;
const { project, loading, error } = useProject(projectId);
return {
defaultStickiness: Boolean(projectScopedStickiness)
defaultStickiness: Boolean(project.defaultStickiness)
? project.defaultStickiness
: DEFAULT_STICKINESS,
mode: project.mode,

View File

@ -46,7 +46,6 @@ export interface IFlags {
proPlanAutoCharge?: boolean;
notifications?: boolean;
bulkOperations?: boolean;
projectScopedStickiness?: boolean;
personalAccessTokensKillSwitch?: boolean;
demo?: boolean;
strategyTitle?: boolean;

View File

@ -85,7 +85,6 @@ exports[`should create default config 1`] = `
"optimal304Differ": false,
"personalAccessTokensKillSwitch": false,
"proPlanAutoCharge": false,
"projectScopedStickiness": false,
"responseTimeWithAppNameKillSwitch": false,
"strategyDisable": false,
"strategyTitle": false,
@ -113,7 +112,6 @@ exports[`should create default config 1`] = `
"optimal304Differ": false,
"personalAccessTokensKillSwitch": false,
"proPlanAutoCharge": false,
"projectScopedStickiness": false,
"responseTimeWithAppNameKillSwitch": false,
"strategyDisable": false,
"strategyTitle": false,

View File

@ -53,10 +53,6 @@ const flags = {
process.env.UNLEASH_BULK_OPERATIONS,
false,
),
projectScopedStickiness: parseEnvVarBoolean(
process.env.PROJECT_SCOPED_STICKINESS,
false,
),
personalAccessTokensKillSwitch: parseEnvVarBoolean(
process.env.UNLEASH_PAT_KILL_SWITCH,
false,

View File

@ -40,7 +40,6 @@ process.nextTick(async () => {
responseTimeWithAppNameKillSwitch: false,
newProjectOverview: true,
bulkOperations: true,
projectScopedStickiness: true,
optimal304: true,
optimal304Differ: false,
},