1
0
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:
Nuno Góis 2025-09-01 18:18:07 +01:00 committed by GitHub
parent bc075a4915
commit 9ef81be488
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -34,6 +34,7 @@ import { ExportFlags } from './ExportFlags.tsx';
import { createFeatureOverviewCell } from 'component/common/Table/cells/FeatureOverviewCell/FeatureOverviewCell';
import { AvatarCell } from 'component/project/Project/PaginatedProjectFeatureToggles/AvatarCell';
import { StatusCell } from './StatusCell/StatusCell.tsx';
import { useUiFlag } from 'hooks/useUiFlag.ts';
export const featuresPlaceholder = Array(15).fill({
name: 'Name of the feature',
@ -69,6 +70,7 @@ export const FeatureToggleListTable: FC = () => {
const isSmallScreen = useMediaQuery(theme.breakpoints.down('md'));
const isMediumScreen = useMediaQuery(theme.breakpoints.down('lg'));
const [showExportDialog, setShowExportDialog] = useState(false);
const reportUnknownFlagsEnabled = useUiFlag('reportUnknownFlags');
const { setToastApiError } = useToast();
@ -259,6 +261,16 @@ export const FeatureToggleListTable: FC = () => {
title='Flags overview'
actions={
<>
{reportUnknownFlagsEnabled && (
<Link
component={RouterLink}
to='/unknown-flags'
underline='always'
sx={{ marginRight: 2, ...focusable(theme) }}
>
Unknown flags
</Link>
)}
<Link
component={RouterLink}
to='/archive'
@ -272,7 +284,7 @@ export const FeatureToggleListTable: FC = () => {
});
}}
>
View archive
Archived flags
</Link>
<ExportFlags
onClick={() => setShowExportDialog(true)}