From 2288609195a8c63d9482abfba03616f168c217e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torkel=20=C3=96degaard?= Date: Tue, 16 Jun 2020 16:33:25 +0200 Subject: [PATCH] Dashboard: Refactor container css to use flex for height instead of calc (#24009) * Dashboard: Ability to hide dashboard toolbar * Updated snapshot --- .../dashboard/containers/DashboardPage.tsx | 18 +++++++----------- .../__snapshots__/DashboardPage.test.tsx.snap | 16 ++++++++++------ public/sass/components/_dashboard_grid.scss | 8 +------- public/sass/components/_panel_editor.scss | 10 ---------- public/sass/pages/_dashboard.scss | 19 +++++++++++++++++-- 5 files changed, 35 insertions(+), 36 deletions(-) diff --git a/public/app/features/dashboard/containers/DashboardPage.tsx b/public/app/features/dashboard/containers/DashboardPage.tsx index 4da79352e64..92a450a3324 100644 --- a/public/app/features/dashboard/containers/DashboardPage.tsx +++ b/public/app/features/dashboard/containers/DashboardPage.tsx @@ -3,7 +3,7 @@ import $ from 'jquery'; import React, { MouseEvent, PureComponent } from 'react'; import { hot } from 'react-hot-loader'; import { connect } from 'react-redux'; -import classNames from 'classnames'; + // Services & Utils import { createErrorNotification } from 'app/core/copy/appNotification'; import { getMessageFromError } from 'app/core/utils/errors'; @@ -282,19 +282,15 @@ export class DashboardPage extends PureComponent { return null; } - const gridWrapperClasses = classNames({ - 'dashboard-container': true, - 'dashboard-container--has-submenu': dashboard.meta.submenuEnabled, - }); - // Only trigger render when the scroll has moved by 25 const approximateScrollTop = Math.round(scrollTop / 25) * 25; const inspectPanel = this.getInspectPanel(); return ( -
+
-
+ +
{ updateAfterMountMs={500} className="custom-scrollbar--page" > - {initError && this.renderInitFailedState()} - -
+
+ {initError && this.renderInitFailedState()} {!editPanel && } + +
+