mirror of
https://github.com/Unleash/unleash.git
synced 2025-02-09 00:18:00 +01:00
chore: remove project overview refactor flag (#6897)
This commit is contained in:
parent
d1803b2e62
commit
8ae78236d2
@ -4,7 +4,6 @@ import type { ILastSeenEnvironments } from 'interfaces/featureToggle';
|
||||
import { ConditionallyRender } from 'component/common/ConditionallyRender/ConditionallyRender';
|
||||
import { useLastSeenColors } from 'component/feature/FeatureView/FeatureEnvironmentSeen/useLastSeenColors';
|
||||
import { LastSeenProgress } from './LastSeenProgress/LastSeenProgress';
|
||||
import { useUiFlag } from 'hooks/useUiFlag';
|
||||
|
||||
const StyledDescription = styled(
|
||||
'div',
|
||||
@ -75,7 +74,6 @@ export const LastSeenTooltip = ({
|
||||
...rest
|
||||
}: ILastSeenTooltipProps) => {
|
||||
const getColor = useLastSeenColors();
|
||||
const projectOverviewRefactor = useUiFlag('projectOverviewRefactor');
|
||||
const [, defaultTextColor] = getColor();
|
||||
const environmentsHaveLastSeen = environments?.some((environment) =>
|
||||
Boolean(environment.lastSeenAt),
|
||||
@ -134,12 +132,7 @@ export const LastSeenTooltip = ({
|
||||
}
|
||||
/>
|
||||
</StyledValueContainer>
|
||||
<ConditionallyRender
|
||||
condition={Boolean(projectOverviewRefactor)}
|
||||
show={
|
||||
<LastSeenProgress yes={yes} no={no} />
|
||||
}
|
||||
/>
|
||||
<LastSeenProgress yes={yes} no={no} />
|
||||
</StyledDescriptionBlock>
|
||||
))}
|
||||
</StyledListContainer>
|
||||
|
@ -38,12 +38,10 @@ import { ImportModal } from './Import/ImportModal';
|
||||
import { IMPORT_BUTTON } from 'utils/testIds';
|
||||
import { EnterpriseBadge } from 'component/common/EnterpriseBadge/EnterpriseBadge';
|
||||
import { Badge } from 'component/common/Badge/Badge';
|
||||
import { ProjectDoraMetrics } from './ProjectDoraMetrics/ProjectDoraMetrics';
|
||||
import type { UiFlags } from 'interfaces/uiConfig';
|
||||
import { HiddenProjectIconWithTooltip } from './HiddenProjectIconWithTooltip/HiddenProjectIconWithTooltip';
|
||||
import { ChangeRequestPlausibleProvider } from 'component/changeRequest/ChangeRequestContext';
|
||||
import { ProjectApplications } from '../ProjectApplications/ProjectApplications';
|
||||
import { useUiFlag } from 'hooks/useUiFlag';
|
||||
import { ProjectInsights } from './ProjectInsights/ProjectInsights';
|
||||
|
||||
const StyledBadge = styled(Badge)(({ theme }) => ({
|
||||
@ -78,8 +76,6 @@ export const Project = () => {
|
||||
const projectName = project?.name || projectId;
|
||||
const { favorite, unfavorite } = useFavoriteProjectsApi();
|
||||
|
||||
const projectOverviewRefactor = useUiFlag('projectOverviewRefactor');
|
||||
|
||||
const [showDelDialog, setShowDelDialog] = useState(false);
|
||||
|
||||
const [
|
||||
@ -93,16 +89,12 @@ export const Project = () => {
|
||||
path: basePath,
|
||||
name: 'overview',
|
||||
},
|
||||
...(projectOverviewRefactor
|
||||
? [
|
||||
{
|
||||
title: 'Insights',
|
||||
path: `${basePath}/insights`,
|
||||
name: 'insights',
|
||||
new: true,
|
||||
},
|
||||
]
|
||||
: []),
|
||||
{
|
||||
title: 'Insights',
|
||||
path: `${basePath}/insights`,
|
||||
name: 'insights',
|
||||
new: true,
|
||||
},
|
||||
{
|
||||
title: 'Health',
|
||||
path: `${basePath}/health`,
|
||||
@ -119,16 +111,6 @@ export const Project = () => {
|
||||
name: 'change-request',
|
||||
isEnterprise: true,
|
||||
},
|
||||
...(!projectOverviewRefactor
|
||||
? [
|
||||
{
|
||||
title: 'Metrics',
|
||||
path: `${basePath}/metrics`,
|
||||
name: 'dora',
|
||||
isEnterprise: true,
|
||||
},
|
||||
]
|
||||
: []),
|
||||
{
|
||||
title: 'Applications',
|
||||
path: `${basePath}/applications`,
|
||||
@ -319,9 +301,7 @@ export const Project = () => {
|
||||
/>
|
||||
<Route path='environments' element={<ProjectEnvironment />} />
|
||||
<Route path='archive' element={<ProjectFeaturesArchive />} />
|
||||
{Boolean(projectOverviewRefactor) && (
|
||||
<Route path='insights' element={<ProjectInsights />} />
|
||||
)}
|
||||
<Route path='insights' element={<ProjectInsights />} />
|
||||
<Route path='logs' element={<ProjectLog />} />
|
||||
<Route
|
||||
path='change-requests'
|
||||
@ -343,9 +323,6 @@ export const Project = () => {
|
||||
}
|
||||
/>
|
||||
<Route path='settings/*' element={<ProjectSettings />} />
|
||||
{Boolean(!projectOverviewRefactor) && (
|
||||
<Route path='metrics' element={<ProjectDoraMetrics />} />
|
||||
)}
|
||||
<Route path='applications' element={<ProjectApplications />} />
|
||||
<Route path='*' element={<ProjectOverview />} />
|
||||
</Routes>
|
||||
|
@ -1,17 +1,13 @@
|
||||
import { type FC, useEffect } from 'react';
|
||||
import { Box, styled } from '@mui/material';
|
||||
import ProjectInfo from './ProjectInfo/ProjectInfo';
|
||||
import { useRequiredPathParam } from 'hooks/useRequiredPathParam';
|
||||
import { ProjectStats } from './ProjectStats/ProjectStats';
|
||||
import { ProjectFeatureToggles } from './PaginatedProjectFeatureToggles/ProjectFeatureToggles';
|
||||
import useProjectOverview, {
|
||||
useProjectOverviewNameOrId,
|
||||
} from 'hooks/api/getters/useProjectOverview/useProjectOverview';
|
||||
import { usePageTitle } from 'hooks/usePageTitle';
|
||||
import { useLastViewedProject } from 'hooks/useLastViewedProject';
|
||||
import { useUiFlag } from 'hooks/useUiFlag';
|
||||
import { ProjectOverviewChangeRequests } from './ProjectOverviewChangeRequests';
|
||||
import { OldProjectFeatureToggles } from './PaginatedProjectFeatureToggles/OldProjectFeatureToggles';
|
||||
|
||||
const refreshInterval = 15 * 1000;
|
||||
|
||||
@ -38,69 +34,6 @@ const StyledContentContainer = styled(Box)(({ theme }) => ({
|
||||
|
||||
const ProjectOverview: FC<{
|
||||
storageKey?: string;
|
||||
}> = ({ storageKey = 'project-overview-v2' }) => {
|
||||
const projectOverviewRefactor = useUiFlag('projectOverviewRefactor');
|
||||
|
||||
if (projectOverviewRefactor) {
|
||||
return <NewProjectOverview storageKey={storageKey} />;
|
||||
} else {
|
||||
return <OldProjectOverview storageKey={storageKey} />;
|
||||
}
|
||||
};
|
||||
|
||||
const OldProjectOverview: FC<{
|
||||
storageKey?: string;
|
||||
}> = ({ storageKey = 'project-overview-v2' }) => {
|
||||
const projectId = useRequiredPathParam('projectId');
|
||||
const projectName = useProjectOverviewNameOrId(projectId);
|
||||
const { project } = useProjectOverview(projectId, {
|
||||
refreshInterval,
|
||||
});
|
||||
usePageTitle(`Project overview – ${projectName}`);
|
||||
const { setLastViewed } = useLastViewedProject();
|
||||
useEffect(() => {
|
||||
setLastViewed(projectId);
|
||||
}, [projectId, setLastViewed]);
|
||||
|
||||
const {
|
||||
members,
|
||||
featureTypeCounts,
|
||||
health,
|
||||
description,
|
||||
environments,
|
||||
stats,
|
||||
} = project;
|
||||
|
||||
return (
|
||||
<StyledContainer key={projectId}>
|
||||
<ProjectInfo
|
||||
id={projectId}
|
||||
description={description}
|
||||
memberCount={members}
|
||||
health={health}
|
||||
featureTypeCounts={featureTypeCounts}
|
||||
stats={stats}
|
||||
/>
|
||||
|
||||
<StyledContentContainer>
|
||||
<ProjectStats stats={project.stats} />
|
||||
|
||||
<StyledProjectToggles>
|
||||
<OldProjectFeatureToggles
|
||||
environments={project.environments.map(
|
||||
(environment) => environment.environment,
|
||||
)}
|
||||
refreshInterval={refreshInterval}
|
||||
storageKey={storageKey}
|
||||
/>
|
||||
</StyledProjectToggles>
|
||||
</StyledContentContainer>
|
||||
</StyledContainer>
|
||||
);
|
||||
};
|
||||
|
||||
const NewProjectOverview: FC<{
|
||||
storageKey?: string;
|
||||
}> = ({ storageKey = 'project-overview-v2' }) => {
|
||||
const projectId = useRequiredPathParam('projectId');
|
||||
const projectName = useProjectOverviewNameOrId(projectId);
|
||||
|
@ -75,7 +75,6 @@ export type UiFlags = {
|
||||
featureSearchFeedbackPosting?: boolean;
|
||||
userAccessUIEnabled?: boolean;
|
||||
outdatedSdksBanner?: boolean;
|
||||
projectOverviewRefactor?: string;
|
||||
displayTrafficDataUsage?: boolean;
|
||||
disableShowContextFieldSelectionValues?: boolean;
|
||||
projectOverviewRefactorFeedback?: boolean;
|
||||
|
@ -136,7 +136,6 @@ exports[`should create default config 1`] = `
|
||||
"parseProjectFromSession": false,
|
||||
"personalAccessTokensKillSwitch": false,
|
||||
"projectListFilterMyProjects": false,
|
||||
"projectOverviewRefactor": false,
|
||||
"projectOverviewRefactorFeedback": false,
|
||||
"projectsListNewCards": false,
|
||||
"queryMissingTokens": false,
|
||||
|
@ -51,7 +51,6 @@ export type IFlagKey =
|
||||
| 'responseTimeMetricsFix'
|
||||
| 'scimApi'
|
||||
| 'displayEdgeBanner'
|
||||
| 'projectOverviewRefactor'
|
||||
| 'disableShowContextFieldSelectionValues'
|
||||
| 'projectOverviewRefactorFeedback'
|
||||
| 'featureLifecycle'
|
||||
@ -251,10 +250,6 @@ const flags: IFlags = {
|
||||
process.env.UNLEASH_EXPERIMENTAL_RESPONSE_TIME_METRICS_FIX,
|
||||
false,
|
||||
),
|
||||
projectOverviewRefactor: parseEnvVarBoolean(
|
||||
process.env.UNLEASH_EXPERIMENTAL_PROJECT_OVERVIEW_REFACTOR,
|
||||
false,
|
||||
),
|
||||
disableShowContextFieldSelectionValues: parseEnvVarBoolean(
|
||||
process.env
|
||||
.UNLEASH_EXPERIMENTAL_DISABLE_SHOW_CONTEXT_FIELD_SELECTION_VALUES,
|
||||
|
@ -47,7 +47,6 @@ process.nextTick(async () => {
|
||||
executiveDashboardUI: true,
|
||||
userAccessUIEnabled: true,
|
||||
outdatedSdksBanner: true,
|
||||
projectOverviewRefactor: true,
|
||||
disableShowContextFieldSelectionValues: false,
|
||||
projectOverviewRefactorFeedback: true,
|
||||
featureLifecycle: true,
|
||||
|
Loading…
Reference in New Issue
Block a user