From 5df074bd146434a6a16f674e91ad9a171c48894b Mon Sep 17 00:00:00 2001 From: Thomas Heartman Date: Tue, 27 May 2025 13:00:08 +0100 Subject: [PATCH] Remove entire row for median time to production (#10034) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Removes the "median time to production" snapshot + graph when the lifecycleMetrics flag is active. In other words: this entire box is gone 💨 image --- .../src/component/insights/InsightsCharts.tsx | 44 ++++++++++--------- 1 file changed, 24 insertions(+), 20 deletions(-) diff --git a/frontend/src/component/insights/InsightsCharts.tsx b/frontend/src/component/insights/InsightsCharts.tsx index 1c53bb5bab..26ce5c245c 100644 --- a/frontend/src/component/insights/InsightsCharts.tsx +++ b/frontend/src/component/insights/InsightsCharts.tsx @@ -18,6 +18,7 @@ import { allOption } from 'component/common/ProjectSelect/ProjectSelect'; import useUiConfig from 'hooks/api/getters/useUiConfig/useUiConfig'; import { WidgetTitle } from './components/WidgetTitle/WidgetTitle.tsx'; import { ConditionallyRender } from 'component/common/ConditionallyRender/ConditionallyRender'; +import { useUiFlag } from 'hooks/useUiFlag.ts'; export interface IChartsProps { flagTrends: InstanceInsightsSchema['flagTrends']; @@ -104,6 +105,7 @@ export const InsightsCharts: FC = ({ const showAllProjects = projects[0] === allOption.id; const isOneProjectSelected = projects.length === 1; const { isEnterprise } = useUiConfig(); + const showMedianTimeToProduction = !useUiFlag('lifecycleMetrics'); const lastUserTrend = userTrends[userTrends.length - 1]; const lastFlagTrend = flagTrends[flagTrends.length - 1]; @@ -205,26 +207,28 @@ export const InsightsCharts: FC = ({ /> - - - - - - - - - + {showMedianTimeToProduction ? ( + + + + + + + + + + ) : null} } />