From 6b0a6ad57519b4c8370fa2ce4c0a8df8f626e04a Mon Sep 17 00:00:00 2001 From: Ashwin P Chandran Date: Mon, 2 Oct 2023 08:21:54 +0000 Subject: [PATCH] fixes mobile view Signed-off-by: Ashwin P Chandran --- CHANGELOG.md | 1 + .../components/sidebar/discover_field.scss | 4 ++ .../view_components/canvas/index.tsx | 42 +++++++++---------- .../view_components/canvas/top_nav.tsx | 7 +--- 4 files changed, 27 insertions(+), 27 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e68bef7a87e8..cd110ffa6668 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -56,6 +56,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) - [BUG] Fix buildPointSeriesData unit test fails due to local timezone ([#4992](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/4992)) - [BUG][Data Explorer][Discover] Fix total hits issue for no time based data ([#5087](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/5087)) - [BUG][Discover] Fix misc navigation issues ([#5168](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/5168)) +- [BUG][Discover] Fixes mobile view ([#5168](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/5168)) ### 🚞 Infrastructure diff --git a/src/plugins/discover/public/application/components/sidebar/discover_field.scss b/src/plugins/discover/public/application/components/sidebar/discover_field.scss index 643f74b809c2..5512136431b4 100644 --- a/src/plugins/discover/public/application/components/sidebar/discover_field.scss +++ b/src/plugins/discover/public/application/components/sidebar/discover_field.scss @@ -11,4 +11,8 @@ &:focus { opacity: 1; } + + @include ouiBreakpoint("xs", "s", "m") { + opacity: 1; + } } diff --git a/src/plugins/discover/public/application/view_components/canvas/index.tsx b/src/plugins/discover/public/application/view_components/canvas/index.tsx index 3c25e5a221dc..7ae0b1eaa899 100644 --- a/src/plugins/discover/public/application/view_components/canvas/index.tsx +++ b/src/plugins/discover/public/application/view_components/canvas/index.tsx @@ -4,7 +4,7 @@ */ import React, { useEffect, useState, useRef } from 'react'; -import { EuiFlexGroup, EuiFlexItem, EuiPanel } from '@elastic/eui'; +import { EuiFlexGroup, EuiFlexItem, EuiPage, EuiPanel } from '@elastic/eui'; import { TopNav } from './top_nav'; import { ViewProps } from '../../../../../data_explorer/public'; import { DiscoverTable } from './discover_table'; @@ -69,18 +69,20 @@ export default function DiscoverCanvas({ setHeaderActionMenu, history }: ViewPro const timeField = indexPattern?.timeFieldName ? indexPattern.timeFieldName : undefined; return ( - - - - + + {status === ResultStatus.NO_RESULTS && ( - - - + )} {status === ResultStatus.UNINITIALIZED && ( refetch$.next()} /> @@ -88,18 +90,14 @@ export default function DiscoverCanvas({ setHeaderActionMenu, history }: ViewPro {status === ResultStatus.LOADING && } {status === ResultStatus.READY && ( <> - - - - - + + + - - - - + + )} - + ); } diff --git a/src/plugins/discover/public/application/view_components/canvas/top_nav.tsx b/src/plugins/discover/public/application/view_components/canvas/top_nav.tsx index 4a8ebfb1bf29..2a6355e4e139 100644 --- a/src/plugins/discover/public/application/view_components/canvas/top_nav.tsx +++ b/src/plugins/discover/public/application/view_components/canvas/top_nav.tsx @@ -60,12 +60,9 @@ export const TopNav = ({ opts }: TopNavProps) => { chrome.docTitle.change(`Discover${pageTitleSuffix}`); if (savedSearch?.id) { - chrome.setBreadcrumbs([ - ...getRootBreadcrumbs(getUrlForApp(PLUGIN_ID)), - { text: savedSearch.title }, - ]); + chrome.setBreadcrumbs([...getRootBreadcrumbs(), { text: savedSearch.title }]); } else { - chrome.setBreadcrumbs([...getRootBreadcrumbs(getUrlForApp(PLUGIN_ID))]); + chrome.setBreadcrumbs([...getRootBreadcrumbs()]); } }, [chrome, getUrlForApp, savedSearch?.id, savedSearch?.title]);