From 1386b1e1df14e0bbe0eab3821fb9f13d27c30591 Mon Sep 17 00:00:00 2001 From: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> Date: Tue, 5 Nov 2024 06:22:16 +1100 Subject: [PATCH] [8.x] [ML] Fix page header right side items flex responsiveness (#198625) (#198835) # Backport This will backport the following commits from `main` to `8.x`: - [[ML] Fix page header right side items flex responsiveness (#198625)](https://github.com/elastic/kibana/pull/198625) ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) Co-authored-by: Cee Chen <549407+cee-chen@users.noreply.github.com> --- .../components/page_header/page_header.tsx | 44 +++++++++--------- .../data_drift/data_drift_page.tsx | 46 +++++++++---------- 2 files changed, 45 insertions(+), 45 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 86bb350849a33..4623e886852d8 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 @@ -106,31 +106,31 @@ export const PageHeader: FC = ({ onRefresh, needsUpdate }) => { {dataView.getName()} } + rightSideGroupProps={{ + gutterSize: 's', + 'data-test-subj': 'dataComparisonTimeRangeSelectorSection', + }} rightSideItems={[ - - {hasValidTimeField ? ( - - - - ) : null} - , + hasValidTimeField && ( + - , - ]} + ), + ].filter(Boolean)} /> ); };