From 15ac76a47bc218bea6b1c30787cbfbf2ac7c1aaf Mon Sep 17 00:00:00 2001 From: Alex Khomenko Date: Tue, 12 May 2020 17:10:48 +0300 Subject: [PATCH] Search: Safari UI fixes (#24567) * Search: Add height: 100% to page containers * Search: Reset TagOption display to block * Search: Add title to result list * Search: Use flex-basis vs height * Search: Remove IconButton * Search: Do not shrink select options * Search: Fix hasEditPermissionInFolders * Search: Update tests * Search: Fix prop * Remove select wrapper class * Update snapshot --- packages/grafana-ui/src/components/Drawer/Drawer.tsx | 1 + .../grafana-ui/src/components/Select/getSelectStyles.ts | 1 + public/app/core/components/TagFilter/TagOption.tsx | 3 --- public/app/core/services/search_srv.ts | 2 +- public/app/features/alerting/AlertRuleList.tsx | 2 +- .../alerting/__snapshots__/AlertRuleList.test.tsx.snap | 4 ++-- public/app/features/search/components/ManageDashboards.tsx | 1 + .../search/components/SearchResultsFilter.test.tsx | 1 + .../app/features/search/components/SearchResultsFilter.tsx | 4 +++- public/app/features/search/components/SectionHeader.tsx | 7 ++----- public/app/features/search/hooks/useManageDashboards.ts | 2 +- public/sass/layout/_page.scss | 2 ++ 12 files changed, 16 insertions(+), 14 deletions(-) diff --git a/packages/grafana-ui/src/components/Drawer/Drawer.tsx b/packages/grafana-ui/src/components/Drawer/Drawer.tsx index 7ec37aa2521..a5fedb24245 100644 --- a/packages/grafana-ui/src/components/Drawer/Drawer.tsx +++ b/packages/grafana-ui/src/components/Drawer/Drawer.tsx @@ -63,6 +63,7 @@ const getStyles = stylesFactory((theme: GrafanaTheme, scollableContent: boolean) flex-grow: 1; overflow: ${!scollableContent ? 'hidden' : 'auto'}; z-index: 0; + height: 100%; `, }; }); diff --git a/packages/grafana-ui/src/components/Select/getSelectStyles.ts b/packages/grafana-ui/src/components/Select/getSelectStyles.ts index 38ca6a795d5..b1d899b87da 100644 --- a/packages/grafana-ui/src/components/Select/getSelectStyles.ts +++ b/packages/grafana-ui/src/components/Select/getSelectStyles.ts @@ -22,6 +22,7 @@ export const getSelectStyles = stylesFactory((theme: GrafanaTheme) => { display: flex; align-items: center; flex-direction: row; + flex-shrink: 0; white-space: nowrap; cursor: pointer; border-left: 2px solid transparent; diff --git a/public/app/core/components/TagFilter/TagOption.tsx b/public/app/core/components/TagFilter/TagOption.tsx index 07a3e9e8037..b8be8846173 100644 --- a/public/app/core/components/TagFilter/TagOption.tsx +++ b/public/app/core/components/TagFilter/TagOption.tsx @@ -28,9 +28,6 @@ const getStyles = stylesFactory((theme: GrafanaTheme) => { return { option: css` padding: 8px; - display: flex; - align-items: center; - flex-direction: row; white-space: nowrap; cursor: pointer; border-left: 2px solid transparent; diff --git a/public/app/core/services/search_srv.ts b/public/app/core/services/search_srv.ts index 57716413ed7..2e2243959c0 100644 --- a/public/app/core/services/search_srv.ts +++ b/public/app/core/services/search_srv.ts @@ -71,7 +71,7 @@ export class SearchSrv { if (query.layout === SearchLayout.List) { return backendSrv .search({ ...query, type: DashboardSearchItemType.DashDB }) - .then(results => (results.length ? [{ items: results }] : [])); + .then(results => (results.length ? [{ title: '', items: results }] : [])); } if (!filters) { diff --git a/public/app/features/alerting/AlertRuleList.tsx b/public/app/features/alerting/AlertRuleList.tsx index d8f0ca4b8bf..30f427c0992 100644 --- a/public/app/features/alerting/AlertRuleList.tsx +++ b/public/app/features/alerting/AlertRuleList.tsx @@ -108,7 +108,7 @@ export class AlertRuleList extends PureComponent {
-
+