mirror of
https://github.com/Unleash/unleash.git
synced 2025-02-04 00:18:01 +01:00
chore: remove flagCreator flag (#7807)
This commit is contained in:
parent
ce30c069ee
commit
3fe385e127
@ -103,7 +103,6 @@ const FeatureOverviewMetaData = () => {
|
||||
const [showDelDialog, setShowDelDialog] = useState(false);
|
||||
const [showMarkCompletedDialogue, setShowMarkCompletedDialogue] =
|
||||
useState(false);
|
||||
const flagCreatorEnabled = useUiFlag('flagCreator');
|
||||
|
||||
const { locationSettings } = useLocationSettings();
|
||||
const showDependentFeatures = useShowDependentFeatures(feature.project);
|
||||
@ -225,9 +224,7 @@ const FeatureOverviewMetaData = () => {
|
||||
</StyledDetailsContainer>
|
||||
</BodyItemWithIcon>
|
||||
<ConditionallyRender
|
||||
condition={
|
||||
Boolean(feature.createdBy) && flagCreatorEnabled
|
||||
}
|
||||
condition={Boolean(feature.createdBy)}
|
||||
show={() => (
|
||||
<BodyItemWithIcon>
|
||||
<StyledDetailsContainer>
|
||||
|
@ -56,7 +56,6 @@ export const ProjectFeatureToggles = ({
|
||||
}: IPaginatedProjectFeatureTogglesProps) => {
|
||||
const projectId = useRequiredPathParam('projectId');
|
||||
const featureLifecycleEnabled = useUiFlag('featureLifecycle');
|
||||
const flagCreatorEnabled = useUiFlag('flagCreator');
|
||||
|
||||
const {
|
||||
features,
|
||||
@ -76,7 +75,7 @@ export const ProjectFeatureToggles = ({
|
||||
createdAt: tableState.createdAt,
|
||||
type: tableState.type,
|
||||
state: tableState.state,
|
||||
...(flagCreatorEnabled ? { createdBy: tableState.createdBy } : {}),
|
||||
createdBy: tableState.createdBy,
|
||||
};
|
||||
|
||||
const { favorite, unfavorite } = useFavoriteFeaturesApi();
|
||||
@ -168,20 +167,16 @@ export const ProjectFeatureToggles = ({
|
||||
width: '1%',
|
||||
},
|
||||
}),
|
||||
...(flagCreatorEnabled
|
||||
? [
|
||||
columnHelper.accessor('createdBy', {
|
||||
id: 'createdBy',
|
||||
header: 'By',
|
||||
cell: AvatarCell(onAvatarClick),
|
||||
enableSorting: false,
|
||||
meta: {
|
||||
width: '1%',
|
||||
align: 'center',
|
||||
},
|
||||
}),
|
||||
]
|
||||
: []),
|
||||
columnHelper.accessor('createdBy', {
|
||||
id: 'createdBy',
|
||||
header: 'By',
|
||||
cell: AvatarCell(onAvatarClick),
|
||||
enableSorting: false,
|
||||
meta: {
|
||||
width: '1%',
|
||||
align: 'center',
|
||||
},
|
||||
}),
|
||||
columnHelper.accessor('lastSeenAt', {
|
||||
id: 'lastSeenAt',
|
||||
header: 'Last seen',
|
||||
@ -425,16 +420,11 @@ export const ProjectFeatureToggles = ({
|
||||
id: 'createdAt',
|
||||
isVisible: columnVisibility.createdAt,
|
||||
},
|
||||
...(flagCreatorEnabled
|
||||
? [
|
||||
{
|
||||
header: 'By',
|
||||
id: 'createdBy',
|
||||
isVisible:
|
||||
columnVisibility.createdBy,
|
||||
},
|
||||
]
|
||||
: []),
|
||||
{
|
||||
header: 'By',
|
||||
id: 'createdBy',
|
||||
isVisible: columnVisibility.createdBy,
|
||||
},
|
||||
{
|
||||
header: 'Last seen',
|
||||
id: 'lastSeenAt',
|
||||
|
@ -6,7 +6,6 @@ import {
|
||||
type IFilterItem,
|
||||
} from 'component/filter/Filters/Filters';
|
||||
import { useProjectFlagCreators } from 'hooks/api/getters/useProjectFlagCreators/useProjectFlagCreators';
|
||||
import { useUiFlag } from 'hooks/useUiFlag';
|
||||
|
||||
interface IProjectOverviewFilters {
|
||||
state: FilterItemParamHolder;
|
||||
@ -22,7 +21,6 @@ export const ProjectOverviewFilters: VFC<IProjectOverviewFilters> = ({
|
||||
const { tags } = useAllTags();
|
||||
const { flagCreators } = useProjectFlagCreators(project);
|
||||
const [availableFilters, setAvailableFilters] = useState<IFilterItem[]>([]);
|
||||
const flagCreatorEnabled = useUiFlag('flagCreator');
|
||||
|
||||
useEffect(() => {
|
||||
const tagsOptions = (tags || []).map((tag) => ({
|
||||
@ -89,24 +87,18 @@ export const ProjectOverviewFilters: VFC<IProjectOverviewFilters> = ({
|
||||
singularOperators: ['IS', 'IS_NOT'],
|
||||
pluralOperators: ['IS_ANY_OF', 'IS_NONE_OF'],
|
||||
},
|
||||
];
|
||||
if (flagCreatorEnabled) {
|
||||
availableFilters.push({
|
||||
{
|
||||
label: 'Created by',
|
||||
icon: 'person',
|
||||
options: flagCreatorsOptions,
|
||||
filterKey: 'createdBy',
|
||||
singularOperators: ['IS', 'IS_NOT'],
|
||||
pluralOperators: ['IS_ANY_OF', 'IS_NONE_OF'],
|
||||
});
|
||||
}
|
||||
},
|
||||
];
|
||||
|
||||
setAvailableFilters(availableFilters);
|
||||
}, [
|
||||
JSON.stringify(tags),
|
||||
JSON.stringify(flagCreators),
|
||||
flagCreatorEnabled,
|
||||
]);
|
||||
}, [JSON.stringify(tags), JSON.stringify(flagCreators)]);
|
||||
|
||||
return (
|
||||
<Filters
|
||||
|
@ -15,7 +15,6 @@ import {
|
||||
} from 'utils/serializeQueryParams';
|
||||
import { usePersistentTableState } from 'hooks/usePersistentTableState';
|
||||
import mapValues from 'lodash.mapvalues';
|
||||
import { useUiFlag } from 'hooks/useUiFlag';
|
||||
import type { SearchFeaturesParams } from 'openapi';
|
||||
|
||||
type Attribute =
|
||||
@ -28,7 +27,6 @@ export const useProjectFeatureSearch = (
|
||||
storageKey = 'project-overview-v2',
|
||||
refreshInterval = 15 * 1000,
|
||||
) => {
|
||||
const flagCreatorEnabled = useUiFlag('flagCreator');
|
||||
const stateConfig = {
|
||||
offset: withDefault(NumberParam, 0),
|
||||
limit: withDefault(NumberParam, DEFAULT_PAGE_LIMIT),
|
||||
@ -41,7 +39,7 @@ export const useProjectFeatureSearch = (
|
||||
state: FilterItemParam,
|
||||
createdAt: FilterItemParam,
|
||||
type: FilterItemParam,
|
||||
...(flagCreatorEnabled ? { createdBy: FilterItemParam } : {}),
|
||||
createdBy: FilterItemParam,
|
||||
};
|
||||
const [tableState, setTableState] = usePersistentTableState(
|
||||
`${storageKey}-${projectId}`,
|
||||
|
@ -125,7 +125,6 @@ exports[`should create default config 1`] = `
|
||||
},
|
||||
},
|
||||
"filterInvalidClientMetrics": false,
|
||||
"flagCreator": false,
|
||||
"googleAuthEnabled": false,
|
||||
"improveCreateFlagFlow": false,
|
||||
"insightsV2": false,
|
||||
|
@ -59,7 +59,6 @@ export type IFlagKey =
|
||||
| 'enableLegacyVariants'
|
||||
| 'navigationSidebar'
|
||||
| 'commandBarUI'
|
||||
| 'flagCreator'
|
||||
| 'anonymizeProjectOwners'
|
||||
| 'resourceLimits'
|
||||
| 'extendedMetrics'
|
||||
@ -292,10 +291,6 @@ const flags: IFlags = {
|
||||
process.env.UNLEASH_EXPERIMENTAL_COMMAND_BAR_UI,
|
||||
false,
|
||||
),
|
||||
flagCreator: parseEnvVarBoolean(
|
||||
process.env.UNLEASH_EXPERIMENTAL_FLAG_CREATOR,
|
||||
false,
|
||||
),
|
||||
anonymizeProjectOwners: parseEnvVarBoolean(
|
||||
process.env.UNLEASH_EXPERIMENTAL_ANONYMIZE_PROJECT_OWNERS,
|
||||
false,
|
||||
|
@ -53,7 +53,6 @@ process.nextTick(async () => {
|
||||
manyStrategiesPagination: true,
|
||||
enableLegacyVariants: false,
|
||||
commandBarUI: true,
|
||||
flagCreator: true,
|
||||
resourceLimits: true,
|
||||
extendedMetrics: true,
|
||||
insightsV2: true,
|
||||
|
Loading…
Reference in New Issue
Block a user