Fix Visualiser cropping issue

Summary:
An issue was reported for the visualiser whereas there seemed to be some cropping taking place on the right hand side.

https://pxl.cl/2BhPT

The issue was the resizable panel and visualiser both were set with the same width.

The resizable panel was set as to have a gutter which was not taken into consideration, add this width to the panel width and that fixes the issue.

Also change box sizing model as to not affect the dimensions of the wireframe.

Reviewed By: LukeDefeo

Differential Revision: D44664377

fbshipit-source-id: e640af2090f7c3378e624626fe3ea5df631caa11
This commit is contained in:
Lorenzo Blasa
2023-04-04 22:10:39 -07:00
committed by Facebook GitHub Bot
parent a419aaaf1b
commit 985a9eda33
2 changed files with 3 additions and 1 deletions

View File

@@ -15,6 +15,7 @@ import {
usePlugin,
useValue,
_Sidebar as ResizablePanel,
theme,
} from 'flipper-plugin';
import {useHotkeys} from 'react-hotkeys-hook';
import {Id, Metadata, MetadataId, UINode} from '../types';
@@ -65,7 +66,7 @@ export function Component() {
<ResizablePanel
position="right"
minWidth={200}
width={visualiserWidth}
width={visualiserWidth + theme.space.large}
maxWidth={800}
onResize={(width) => {
instance.uiActions.setVisualiserWidth(width);