From 7e52da11bc90e2d7e4ccd132a9a122444d6f782b Mon Sep 17 00:00:00 2001 From: Thomas Heartman Date: Fri, 6 Sep 2024 11:47:59 +0200 Subject: [PATCH] fix: Also display strategy variant information on default strategies (#8115) This change copies (and then simplifies) the strategy variant display logic from `frontend/src/component/feature/FeatureView/FeatureOverview/FeatureOverviewEnvironments/FeatureOverviewEnvironment/EnvironmentAccordionBody/StrategyDraggableItem/StrategyItem/StrategyItem.tsx` and inserts it into the `ProjectEnvironmentDefaultStrategy` component. Before: ![image](https://github.com/user-attachments/assets/c00098c3-3161-4a89-a6cf-8db711b4fb3e) After: ![image](https://github.com/user-attachments/assets/4fdd46f1-97a4-4344-98e1-16c842947a1c) --- .../ProjectEnvironmentDefaultStrategy.tsx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/frontend/src/component/project/Project/ProjectSettings/ProjectDefaultStrategySettings/ProjectEnvironment/ProjectEnvironmentDefaultStrategy/ProjectEnvironmentDefaultStrategy.tsx b/frontend/src/component/project/Project/ProjectSettings/ProjectDefaultStrategySettings/ProjectEnvironment/ProjectEnvironmentDefaultStrategy/ProjectEnvironmentDefaultStrategy.tsx index e7786bf2b5..16a383a5a0 100644 --- a/frontend/src/component/project/Project/ProjectSettings/ProjectDefaultStrategySettings/ProjectEnvironment/ProjectEnvironmentDefaultStrategy/ProjectEnvironmentDefaultStrategy.tsx +++ b/frontend/src/component/project/Project/ProjectSettings/ProjectDefaultStrategySettings/ProjectEnvironment/ProjectEnvironmentDefaultStrategy/ProjectEnvironmentDefaultStrategy.tsx @@ -8,6 +8,7 @@ import { StrategyExecution } from 'component/feature/FeatureView/FeatureOverview import type { ProjectEnvironmentType } from 'interfaces/environments'; import { useMemo } from 'react'; import type { CreateFeatureStrategySchema } from 'openapi'; +import SplitPreviewSlider from 'component/feature/StrategyTypes/SplitPreviewSlider/SplitPreviewSlider'; interface ProjectEnvironmentDefaultStrategyProps { environment: ProjectEnvironmentType; @@ -75,6 +76,10 @@ const ProjectEnvironmentDefaultStrategy = ({ } > + + {strategy.variants && strategy.variants.length > 0 ? ( + + ) : null} );