mirror of
https://github.com/Unleash/unleash.git
synced 2025-09-05 17:53:12 +02:00
chore: add unknown flags link in flags overview (#10591)
https://linear.app/unleash/issue/2-3834/add-link-to-unknown-flags-in-flags-overview Adds an "Unknown flags" link on the top right corner of the flags overview page. Even though we're planning to remove the flag soon, this is still controlled by the flag, just in case. <img width="1370" height="311" alt="image" src="https://github.com/user-attachments/assets/073725c3-35af-47fb-b7d4-5bc70c0c68cf" />
This commit is contained in:
parent
bc075a4915
commit
9ef81be488
@ -34,6 +34,7 @@ import { ExportFlags } from './ExportFlags.tsx';
|
|||||||
import { createFeatureOverviewCell } from 'component/common/Table/cells/FeatureOverviewCell/FeatureOverviewCell';
|
import { createFeatureOverviewCell } from 'component/common/Table/cells/FeatureOverviewCell/FeatureOverviewCell';
|
||||||
import { AvatarCell } from 'component/project/Project/PaginatedProjectFeatureToggles/AvatarCell';
|
import { AvatarCell } from 'component/project/Project/PaginatedProjectFeatureToggles/AvatarCell';
|
||||||
import { StatusCell } from './StatusCell/StatusCell.tsx';
|
import { StatusCell } from './StatusCell/StatusCell.tsx';
|
||||||
|
import { useUiFlag } from 'hooks/useUiFlag.ts';
|
||||||
|
|
||||||
export const featuresPlaceholder = Array(15).fill({
|
export const featuresPlaceholder = Array(15).fill({
|
||||||
name: 'Name of the feature',
|
name: 'Name of the feature',
|
||||||
@ -69,6 +70,7 @@ export const FeatureToggleListTable: FC = () => {
|
|||||||
const isSmallScreen = useMediaQuery(theme.breakpoints.down('md'));
|
const isSmallScreen = useMediaQuery(theme.breakpoints.down('md'));
|
||||||
const isMediumScreen = useMediaQuery(theme.breakpoints.down('lg'));
|
const isMediumScreen = useMediaQuery(theme.breakpoints.down('lg'));
|
||||||
const [showExportDialog, setShowExportDialog] = useState(false);
|
const [showExportDialog, setShowExportDialog] = useState(false);
|
||||||
|
const reportUnknownFlagsEnabled = useUiFlag('reportUnknownFlags');
|
||||||
|
|
||||||
const { setToastApiError } = useToast();
|
const { setToastApiError } = useToast();
|
||||||
|
|
||||||
@ -259,6 +261,16 @@ export const FeatureToggleListTable: FC = () => {
|
|||||||
title='Flags overview'
|
title='Flags overview'
|
||||||
actions={
|
actions={
|
||||||
<>
|
<>
|
||||||
|
{reportUnknownFlagsEnabled && (
|
||||||
|
<Link
|
||||||
|
component={RouterLink}
|
||||||
|
to='/unknown-flags'
|
||||||
|
underline='always'
|
||||||
|
sx={{ marginRight: 2, ...focusable(theme) }}
|
||||||
|
>
|
||||||
|
Unknown flags
|
||||||
|
</Link>
|
||||||
|
)}
|
||||||
<Link
|
<Link
|
||||||
component={RouterLink}
|
component={RouterLink}
|
||||||
to='/archive'
|
to='/archive'
|
||||||
@ -272,7 +284,7 @@ export const FeatureToggleListTable: FC = () => {
|
|||||||
});
|
});
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
View archive
|
Archived flags
|
||||||
</Link>
|
</Link>
|
||||||
<ExportFlags
|
<ExportFlags
|
||||||
onClick={() => setShowExportDialog(true)}
|
onClick={() => setShowExportDialog(true)}
|
||||||
|
Loading…
Reference in New Issue
Block a user