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
This commit is contained in:
committed by
Facebook GitHub Bot
parent
0e15dce033
commit
272d2d2106
@@ -44,7 +44,7 @@ export const Controls: React.FC = () => {
|
||||
useState(false);
|
||||
|
||||
return (
|
||||
<Layout.Horizontal pad="small" gap="small">
|
||||
<Layout.Horizontal gap="medium" pad="medium">
|
||||
<Input
|
||||
value={searchTerm}
|
||||
onChange={(e) => {
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -106,12 +106,21 @@ export function Component() {
|
||||
|
||||
return (
|
||||
<QueryClientProvider client={queryClient}>
|
||||
<Layout.Container grow padh="small" padv="medium">
|
||||
<Layout.Top>
|
||||
<>
|
||||
<Layout.Horizontal
|
||||
grow
|
||||
style={{
|
||||
borderRadius: theme.borderRadius,
|
||||
backgroundColor: theme.backgroundWash,
|
||||
}}>
|
||||
<Layout.Container
|
||||
grow
|
||||
style={{
|
||||
borderRadius: theme.borderRadius,
|
||||
backgroundColor: theme.backgroundDefault,
|
||||
}}>
|
||||
<Controls />
|
||||
<Layout.Horizontal grow pad="small">
|
||||
<Tree2 nodes={nodes} rootId={rootId} />
|
||||
</Layout.Container>
|
||||
|
||||
<ResizablePanel
|
||||
position="right"
|
||||
@@ -136,13 +145,10 @@ export function Component() {
|
||||
showExtra={openBottomPanelWithContent}
|
||||
/>
|
||||
</DetailSidebar>
|
||||
</Layout.Horizontal>
|
||||
</>
|
||||
<BottomPanel dismiss={dismissBottomPanel}>
|
||||
{bottomPanelComponent}
|
||||
</BottomPanel>
|
||||
</Layout.Top>
|
||||
</Layout.Container>
|
||||
</Layout.Horizontal>
|
||||
</QueryClientProvider>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -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%',
|
||||
}}>
|
||||
|
||||
Reference in New Issue
Block a user