mirror of
https://github.com/Unleash/unleash.git
synced 2025-01-11 00:08:30 +01:00
chore: [Gitar] Cleaning up stale flag: featureCollaborators with value true (#7820)
[![Gitar](https://raw.githubusercontent.com/gitarcode/.github/main/assets/gitar-banner.svg)](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%',
|
||||
textDecoration: 'none',
|
||||
'&:hover, &:focus': {
|
||||
@ -148,7 +148,6 @@ export const FeatureView = () => {
|
||||
const [openStaleDialog, setOpenStaleDialog] = useState(false);
|
||||
const [isFeatureNameCopied, setIsFeatureNameCopied] = useState(false);
|
||||
const smallScreen = useMediaQuery(`(max-width:${500}px)`);
|
||||
const showCollaborators = useUiFlag('featureCollaborators');
|
||||
|
||||
const { feature, loading, error, status } = useFeature(
|
||||
projectId,
|
||||
@ -365,13 +364,8 @@ export const FeatureView = () => {
|
||||
/>
|
||||
))}
|
||||
</Tabs>
|
||||
<ConditionallyRender
|
||||
condition={showCollaborators}
|
||||
show={
|
||||
<Collaborators
|
||||
collaborators={feature.collaborators?.users}
|
||||
/>
|
||||
}
|
||||
<Collaborators
|
||||
collaborators={feature.collaborators?.users}
|
||||
/>
|
||||
</StyledTabRow>
|
||||
</StyledHeader>
|
||||
|
@ -92,7 +92,6 @@ export type UiFlags = {
|
||||
flagCreator?: boolean;
|
||||
resourceLimits?: boolean;
|
||||
insightsV2?: boolean;
|
||||
featureCollaborators?: boolean;
|
||||
integrationEvents?: boolean;
|
||||
improveCreateFlagFlow?: boolean;
|
||||
newEventSearch?: boolean;
|
||||
|
@ -104,7 +104,6 @@ exports[`should create default config 1`] = `
|
||||
"estimateTrafficDataCost": false,
|
||||
"extendedMetrics": false,
|
||||
"extendedUsageMetrics": false,
|
||||
"featureCollaborators": false,
|
||||
"featureSearchFeedback": {
|
||||
"enabled": false,
|
||||
"name": "withText",
|
||||
|
@ -1095,18 +1095,13 @@ class FeatureToggleService {
|
||||
let children: string[] = [];
|
||||
let lifecycle: IFeatureLifecycleStage | undefined = undefined;
|
||||
let collaborators: Collaborator[] = [];
|
||||
const featureCollaboratorsEnabled = this.flagResolver.isEnabled(
|
||||
'featureCollaborators',
|
||||
);
|
||||
[dependencies, children, lifecycle, collaborators] = await Promise.all([
|
||||
this.dependentFeaturesReadModel.getParents(featureName),
|
||||
this.dependentFeaturesReadModel.getChildren([featureName]),
|
||||
this.featureLifecycleReadModel.findCurrentStage(featureName),
|
||||
featureCollaboratorsEnabled
|
||||
? this.featureCollaboratorsReadModel.getFeatureCollaborators(
|
||||
featureName,
|
||||
)
|
||||
: Promise.resolve([]),
|
||||
this.featureCollaboratorsReadModel.getFeatureCollaborators(
|
||||
featureName,
|
||||
),
|
||||
]);
|
||||
|
||||
if (environmentVariants) {
|
||||
@ -1121,9 +1116,7 @@ class FeatureToggleService {
|
||||
dependencies,
|
||||
children,
|
||||
lifecycle,
|
||||
...(featureCollaboratorsEnabled
|
||||
? { collaborators: { users: collaborators } }
|
||||
: {}),
|
||||
collaborators: { users: collaborators },
|
||||
};
|
||||
} else {
|
||||
const result =
|
||||
@ -1137,9 +1130,7 @@ class FeatureToggleService {
|
||||
dependencies,
|
||||
children,
|
||||
lifecycle,
|
||||
...(featureCollaboratorsEnabled
|
||||
? { collaborators: { users: collaborators } }
|
||||
: {}),
|
||||
collaborators: { users: collaborators },
|
||||
};
|
||||
}
|
||||
}
|
||||
|
@ -25,7 +25,6 @@ beforeAll(async () => {
|
||||
flags: {
|
||||
strictSchemaValidation: 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.addDependency(child, parent);
|
||||
|
||||
const { body: deleteBody } = await app.request
|
||||
await app.request
|
||||
.post(`/api/admin/projects/default/delete`)
|
||||
.set('Content-Type', 'application/json')
|
||||
.send({ features: [parent, child] })
|
||||
|
@ -63,7 +63,6 @@ export type IFlagKey =
|
||||
| 'removeUnsafeInlineStyleSrc'
|
||||
| 'insightsV2'
|
||||
| 'integrationEvents'
|
||||
| 'featureCollaborators'
|
||||
| 'improveCreateFlagFlow'
|
||||
| 'originMiddleware'
|
||||
| 'newEventSearch'
|
||||
@ -309,10 +308,6 @@ const flags: IFlags = {
|
||||
process.env.UNLEASH_EXPERIMENTAL_INTEGRATION_EVENTS,
|
||||
false,
|
||||
),
|
||||
featureCollaborators: parseEnvVarBoolean(
|
||||
process.env.UNLEASH_EXPERIMENTAL_FEATURE_COLLABORATORS,
|
||||
false,
|
||||
),
|
||||
improveCreateFlagFlow: parseEnvVarBoolean(
|
||||
process.env.UNLEASH_EXPERIMENTAL_IMPROVE_CREATE_FLAG_FLOW,
|
||||
false,
|
||||
|
@ -56,7 +56,6 @@ process.nextTick(async () => {
|
||||
extendedMetrics: true,
|
||||
insightsV2: true,
|
||||
integrationEvents: true,
|
||||
featureCollaborators: true,
|
||||
improveCreateFlagFlow: true,
|
||||
originMiddleware: true,
|
||||
newEventSearch: true,
|
||||
|
Loading…
Reference in New Issue
Block a user