From 1241e78292af6a9b27529391dcd5e37e40869932 Mon Sep 17 00:00:00 2001 From: Cee Chen <549407+cee-chen@users.noreply.github.com> Date: Tue, 5 Nov 2024 10:26:59 -0800 Subject: [PATCH] [8.16] [ML] Fix page header right side items flex responsiveness (#198625) (#198882) # Backport This will backport the following commits from `main` to `8.16`: - [ML] Fix page header right side items flex responsiveness (#198625) (4fdc70bf) ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) --- .../components/page_header/page_header.tsx | 44 +++++++++---------- .../data_drift/data_drift_page.tsx | 42 +++++++++--------- 2 files changed, 43 insertions(+), 43 deletions(-) diff --git a/x-pack/plugins/aiops/public/components/page_header/page_header.tsx b/x-pack/plugins/aiops/public/components/page_header/page_header.tsx index 9895fe082fcc1..a01e715e86272 100644 --- a/x-pack/plugins/aiops/public/components/page_header/page_header.tsx +++ b/x-pack/plugins/aiops/public/components/page_header/page_header.tsx @@ -9,7 +9,7 @@ import { css } from '@emotion/react'; import type { FC } from 'react'; import React, { useCallback, useMemo } from 'react'; -import { EuiFlexGroup, EuiFlexItem, EuiPageHeader } from '@elastic/eui'; +import { EuiPageHeader } from '@elastic/eui'; import { useUrlState } from '@kbn/ml-url-state'; import { useStorage } from '@kbn/ml-local-storage'; @@ -71,29 +71,29 @@ export const PageHeader: FC = () => { return ( {dataView.getName()}} + rightSideGroupProps={{ + gutterSize: 's', + 'data-test-subj': 'aiopsTimeRangeSelectorSection', + }} rightSideItems={[ - - {hasValidTimeField ? ( - - - - ) : null} - , + hasValidTimeField && ( + - , - ]} + ), + ].filter(Boolean)} /> ); }; diff --git a/x-pack/plugins/data_visualizer/public/application/data_drift/data_drift_page.tsx b/x-pack/plugins/data_visualizer/public/application/data_drift/data_drift_page.tsx index 668ca7bf43f6e..956bb76d0973c 100644 --- a/x-pack/plugins/data_visualizer/public/application/data_drift/data_drift_page.tsx +++ b/x-pack/plugins/data_visualizer/public/application/data_drift/data_drift_page.tsx @@ -101,29 +101,29 @@ export const PageHeader: FC = () => { {dataView.getName()} } + rightSideGroupProps={{ + gutterSize: 's', + 'data-test-subj': 'dataComparisonTimeRangeSelectorSection', + }} rightSideItems={[ - - {hasValidTimeField ? ( - - - - ) : null} - , + hasValidTimeField && ( + - , - ]} + ), + ].filter(Boolean)} /> ); };