From 13c589724b9d8e7c666e0a5a719642e0626e25d6 Mon Sep 17 00:00:00 2001 From: Luke De Feo Date: Wed, 14 Jun 2023 03:27:23 -0700 Subject: [PATCH] Dont show layout tab for android Summary: Feedback from michel, It is always empty for android so dont show it Reviewed By: elboman Differential Revision: D46152985 fbshipit-source-id: 6c4f1d499ddb8916fdae6015cd57e158a0c1f182 --- .../public/ui-debugger/components/main.tsx | 1 + .../components/sidebar/Inspector.tsx | 58 ++++++++++++------- desktop/plugins/public/ui-debugger/index.tsx | 4 +- 3 files changed, 40 insertions(+), 23 deletions(-) diff --git a/desktop/plugins/public/ui-debugger/components/main.tsx b/desktop/plugins/public/ui-debugger/components/main.tsx index ae0c75a0d..5eeab1107 100644 --- a/desktop/plugins/public/ui-debugger/components/main.tsx +++ b/desktop/plugins/public/ui-debugger/components/main.tsx @@ -106,6 +106,7 @@ export function Component() { ; metadata: Map; showExtra: (element: ReactNode) => void; }; -export const Inspector: React.FC = ({nodes, metadata, showExtra}) => { +export const Inspector: React.FC = ({ + os, + nodes, + metadata, + showExtra, +}) => { const instance = usePlugin(plugin); const selectedNodeId = useValue(instance.uiState.selectedNode); const frameworkEvents = useValue(instance.frameworkEvents); @@ -69,25 +83,27 @@ export const Inspector: React.FC = ({nodes, metadata, showExtra}) => { metadata={metadata} /> - - - - - - }> - - + {os !== 'Android' && ( + + + + + + }> + + + )} {selectedFrameworkEvents && ( ) { const streamInterceptor = getStreamInterceptor(); let lastFrameTime = 0; - const device = client.device.os; + const os = client.device.os; client.onMessage('init', (event) => { rootId.set(event.rootId); @@ -354,7 +354,7 @@ export function plugin(client: PluginClient) { perfEvents, setPlayPause, queryClient, - device, + os, }; }