mirror of
https://github.com/Unleash/unleash.git
synced 2025-04-06 01:15:28 +02:00
chore: [Gitar] Cleaning up stale flag: featureCollaborators with value true (#7820)
[](https://gitar.co) --- This automated PR was generated by [Gitar](https://gitar.co). View [docs](https://gitar.co/docs). --------- Co-authored-by: Gitar <noreply@gitar.co> Co-authored-by: Thomas Heartman <thomas@getunleash.io>
This commit is contained in:
parent
258909db39
commit
5aaa4920dd
@ -120,7 +120,7 @@ const StyledTabButton = styled(Tab)(({ theme }) => ({
|
|||||||
},
|
},
|
||||||
}));
|
}));
|
||||||
|
|
||||||
export const StyledLink = styled(Link)(({ theme }) => ({
|
export const StyledLink = styled(Link)(() => ({
|
||||||
maxWidth: '100%',
|
maxWidth: '100%',
|
||||||
textDecoration: 'none',
|
textDecoration: 'none',
|
||||||
'&:hover, &:focus': {
|
'&:hover, &:focus': {
|
||||||
@ -148,7 +148,6 @@ export const FeatureView = () => {
|
|||||||
const [openStaleDialog, setOpenStaleDialog] = useState(false);
|
const [openStaleDialog, setOpenStaleDialog] = useState(false);
|
||||||
const [isFeatureNameCopied, setIsFeatureNameCopied] = useState(false);
|
const [isFeatureNameCopied, setIsFeatureNameCopied] = useState(false);
|
||||||
const smallScreen = useMediaQuery(`(max-width:${500}px)`);
|
const smallScreen = useMediaQuery(`(max-width:${500}px)`);
|
||||||
const showCollaborators = useUiFlag('featureCollaborators');
|
|
||||||
|
|
||||||
const { feature, loading, error, status } = useFeature(
|
const { feature, loading, error, status } = useFeature(
|
||||||
projectId,
|
projectId,
|
||||||
@ -365,13 +364,8 @@ export const FeatureView = () => {
|
|||||||
/>
|
/>
|
||||||
))}
|
))}
|
||||||
</Tabs>
|
</Tabs>
|
||||||
<ConditionallyRender
|
<Collaborators
|
||||||
condition={showCollaborators}
|
collaborators={feature.collaborators?.users}
|
||||||
show={
|
|
||||||
<Collaborators
|
|
||||||
collaborators={feature.collaborators?.users}
|
|
||||||
/>
|
|
||||||
}
|
|
||||||
/>
|
/>
|
||||||
</StyledTabRow>
|
</StyledTabRow>
|
||||||
</StyledHeader>
|
</StyledHeader>
|
||||||
|
@ -92,7 +92,6 @@ export type UiFlags = {
|
|||||||
flagCreator?: boolean;
|
flagCreator?: boolean;
|
||||||
resourceLimits?: boolean;
|
resourceLimits?: boolean;
|
||||||
insightsV2?: boolean;
|
insightsV2?: boolean;
|
||||||
featureCollaborators?: boolean;
|
|
||||||
integrationEvents?: boolean;
|
integrationEvents?: boolean;
|
||||||
improveCreateFlagFlow?: boolean;
|
improveCreateFlagFlow?: boolean;
|
||||||
newEventSearch?: boolean;
|
newEventSearch?: boolean;
|
||||||
|
@ -104,7 +104,6 @@ exports[`should create default config 1`] = `
|
|||||||
"estimateTrafficDataCost": false,
|
"estimateTrafficDataCost": false,
|
||||||
"extendedMetrics": false,
|
"extendedMetrics": false,
|
||||||
"extendedUsageMetrics": false,
|
"extendedUsageMetrics": false,
|
||||||
"featureCollaborators": false,
|
|
||||||
"featureSearchFeedback": {
|
"featureSearchFeedback": {
|
||||||
"enabled": false,
|
"enabled": false,
|
||||||
"name": "withText",
|
"name": "withText",
|
||||||
|
@ -1095,18 +1095,13 @@ class FeatureToggleService {
|
|||||||
let children: string[] = [];
|
let children: string[] = [];
|
||||||
let lifecycle: IFeatureLifecycleStage | undefined = undefined;
|
let lifecycle: IFeatureLifecycleStage | undefined = undefined;
|
||||||
let collaborators: Collaborator[] = [];
|
let collaborators: Collaborator[] = [];
|
||||||
const featureCollaboratorsEnabled = this.flagResolver.isEnabled(
|
|
||||||
'featureCollaborators',
|
|
||||||
);
|
|
||||||
[dependencies, children, lifecycle, collaborators] = await Promise.all([
|
[dependencies, children, lifecycle, collaborators] = await Promise.all([
|
||||||
this.dependentFeaturesReadModel.getParents(featureName),
|
this.dependentFeaturesReadModel.getParents(featureName),
|
||||||
this.dependentFeaturesReadModel.getChildren([featureName]),
|
this.dependentFeaturesReadModel.getChildren([featureName]),
|
||||||
this.featureLifecycleReadModel.findCurrentStage(featureName),
|
this.featureLifecycleReadModel.findCurrentStage(featureName),
|
||||||
featureCollaboratorsEnabled
|
this.featureCollaboratorsReadModel.getFeatureCollaborators(
|
||||||
? this.featureCollaboratorsReadModel.getFeatureCollaborators(
|
featureName,
|
||||||
featureName,
|
),
|
||||||
)
|
|
||||||
: Promise.resolve([]),
|
|
||||||
]);
|
]);
|
||||||
|
|
||||||
if (environmentVariants) {
|
if (environmentVariants) {
|
||||||
@ -1121,9 +1116,7 @@ class FeatureToggleService {
|
|||||||
dependencies,
|
dependencies,
|
||||||
children,
|
children,
|
||||||
lifecycle,
|
lifecycle,
|
||||||
...(featureCollaboratorsEnabled
|
collaborators: { users: collaborators },
|
||||||
? { collaborators: { users: collaborators } }
|
|
||||||
: {}),
|
|
||||||
};
|
};
|
||||||
} else {
|
} else {
|
||||||
const result =
|
const result =
|
||||||
@ -1137,9 +1130,7 @@ class FeatureToggleService {
|
|||||||
dependencies,
|
dependencies,
|
||||||
children,
|
children,
|
||||||
lifecycle,
|
lifecycle,
|
||||||
...(featureCollaboratorsEnabled
|
collaborators: { users: collaborators },
|
||||||
? { collaborators: { users: collaborators } }
|
|
||||||
: {}),
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -25,7 +25,6 @@ beforeAll(async () => {
|
|||||||
flags: {
|
flags: {
|
||||||
strictSchemaValidation: true,
|
strictSchemaValidation: true,
|
||||||
anonymiseEventLog: true,
|
anonymiseEventLog: true,
|
||||||
featureCollaborators: true,
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -317,7 +317,7 @@ test('Should allow to archive/delete feature with children if no orphans are lef
|
|||||||
await app.createFeature(child, 'default');
|
await app.createFeature(child, 'default');
|
||||||
await app.addDependency(child, parent);
|
await app.addDependency(child, parent);
|
||||||
|
|
||||||
const { body: deleteBody } = await app.request
|
await app.request
|
||||||
.post(`/api/admin/projects/default/delete`)
|
.post(`/api/admin/projects/default/delete`)
|
||||||
.set('Content-Type', 'application/json')
|
.set('Content-Type', 'application/json')
|
||||||
.send({ features: [parent, child] })
|
.send({ features: [parent, child] })
|
||||||
|
@ -63,7 +63,6 @@ export type IFlagKey =
|
|||||||
| 'removeUnsafeInlineStyleSrc'
|
| 'removeUnsafeInlineStyleSrc'
|
||||||
| 'insightsV2'
|
| 'insightsV2'
|
||||||
| 'integrationEvents'
|
| 'integrationEvents'
|
||||||
| 'featureCollaborators'
|
|
||||||
| 'improveCreateFlagFlow'
|
| 'improveCreateFlagFlow'
|
||||||
| 'originMiddleware'
|
| 'originMiddleware'
|
||||||
| 'newEventSearch'
|
| 'newEventSearch'
|
||||||
@ -309,10 +308,6 @@ const flags: IFlags = {
|
|||||||
process.env.UNLEASH_EXPERIMENTAL_INTEGRATION_EVENTS,
|
process.env.UNLEASH_EXPERIMENTAL_INTEGRATION_EVENTS,
|
||||||
false,
|
false,
|
||||||
),
|
),
|
||||||
featureCollaborators: parseEnvVarBoolean(
|
|
||||||
process.env.UNLEASH_EXPERIMENTAL_FEATURE_COLLABORATORS,
|
|
||||||
false,
|
|
||||||
),
|
|
||||||
improveCreateFlagFlow: parseEnvVarBoolean(
|
improveCreateFlagFlow: parseEnvVarBoolean(
|
||||||
process.env.UNLEASH_EXPERIMENTAL_IMPROVE_CREATE_FLAG_FLOW,
|
process.env.UNLEASH_EXPERIMENTAL_IMPROVE_CREATE_FLAG_FLOW,
|
||||||
false,
|
false,
|
||||||
|
@ -56,7 +56,6 @@ process.nextTick(async () => {
|
|||||||
extendedMetrics: true,
|
extendedMetrics: true,
|
||||||
insightsV2: true,
|
insightsV2: true,
|
||||||
integrationEvents: true,
|
integrationEvents: true,
|
||||||
featureCollaborators: true,
|
|
||||||
improveCreateFlagFlow: true,
|
improveCreateFlagFlow: true,
|
||||||
originMiddleware: true,
|
originMiddleware: true,
|
||||||
newEventSearch: true,
|
newEventSearch: true,
|
||||||
|
Loading…
Reference in New Issue
Block a user