mirror of
https://github.com/Unleash/unleash.git
synced 2025-09-01 13:47:27 +02:00
feat: hide feature env variants in the UI
This commit is contained in:
parent
9112662c31
commit
ac247ea61d
@ -48,6 +48,7 @@ import { ReactComponent as ParentLinkIcon } from 'assets/icons/link-parent.svg';
|
|||||||
import { ChildrenTooltip } from './FeatureOverview/FeatureOverviewMetaData/ChildrenTooltip';
|
import { ChildrenTooltip } from './FeatureOverview/FeatureOverviewMetaData/ChildrenTooltip';
|
||||||
import copy from 'copy-to-clipboard';
|
import copy from 'copy-to-clipboard';
|
||||||
import useToast from 'hooks/useToast';
|
import useToast from 'hooks/useToast';
|
||||||
|
import { useUiFlag } from '../../../hooks/useUiFlag';
|
||||||
|
|
||||||
const StyledHeader = styled('div')(({ theme }) => ({
|
const StyledHeader = styled('div')(({ theme }) => ({
|
||||||
backgroundColor: theme.palette.background.paper,
|
backgroundColor: theme.palette.background.paper,
|
||||||
@ -145,6 +146,9 @@ 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 hideFeatureEnvironmentVariants = useUiFlag(
|
||||||
|
'hideFeatureEnvironmentVariants',
|
||||||
|
);
|
||||||
|
|
||||||
const { feature, loading, error, status } = useFeature(
|
const { feature, loading, error, status } = useFeature(
|
||||||
projectId,
|
projectId,
|
||||||
@ -168,7 +172,15 @@ export const FeatureView = () => {
|
|||||||
path: `${basePath}/metrics`,
|
path: `${basePath}/metrics`,
|
||||||
name: 'Metrics',
|
name: 'Metrics',
|
||||||
},
|
},
|
||||||
{ title: 'Variants', path: `${basePath}/variants`, name: 'Variants' },
|
...(hideFeatureEnvironmentVariants
|
||||||
|
? []
|
||||||
|
: [
|
||||||
|
{
|
||||||
|
title: 'Variants',
|
||||||
|
path: `${basePath}/variants`,
|
||||||
|
name: 'Variants',
|
||||||
|
},
|
||||||
|
]),
|
||||||
{ title: 'Settings', path: `${basePath}/settings`, name: 'Settings' },
|
{ title: 'Settings', path: `${basePath}/settings`, name: 'Settings' },
|
||||||
{
|
{
|
||||||
title: 'Event log',
|
title: 'Event log',
|
||||||
|
@ -71,6 +71,7 @@ export type UiFlags = {
|
|||||||
executiveDashboardUI?: boolean;
|
executiveDashboardUI?: boolean;
|
||||||
feedbackComments?: Variant;
|
feedbackComments?: Variant;
|
||||||
displayUpgradeEdgeBanner?: boolean;
|
displayUpgradeEdgeBanner?: boolean;
|
||||||
|
hideFeatureEnvironmentVariants?: boolean;
|
||||||
showInactiveUsers?: boolean;
|
showInactiveUsers?: boolean;
|
||||||
featureSearchFeedbackPosting?: boolean;
|
featureSearchFeedbackPosting?: boolean;
|
||||||
userAccessUIEnabled?: boolean;
|
userAccessUIEnabled?: boolean;
|
||||||
|
Loading…
Reference in New Issue
Block a user