Fix scroll bar regression
Summary: Changelog: [Logs] Fix regression causing the scrollbars to be hidden. This diff fixes a regression where the Logs plugin was no longer scrollable (and scrolls indefinitely, killing perf). As reported in https://fb.workplace.com/groups/flippersupport/permalink/1133775743769749/ The cause of the problem is the swap between the `PluginContainer` and `outOfContentsContainer`. The deeper root that caused in the first place, is that containers use a `flex: 1` layout, which gets interpreted as `flex: 1 1 0%` (grow, shrink, 0% by default), where it was always inteded to be `flex: 1 1 0` (grow, shrink, by default zero pixels). In practice that difference usually doesn't matter. But sometimes it does... See https://stackoverflow.com/a/42630660/1983583 My whole life has been a lie up to this point. Will trigger a new release after landing this. Reviewed By: nikoant Differential Revision: D28422966 fbshipit-source-id: 3ebd5f8ae76e032c5d698154b021df8ebef2c757
This commit is contained in:
committed by
Facebook GitHub Bot
parent
b5d8f6c63d
commit
9261f0dd40
@@ -325,7 +325,8 @@ const tableContainerStyle = {
|
|||||||
overflowY: 'auto',
|
overflowY: 'auto',
|
||||||
overflowX: 'hidden',
|
overflowX: 'hidden',
|
||||||
display: 'flex',
|
display: 'flex',
|
||||||
flex: 1,
|
// because: https://stackoverflow.com/questions/37386244/what-does-flex-1-mean
|
||||||
|
flex: `1 1 0`,
|
||||||
} as const;
|
} as const;
|
||||||
|
|
||||||
const tableWindowStyle = {
|
const tableWindowStyle = {
|
||||||
|
|||||||
@@ -94,7 +94,7 @@ const Horizontal = styled(Container)({
|
|||||||
});
|
});
|
||||||
|
|
||||||
const ScrollParent = styled.div<{axis?: ScrollAxis}>(({axis}) => ({
|
const ScrollParent = styled.div<{axis?: ScrollAxis}>(({axis}) => ({
|
||||||
flex: 1,
|
flex: `1 1 0`,
|
||||||
boxSizing: 'border-box',
|
boxSizing: 'border-box',
|
||||||
position: 'relative',
|
position: 'relative',
|
||||||
overflowX: axis === 'y' ? 'hidden' : 'auto',
|
overflowX: axis === 'y' ? 'hidden' : 'auto',
|
||||||
@@ -272,7 +272,7 @@ const SandySplitContainer = styled.div<{
|
|||||||
}>((props) => ({
|
}>((props) => ({
|
||||||
boxSizing: 'border-box',
|
boxSizing: 'border-box',
|
||||||
display: 'flex',
|
display: 'flex',
|
||||||
flex: 1,
|
flex: `1 1 0`,
|
||||||
flexDirection: props.flexDirection,
|
flexDirection: props.flexDirection,
|
||||||
alignItems: props.center ? 'center' : 'stretch',
|
alignItems: props.center ? 'center' : 'stretch',
|
||||||
gap: normalizeSpace(props.gap, theme.space.small),
|
gap: normalizeSpace(props.gap, theme.space.small),
|
||||||
|
|||||||
Reference in New Issue
Block a user