From c9d2acab083d2ed6dbe9c795a4b167226e756058 Mon Sep 17 00:00:00 2001 From: Pritesh Nandgaonkar Date: Tue, 26 May 2020 04:32:42 -0700 Subject: [PATCH] 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 --- desktop/plugins/layout/index.tsx | 48 ++------------------------------ 1 file changed, 3 insertions(+), 45 deletions(-) diff --git a/desktop/plugins/layout/index.tsx b/desktop/plugins/layout/index.tsx index 810dddefe..8b14daf1d 100644 --- a/desktop/plugins/layout/index.tsx +++ b/desktop/plugins/layout/index.tsx @@ -61,23 +61,6 @@ export type PersistedState = { elements: 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 ClientMethodCalls = 'getRoot' | 'getAXRoot' | ClientGetNodesCalls; @@ -86,25 +69,6 @@ export default class LayoutPlugin extends FlipperPlugin< any, PersistedState > { - FlipperADBar() { - return ( - - - 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. - - { - this.props.setStaticView(SupportRequestFormV2); - }}> - Try it out - - - ); - } - static exportPersistedState = async ( callClient: (method: ClientMethodCalls, params?: any) => Promise, persistedState: PersistedState | undefined, @@ -338,7 +302,6 @@ export default class LayoutPlugin extends FlipperPlugin< ax: this.state.inAXMode, }); }; - showFlipperADBar: boolean = true; getScreenDimensions(): {width: number; height: number} | null { if (this.state.screenDimensions) { @@ -399,9 +362,7 @@ export default class LayoutPlugin extends FlipperPlugin< } else if (selectedElement) { element = this.props.persistedState.elements[selectedElement]; } - if (!constants.IS_PUBLIC_BUILD && !this.showFlipperADBar) { - this.showFlipperADBar = element != null && element.decoration === 'litho'; - } + const inspector = ( - - {inspector} - {axInspector} - - {this.showFlipperADBar ? this.FlipperADBar() : null} + {inspector} + {axInspector}