diff --git a/x-pack/plugins/observability_solution/observability_onboarding/public/application/onboarding_flow_form/onboarding_flow_form.tsx b/x-pack/plugins/observability_solution/observability_onboarding/public/application/onboarding_flow_form/onboarding_flow_form.tsx index 396d3280ca47f..7fa3501c94ec9 100644 --- a/x-pack/plugins/observability_solution/observability_onboarding/public/application/onboarding_flow_form/onboarding_flow_form.tsx +++ b/x-pack/plugins/observability_solution/observability_onboarding/public/application/onboarding_flow_form/onboarding_flow_form.tsx @@ -18,9 +18,10 @@ import { EuiFlexItem, EuiCard, EuiIcon, - EuiFlexGrid, EuiAvatar, useEuiTheme, + EuiFlexGrid, + useGeneratedHtmlId, } from '@elastic/eui'; interface UseCaseOption { @@ -37,39 +38,12 @@ export const OnboardingFlowForm: FunctionComponent = () => { 'xpack.observability_onboarding.experimentalOnboardingFlow.euiCheckableCard.collectAndAnalyzeMyLabel', { defaultMessage: 'Collect and analyze my logs' } ), - description: ( - + description: i18n.translate( + 'xpack.observability_onboarding.onboardingFlowForm.detectPatternsAndOutliersLabel', + { + defaultMessage: + 'Detect patterns, troubleshoot in real time, gain insights from logs.', + } ), }, { @@ -78,45 +52,12 @@ export const OnboardingFlowForm: FunctionComponent = () => { 'xpack.observability_onboarding.experimentalOnboardingFlow.euiCheckableCard.monitorMyApplicationPerformanceLabel', { defaultMessage: 'Monitor my application performance' } ), - description: ( - + description: i18n.translate( + 'xpack.observability_onboarding.onboardingFlowForm.captureAndAnalyzeDistributedLabel', + { + defaultMessage: + 'Collect distributed traces and catch application performance problems.', + } ), }, { @@ -125,48 +66,18 @@ export const OnboardingFlowForm: FunctionComponent = () => { 'xpack.observability_onboarding.experimentalOnboardingFlow.euiCheckableCard.monitorMyInfrastructureLabel', { defaultMessage: 'Monitor my infrastructure' } ), - description: ( - + description: i18n.translate( + 'xpack.observability_onboarding.onboardingFlowForm.builtOnPowerfulElasticsearchLabel', + { + defaultMessage: + 'Stream infrastructure metrics and accelerate root cause detection by breaking down silos.', + } ), }, ]; + const radioGroupId = useGeneratedHtmlId({ prefix: 'onboardingUseCase' }); const [selectedId, setSelectedId] = useState(); - const [hoveredId, setHoveredId] = useState(); - - const visibleOption = hoveredId - ? options.find((option) => option.id === hoveredId) - : selectedId - ? options.find((option) => option.id === selectedId) - : undefined; const { euiTheme } = useEuiTheme(); @@ -183,34 +94,30 @@ export const OnboardingFlowForm: FunctionComponent = () => { )} /> - - - {options.map((option, index) => ( -
setHoveredId(option.id)} - onMouseLeave={() => setHoveredId(undefined)} - > - {/* Using EuiSpacer instead of EuiFlexGroup to ensure spacing is part of hit area for mouse hover effect */} - {index > 0 && } - setSelectedId(option.id)} - /> -
- ))} -
- - {visibleOption && ( - - - {visibleOption.description} - - - )} - + + {options.map((option, index) => ( + + + {option.label} + + + {option.description} + + + } + checked={selectedId === option.id} + onChange={() => setSelectedId(option.id)} + /> + + ))} {selectedId && (