From 93bf7ced77aefb96cd313ed5bfc67fb9e3e9d2ec Mon Sep 17 00:00:00 2001 From: Michel Weststrate Date: Thu, 19 Mar 2020 08:40:13 -0700 Subject: [PATCH] Fix sidebar (and content) height Summary: When expanding the sidebar, sometimes the sign in / profile button would disappear, as the main content would be to height Reviewed By: passy Differential Revision: D20534482 fbshipit-source-id: 6248df501afcefc4afb6df3a6fd864462f8290e4 --- desktop/src/App.tsx | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/desktop/src/App.tsx b/desktop/src/App.tsx index 972210453..36e552584 100644 --- a/desktop/src/App.tsx +++ b/desktop/src/App.tsx @@ -8,7 +8,7 @@ */ import React from 'react'; -import {FlexColumn, FlexRow} from 'flipper'; +import {FlexColumn, FlexRow, styled} from 'flipper'; import {connect} from 'react-redux'; import TitleBar from './chrome/TitleBar'; import MainSidebar2 from './chrome/mainsidebar/MainSidebar2'; @@ -69,6 +69,11 @@ type DispatchProps = { setActiveSheet: typeof setActiveSheet; }; +const MainContent = styled(FlexRow)({ + height: 'calc(100vh - 38px)', +}); +MainContent.displayName = 'App:MainContent'; + type Props = StateFromProps & OwnProps & DispatchProps; export class App extends React.Component { @@ -155,7 +160,7 @@ export class App extends React.Component { {this.getSheet} - + {this.props.leftSidebarVisible && } {this.props.staticView != null ? ( React.createElement(this.props.staticView, { @@ -168,7 +173,7 @@ export class App extends React.Component { id="flipper-out-of-contents-container" style={{width: '100%', display: 'none'}} /> - + );