Switch flipper-out-of-contents-container to absolute position

Summary:
This diff updated the `flipper-out-of-contents` container to render with absolute position, which allows it to cover up all of the content in the plugin. This fixes an issue where content that exists in the plugin can be broken.

For example, the banner in the next diff would look like this:

{F237034745}

Reviewed By: mweststrate

Differential Revision: D21556849

fbshipit-source-id: 95ec4aac24ac995bd1c558123ef5da6087a40d0a
This commit is contained in:
Rick Hanlon
2020-05-15 05:16:34 -07:00
committed by Facebook GitHub Bot
parent d6844faebb
commit e23acc6f04

View File

@@ -68,6 +68,14 @@ type DispatchProps = {
const MainContent = styled(FlexRow)({ const MainContent = styled(FlexRow)({
height: 'calc(100vh - 38px)', height: 'calc(100vh - 38px)',
}); });
const PluginContent = styled(FlexRow)({
width: '100%',
height: '100%',
position: 'relative',
});
PluginContent.displayName = 'App:PluginContent';
MainContent.displayName = 'App:MainContent'; MainContent.displayName = 'App:MainContent';
type Props = StateFromProps & OwnProps & DispatchProps; type Props = StateFromProps & OwnProps & DispatchProps;
@@ -151,6 +159,7 @@ export class App extends React.Component<Props> {
<Sheet>{this.getSheet}</Sheet> <Sheet>{this.getSheet}</Sheet>
<MainContent> <MainContent>
{this.props.leftSidebarVisible && <MainSidebar2 />} {this.props.leftSidebarVisible && <MainSidebar2 />}
<PluginContent>
{this.props.staticView != null ? ( {this.props.staticView != null ? (
React.createElement(this.props.staticView, { React.createElement(this.props.staticView, {
logger: this.props.logger, logger: this.props.logger,
@@ -160,8 +169,16 @@ export class App extends React.Component<Props> {
)} )}
<div <div
id="flipper-out-of-contents-container" id="flipper-out-of-contents-container"
style={{width: '100%', display: 'none'}} style={{
display: 'none',
position: 'absolute',
right: 0,
bottom: 0,
left: 0,
top: 0,
}}
/> />
</PluginContent>
</MainContent> </MainContent>
<StatusBar /> <StatusBar />
</FlexColumn> </FlexColumn>