Remove flipper AD bar
Summary: This diff removes the FlipperAD bar which is shown in the layout inspector. Fixes [this](https://fb.workplace.com/groups/flippersupport/permalink/881019929045333/) Reviewed By: passy Differential Revision: D21716761 fbshipit-source-id: 503fc0002d137032c9a40853f7eeea599d65acea
This commit is contained in:
committed by
Facebook GitHub Bot
parent
b3b49552c3
commit
c9d2acab08
@@ -61,23 +61,6 @@ export type PersistedState = {
|
|||||||
elements: ElementMap;
|
elements: ElementMap;
|
||||||
AXelements: ElementMap;
|
AXelements: ElementMap;
|
||||||
};
|
};
|
||||||
|
|
||||||
const FlipperADBarContainer = styled(FlexRow)({
|
|
||||||
backgroundColor: colors.warningTint,
|
|
||||||
flexGrow: 1,
|
|
||||||
justifyContent: 'center',
|
|
||||||
alignItems: 'center',
|
|
||||||
borderWidth: 2,
|
|
||||||
});
|
|
||||||
|
|
||||||
const FlipperADText = styled(Text)({
|
|
||||||
padding: 10,
|
|
||||||
});
|
|
||||||
|
|
||||||
const FlipperADButton = styled(Button)({
|
|
||||||
margin: 10,
|
|
||||||
});
|
|
||||||
|
|
||||||
type ClientGetNodesCalls = 'getNodes' | 'getAXNodes';
|
type ClientGetNodesCalls = 'getNodes' | 'getAXNodes';
|
||||||
type ClientMethodCalls = 'getRoot' | 'getAXRoot' | ClientGetNodesCalls;
|
type ClientMethodCalls = 'getRoot' | 'getAXRoot' | ClientGetNodesCalls;
|
||||||
|
|
||||||
@@ -86,25 +69,6 @@ export default class LayoutPlugin extends FlipperPlugin<
|
|||||||
any,
|
any,
|
||||||
PersistedState
|
PersistedState
|
||||||
> {
|
> {
|
||||||
FlipperADBar() {
|
|
||||||
return (
|
|
||||||
<FlipperADBarContainer>
|
|
||||||
<FlipperADText>
|
|
||||||
You can now submit support requests to Litho Group from Flipper. This
|
|
||||||
automatically attaches critical information for reproducing your issue
|
|
||||||
with just a single click.
|
|
||||||
</FlipperADText>
|
|
||||||
<FlipperADButton
|
|
||||||
type="primary"
|
|
||||||
onClick={() => {
|
|
||||||
this.props.setStaticView(SupportRequestFormV2);
|
|
||||||
}}>
|
|
||||||
Try it out
|
|
||||||
</FlipperADButton>
|
|
||||||
</FlipperADBarContainer>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
static exportPersistedState = async (
|
static exportPersistedState = async (
|
||||||
callClient: (method: ClientMethodCalls, params?: any) => Promise<any>,
|
callClient: (method: ClientMethodCalls, params?: any) => Promise<any>,
|
||||||
persistedState: PersistedState | undefined,
|
persistedState: PersistedState | undefined,
|
||||||
@@ -338,7 +302,6 @@ export default class LayoutPlugin extends FlipperPlugin<
|
|||||||
ax: this.state.inAXMode,
|
ax: this.state.inAXMode,
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
showFlipperADBar: boolean = true;
|
|
||||||
|
|
||||||
getScreenDimensions(): {width: number; height: number} | null {
|
getScreenDimensions(): {width: number; height: number} | null {
|
||||||
if (this.state.screenDimensions) {
|
if (this.state.screenDimensions) {
|
||||||
@@ -399,9 +362,7 @@ export default class LayoutPlugin extends FlipperPlugin<
|
|||||||
} else if (selectedElement) {
|
} else if (selectedElement) {
|
||||||
element = this.props.persistedState.elements[selectedElement];
|
element = this.props.persistedState.elements[selectedElement];
|
||||||
}
|
}
|
||||||
if (!constants.IS_PUBLIC_BUILD && !this.showFlipperADBar) {
|
|
||||||
this.showFlipperADBar = element != null && element.decoration === 'litho';
|
|
||||||
}
|
|
||||||
const inspector = (
|
const inspector = (
|
||||||
<Inspector
|
<Inspector
|
||||||
{...inspectorProps}
|
{...inspectorProps}
|
||||||
@@ -480,11 +441,8 @@ export default class LayoutPlugin extends FlipperPlugin<
|
|||||||
/>
|
/>
|
||||||
</Toolbar>
|
</Toolbar>
|
||||||
<Layout.Bottom>
|
<Layout.Bottom>
|
||||||
<Layout.Right>
|
|
||||||
{inspector}
|
{inspector}
|
||||||
{axInspector}
|
{axInspector}
|
||||||
</Layout.Right>
|
|
||||||
{this.showFlipperADBar ? this.FlipperADBar() : null}
|
|
||||||
</Layout.Bottom>
|
</Layout.Bottom>
|
||||||
</Layout.Top>
|
</Layout.Top>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user