Fix regression in accessibility layout

Summary:
Fixes a regression (D21716761) in the layout of the accessibility inspector where the layout was accidentally switched from right to bottom.

Also made the region resizable while at it.

Changelog: Fix regression in the layout plugin where accessibility info was rendered in the wrong place

Reviewed By: cekkaewnumchai

Differential Revision: D21903760

fbshipit-source-id: 08623c17428e86ea77d8438e78766a308dbac1e6
This commit is contained in:
Michel Weststrate
2020-06-05 08:32:25 -07:00
committed by Facebook GitHub Bot
parent 95d319a700
commit db4c341eb3

View File

@@ -12,24 +12,17 @@ import {
Element, Element,
ElementSearchResultSet, ElementSearchResultSet,
PluginClient, PluginClient,
FlexRow,
FlipperPlugin, FlipperPlugin,
Toolbar, Toolbar,
DetailSidebar, DetailSidebar,
VerticalRule,
Button, Button,
GK, GK,
Idler, Idler,
Text,
styled,
colors,
SupportRequestFormV2,
constants,
ReduxState, ReduxState,
ArchivedDevice, ArchivedDevice,
ToolbarIcon, ToolbarIcon,
Layout, Layout,
Scrollable, Sidebar,
} from 'flipper'; } from 'flipper';
import Inspector from './Inspector'; import Inspector from './Inspector';
import InspectorSidebar from './InspectorSidebar'; import InspectorSidebar from './InspectorSidebar';
@@ -372,17 +365,14 @@ export default class LayoutPlugin extends FlipperPlugin<
); );
const axInspector = this.state.inAXMode ? ( const axInspector = this.state.inAXMode ? (
<FlexRow style={{height: '100%'}}> <Sidebar width={400} backgroundColor="white" position="right">
<VerticalRule />
<Scrollable>
<Inspector <Inspector
{...inspectorProps} {...inspectorProps}
onSelect={(selectedAXElement) => this.setState({selectedAXElement})} onSelect={(selectedAXElement) => this.setState({selectedAXElement})}
showsSidebar={true} showsSidebar={true}
ax ax
/> />
</Scrollable> </Sidebar>
</FlexRow>
) : null; ) : null;
const showAnalyzeYogaPerformanceButton = GK.get('flipper_yogaperformance'); const showAnalyzeYogaPerformanceButton = GK.get('flipper_yogaperformance');
@@ -440,10 +430,10 @@ export default class LayoutPlugin extends FlipperPlugin<
initialQuery={this.props.deepLinkPayload} initialQuery={this.props.deepLinkPayload}
/> />
</Toolbar> </Toolbar>
<Layout.Bottom> <Layout.Right>
{inspector} {inspector}
{axInspector} {axInspector}
</Layout.Bottom> </Layout.Right>
</Layout.Top> </Layout.Top>
<DetailSidebar> <DetailSidebar>