From 10e415655c8be8533f3e0146bb9a48d726e601a5 Mon Sep 17 00:00:00 2001 From: Andrey Goncharov Date: Fri, 9 Dec 2022 04:06:58 -0800 Subject: [PATCH] Fix table flickering without hiding content Summary: Followup of D39772453 (https://github.com/facebook/flipper/commit/2437aeb3e9b38210bcbdb59c82f0dc97be70e456) Fixes https://fb.workplace.com/groups/flippersupport/permalink/1518236858656967/ 1. Stop using clientWidth and offsetWidth because they have rounding errors 2. Since step 1 did not resolve the issue entirely (for some weird reason I do not really have the capacity now to investigate - my bet it is a rounding error when you sum up doubles) set offset of the table to "scroll" instead of "auto". As a result, it starts rendering space for the scrollbars all the time, but since Flipper is a dev tool it should be fine Reviewed By: antonk52 Differential Revision: D41839402 fbshipit-source-id: cf50eb1600b692d3970003fd1b45b953ee45e3df --- .../__snapshots__/PluginInstaller.node.tsx.snap | 6 ++---- .../src/ui/components/table/ManagedTable.tsx | 5 ++--- .../src/ui/components/table/TableHead.tsx | 14 ++++++++------ 3 files changed, 12 insertions(+), 13 deletions(-) diff --git a/desktop/flipper-ui-core/src/chrome/plugin-manager/__tests__/__snapshots__/PluginInstaller.node.tsx.snap b/desktop/flipper-ui-core/src/chrome/plugin-manager/__tests__/__snapshots__/PluginInstaller.node.tsx.snap index 601aff55a..890169d2f 100644 --- a/desktop/flipper-ui-core/src/chrome/plugin-manager/__tests__/__snapshots__/PluginInstaller.node.tsx.snap +++ b/desktop/flipper-ui-core/src/chrome/plugin-manager/__tests__/__snapshots__/PluginInstaller.node.tsx.snap @@ -53,7 +53,7 @@ exports[`load PluginInstaller list 1`] = `
((props) => ({ - overflow: props.canOverflow ? 'auto' : 'visible', + overflow: props.canOverflow ? 'scroll' : 'visible', flexGrow: 1, height: '100%', })); @@ -715,8 +715,7 @@ export class ManagedTable extends React.Component< horizontallyScrollable={horizontallyScrollable} /> )} - + {this.props.autoHeight ? (