From 07b049eaea2ddae7864a69dac3a1a40d9190b773 Mon Sep 17 00:00:00 2001 From: Alex Paxton Date: Wed, 12 Sep 2018 11:19:34 -0700 Subject: [PATCH] Fix the Tiniest Header (#4420) * Use correct percentage in page header sizing * Use PageHeader instead of raw markup * Change sidenav item to match page header --- ui/src/data_explorer/components/DEHeader.tsx | 89 +++++++++---------- .../components/page_layout/PageHeaderLeft.tsx | 2 +- .../page_layout/PageHeaderRight.tsx | 2 +- ui/src/side_nav/containers/SideNav.tsx | 2 +- 4 files changed, 47 insertions(+), 48 deletions(-) diff --git a/ui/src/data_explorer/components/DEHeader.tsx b/ui/src/data_explorer/components/DEHeader.tsx index 52645d95c..005ff365e 100644 --- a/ui/src/data_explorer/components/DEHeader.tsx +++ b/ui/src/data_explorer/components/DEHeader.tsx @@ -2,7 +2,7 @@ import React, {Component} from 'react' // Components -import {Radio, ButtonShape} from 'src/reusable_ui' +import {Page, Radio, ButtonShape} from 'src/reusable_ui' import GraphTips from 'src/shared/components/GraphTips' import Authorized, {EDITOR_ROLE} from 'src/auth/Authorized' @@ -35,52 +35,51 @@ class DEHeader extends Component { } = this.props return ( -
-
-
Explore
-
- - - Queries - - - Visualization - - -
- -
- - + + - - - -
-
-
+ + + ) } } diff --git a/ui/src/reusable_ui/components/page_layout/PageHeaderLeft.tsx b/ui/src/reusable_ui/components/page_layout/PageHeaderLeft.tsx index 40aac81c3..9fd0a5f40 100644 --- a/ui/src/reusable_ui/components/page_layout/PageHeaderLeft.tsx +++ b/ui/src/reusable_ui/components/page_layout/PageHeaderLeft.tsx @@ -47,7 +47,7 @@ class PageHeaderLeft extends Component { } return { - flex: `1 0 calc(100% - ${offsetPixels}px)`, + flex: `1 0 calc(50% - ${offsetPixels}px)`, } } } diff --git a/ui/src/reusable_ui/components/page_layout/PageHeaderRight.tsx b/ui/src/reusable_ui/components/page_layout/PageHeaderRight.tsx index 544f0730b..499e150cc 100644 --- a/ui/src/reusable_ui/components/page_layout/PageHeaderRight.tsx +++ b/ui/src/reusable_ui/components/page_layout/PageHeaderRight.tsx @@ -48,7 +48,7 @@ class PageHeaderRight extends Component { } return { - flex: `1 0 calc(100% - ${offsetPixels}px)`, + flex: `1 0 calc(50% - ${offsetPixels}px)`, } } } diff --git a/ui/src/side_nav/containers/SideNav.tsx b/ui/src/side_nav/containers/SideNav.tsx index e08e6e9bb..a03cfe8ed 100644 --- a/ui/src/side_nav/containers/SideNav.tsx +++ b/ui/src/side_nav/containers/SideNav.tsx @@ -82,7 +82,7 @@ class SideNav extends PureComponent { link={dataExplorerLink} location={location} > - +