From 272d2d21064096e6144308108dc63e9f1a0dc7b7 Mon Sep 17 00:00:00 2001 From: Luke De Feo Date: Wed, 26 Jul 2023 03:22:38 -0700 Subject: [PATCH] Redesign Split Tree and visualiser into panels Summary: This looks a lot neater and allows us to have separate dedicated visualiser header Reviewed By: mweststrate Differential Revision: D47626867 fbshipit-source-id: 843721853e0ff88837afbb9bf3f510a908160d12 --- .../ui-debugger/components/Controls.tsx | 2 +- .../components/Visualization2D.tsx | 2 + .../public/ui-debugger/components/main.tsx | 78 ++++++++++--------- .../ui-debugger/components/tree/Tree.tsx | 1 + 4 files changed, 46 insertions(+), 37 deletions(-) diff --git a/desktop/plugins/public/ui-debugger/components/Controls.tsx b/desktop/plugins/public/ui-debugger/components/Controls.tsx index 3085a4553..a34f17732 100644 --- a/desktop/plugins/public/ui-debugger/components/Controls.tsx +++ b/desktop/plugins/public/ui-debugger/components/Controls.tsx @@ -44,7 +44,7 @@ export const Controls: React.FC = () => { useState(false); return ( - + { diff --git a/desktop/plugins/public/ui-debugger/components/Visualization2D.tsx b/desktop/plugins/public/ui-debugger/components/Visualization2D.tsx index 6a82fbbb8..46d237a68 100644 --- a/desktop/plugins/public/ui-debugger/components/Visualization2D.tsx +++ b/desktop/plugins/public/ui-debugger/components/Visualization2D.tsx @@ -135,6 +135,8 @@ export const Visualization2D: React.FC< //this div is to ensure that the size of the visualiser doesnt change when focusings on a subtree style={ { + backgroundColor: theme.backgroundWash, + borderRadius: theme.borderRadius, overflowY: 'auto', overflowX: 'hidden', position: 'relative', //this is for the absolutely positioned overlays diff --git a/desktop/plugins/public/ui-debugger/components/main.tsx b/desktop/plugins/public/ui-debugger/components/main.tsx index c06e6f6ae..cf6dd66f8 100644 --- a/desktop/plugins/public/ui-debugger/components/main.tsx +++ b/desktop/plugins/public/ui-debugger/components/main.tsx @@ -106,43 +106,49 @@ export function Component() { return ( - - - <> - - - + + + + + - { - instance.uiActions.setVisualiserWidth(width); - }} - gutter> - - - - - - - - - {bottomPanelComponent} - - - + { + instance.uiActions.setVisualiserWidth(width); + }} + gutter> + + + + + + + {bottomPanelComponent} + + ); } diff --git a/desktop/plugins/public/ui-debugger/components/tree/Tree.tsx b/desktop/plugins/public/ui-debugger/components/tree/Tree.tsx index 181a1cf7e..5e126abda 100644 --- a/desktop/plugins/public/ui-debugger/components/tree/Tree.tsx +++ b/desktop/plugins/public/ui-debugger/components/tree/Tree.tsx @@ -213,6 +213,7 @@ export function Tree2({ //We use this normal divs flexbox sizing to measure how much vertical space we need for the child div ref={grandParentRef} style={{ + paddingLeft: theme.space.medium, height: '100%', width: '100%', }}>