sidebar
Summary: Before, the a11y inspector was in a sidebar. This changes the actual view hierarchy to be in a sidebar on the left side. This doesn't make an actual difference for the user, but helps to fix the scrolling issues in D14209815 Reviewed By: jknoxville Differential Revision: D14209812 fbshipit-source-id: 414e8fd34c889cdce2dd3776727dd4a3a59efeb5
This commit is contained in:
committed by
Facebook Github Bot
parent
5f5a38f1fe
commit
0d0da3df24
@@ -135,6 +135,14 @@ export default class Layout extends FlipperPlugin<State, void, PersistedState> {
|
|||||||
element = this.props.persistedState.elements[this.state.selectedElement];
|
element = this.props.persistedState.elements[this.state.selectedElement];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const inspector = (
|
||||||
|
<Inspector
|
||||||
|
{...inspectorProps}
|
||||||
|
onSelect={selectedElement => this.setState({selectedElement})}
|
||||||
|
showsSidebar={!this.state.inAXMode}
|
||||||
|
/>
|
||||||
|
);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<FlexColumn grow={true}>
|
<FlexColumn grow={true}>
|
||||||
{this.state.init && (
|
{this.state.init && (
|
||||||
@@ -172,13 +180,11 @@ export default class Layout extends FlipperPlugin<State, void, PersistedState> {
|
|||||||
</Toolbar>
|
</Toolbar>
|
||||||
|
|
||||||
<FlexRow grow={true}>
|
<FlexRow grow={true}>
|
||||||
<Inspector
|
{this.state.inAXMode ? (
|
||||||
{...inspectorProps}
|
<>
|
||||||
onSelect={selectedElement => this.setState({selectedElement})}
|
<Sidebar position="left" maxWidth={Infinity}>
|
||||||
showsSidebar={!this.state.inAXMode}
|
{inspector}
|
||||||
/>
|
</Sidebar>
|
||||||
{this.state.inAXMode && (
|
|
||||||
<Sidebar position="right" width={400}>
|
|
||||||
<Inspector
|
<Inspector
|
||||||
{...inspectorProps}
|
{...inspectorProps}
|
||||||
onSelect={selectedAXElement =>
|
onSelect={selectedAXElement =>
|
||||||
@@ -187,7 +193,9 @@ export default class Layout extends FlipperPlugin<State, void, PersistedState> {
|
|||||||
showsSidebar={true}
|
showsSidebar={true}
|
||||||
ax
|
ax
|
||||||
/>
|
/>
|
||||||
</Sidebar>
|
</>
|
||||||
|
) : (
|
||||||
|
inspector
|
||||||
)}
|
)}
|
||||||
</FlexRow>
|
</FlexRow>
|
||||||
<DetailSidebar>
|
<DetailSidebar>
|
||||||
|
|||||||
Reference in New Issue
Block a user