Skip to content
Snippets Groups Projects
Commit 28976cd5 authored by Tom Robinson's avatar Tom Robinson
Browse files

Fix dashboard height issues, remove old hack

parent a0846215
No related branches found
No related tags found
No related merge requests found
......@@ -39,7 +39,7 @@ export default class LoadingAndErrorWrapper extends Component {
"bg-white": !this.props.noBackground
});
return (
<div className={this.props.className}>
<div {...this.props}>
{ this.props.error ?
<div className={contentClassName}>
<h2 className="text-normal text-grey-2">{this.getErrorMessage()}</h2>
......
......@@ -52,9 +52,6 @@ export default class Dashboard extends Component {
};
async componentDidMount() {
// HACK: apply a css class to the page body so that we can ensure the bg-color is maintained
document.body.classList.add("MB-lightBG");
this.loadParams();
try {
......@@ -90,8 +87,6 @@ export default class Dashboard extends Component {
}
componentWillUnmount() {
// HACK: remove our bg-color css applied when component mounts
document.body.classList.remove("MB-lightBG");
document.querySelector(".Nav").classList.remove("hide");
this._clearRefreshInterval();
document.removeEventListener(screenfull.raw.fullscreenchange, this.fullScreenChanged);
......@@ -191,7 +186,7 @@ export default class Dashboard extends Component {
let { error, isFullscreen, isNightMode } = this.state;
isNightMode = isNightMode && isFullscreen;
return (
<LoadingAndErrorWrapper className={cx("Dashboard full-height", { "Dashboard--fullscreen": isFullscreen, "Dashboard--night": isNightMode})} loading={!dashboard} error={error}>
<LoadingAndErrorWrapper style={{ minHeight: "100vh" }} className={cx("Dashboard", { "Dashboard--fullscreen": isFullscreen, "Dashboard--night": isNightMode})} loading={!dashboard} error={error}>
{() =>
<div className="full" style={{ overflowX: "hidden" }}>
<header className="DashboardHeader relative z2 px1">
......
......@@ -8,7 +8,7 @@ var Dashboard = angular.module('metabase.dashboard', [
Dashboard.config(['$routeProvider', function ($routeProvider) {
$routeProvider.when('/dash/:dashId', {
template: '<div mb-redux-component class="flex flex-column flex-full" />',
template: '<div mb-redux-component />',
controller: 'Dashboard',
reloadOnSearch: false
});
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment