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);
|
useState(false);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Layout.Horizontal pad="small" gap="small">
|
<Layout.Horizontal gap="medium" pad="medium">
|
||||||
<Input
|
<Input
|
||||||
value={searchTerm}
|
value={searchTerm}
|
||||||
onChange={(e) => {
|
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
|
//this div is to ensure that the size of the visualiser doesnt change when focusings on a subtree
|
||||||
style={
|
style={
|
||||||
{
|
{
|
||||||
|
backgroundColor: theme.backgroundWash,
|
||||||
|
borderRadius: theme.borderRadius,
|
||||||
overflowY: 'auto',
|
overflowY: 'auto',
|
||||||
overflowX: 'hidden',
|
overflowX: 'hidden',
|
||||||
position: 'relative', //this is for the absolutely positioned overlays
|
position: 'relative', //this is for the absolutely positioned overlays
|
||||||
|
|||||||
@@ -106,12 +106,21 @@ export function Component() {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<QueryClientProvider client={queryClient}>
|
<QueryClientProvider client={queryClient}>
|
||||||
<Layout.Container grow padh="small" padv="medium">
|
<Layout.Horizontal
|
||||||
<Layout.Top>
|
grow
|
||||||
<>
|
style={{
|
||||||
|
borderRadius: theme.borderRadius,
|
||||||
|
backgroundColor: theme.backgroundWash,
|
||||||
|
}}>
|
||||||
|
<Layout.Container
|
||||||
|
grow
|
||||||
|
style={{
|
||||||
|
borderRadius: theme.borderRadius,
|
||||||
|
backgroundColor: theme.backgroundDefault,
|
||||||
|
}}>
|
||||||
<Controls />
|
<Controls />
|
||||||
<Layout.Horizontal grow pad="small">
|
|
||||||
<Tree2 nodes={nodes} rootId={rootId} />
|
<Tree2 nodes={nodes} rootId={rootId} />
|
||||||
|
</Layout.Container>
|
||||||
|
|
||||||
<ResizablePanel
|
<ResizablePanel
|
||||||
position="right"
|
position="right"
|
||||||
@@ -136,13 +145,10 @@ export function Component() {
|
|||||||
showExtra={openBottomPanelWithContent}
|
showExtra={openBottomPanelWithContent}
|
||||||
/>
|
/>
|
||||||
</DetailSidebar>
|
</DetailSidebar>
|
||||||
</Layout.Horizontal>
|
|
||||||
</>
|
|
||||||
<BottomPanel dismiss={dismissBottomPanel}>
|
<BottomPanel dismiss={dismissBottomPanel}>
|
||||||
{bottomPanelComponent}
|
{bottomPanelComponent}
|
||||||
</BottomPanel>
|
</BottomPanel>
|
||||||
</Layout.Top>
|
</Layout.Horizontal>
|
||||||
</Layout.Container>
|
|
||||||
</QueryClientProvider>
|
</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
|
//We use this normal divs flexbox sizing to measure how much vertical space we need for the child div
|
||||||
ref={grandParentRef}
|
ref={grandParentRef}
|
||||||
style={{
|
style={{
|
||||||
|
paddingLeft: theme.space.medium,
|
||||||
height: '100%',
|
height: '100%',
|
||||||
width: '100%',
|
width: '100%',
|
||||||
}}>
|
}}>
|
||||||
|
|||||||
Reference in New Issue
Block a user