From 7db06407bc40890d5cb1dd5c8b7054c86e455945 Mon Sep 17 00:00:00 2001 From: Tomasz Tunik Date: Wed, 6 May 2020 17:35:30 +0200 Subject: [PATCH 1/4] fix: AnimateHeight could provide wrong node height --- packages/app-admin-ui/client/components/AnimateHeight.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/app-admin-ui/client/components/AnimateHeight.js b/packages/app-admin-ui/client/components/AnimateHeight.js index 4cf24a7d077..414bdad4e91 100644 --- a/packages/app-admin-ui/client/components/AnimateHeight.js +++ b/packages/app-admin-ui/client/components/AnimateHeight.js @@ -27,7 +27,7 @@ export default class AnimateHeight extends Component { } calculateHeight = () => { const { autoScroll, initialHeight, onChange } = this.props; - const height = this.node ? this.node.scrollHeight : initialHeight; + const height = this.node ? this.node.offsetHeight : initialHeight; if (height !== this.state.height) { this.setState({ height }); From 3d501d57b5cada85e3c70a9f8a296abbc7facfe0 Mon Sep 17 00:00:00 2001 From: Tomasz Tunik Date: Wed, 6 May 2020 17:39:24 +0200 Subject: [PATCH 2/4] fix: proper no transition value for AnimateHeight --- packages/app-admin-ui/client/components/AnimateHeight.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/app-admin-ui/client/components/AnimateHeight.js b/packages/app-admin-ui/client/components/AnimateHeight.js index 414bdad4e91..83bddf806df 100644 --- a/packages/app-admin-ui/client/components/AnimateHeight.js +++ b/packages/app-admin-ui/client/components/AnimateHeight.js @@ -80,8 +80,7 @@ export default class AnimateHeight extends Component { height, transition: isTransitioning ? 'height 220ms cubic-bezier(0.2, 0, 0, 1)' - : // idk why this is necessary but having this be null makes the transition break - 'height 0s', + : 'none', overflow, }} onTransitionEnd={event => { From 7641049f950bdbc95e3eb439b66296868c094114 Mon Sep 17 00:00:00 2001 From: Tomasz Tunik Date: Wed, 6 May 2020 18:23:58 +0200 Subject: [PATCH 3/4] added changeset --- .changeset/gorgeous-fireants-approve.md | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 .changeset/gorgeous-fireants-approve.md diff --git a/.changeset/gorgeous-fireants-approve.md b/.changeset/gorgeous-fireants-approve.md new file mode 100644 index 00000000000..ff7fe17302c --- /dev/null +++ b/.changeset/gorgeous-fireants-approve.md @@ -0,0 +1,7 @@ +--- +'@keystonejs/app-admin-ui': patch +--- + +Fixed reading of `AnimateHeight` node height which because of the rounding-down nature of `scrollHeight` property value could sometimes cause scrollbar to be present in the filter popout. + +Provided correct value for `AnimateHeight` css transition property's disabled state. From b6fb47ed74bba769fcd1c5e4460814c9a3fcd018 Mon Sep 17 00:00:00 2001 From: Tomasz Tunik Date: Wed, 6 May 2020 18:43:13 +0200 Subject: [PATCH 4/4] fix formatting for prettier code --- packages/app-admin-ui/client/components/AnimateHeight.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/packages/app-admin-ui/client/components/AnimateHeight.js b/packages/app-admin-ui/client/components/AnimateHeight.js index 83bddf806df..ed3d91bce02 100644 --- a/packages/app-admin-ui/client/components/AnimateHeight.js +++ b/packages/app-admin-ui/client/components/AnimateHeight.js @@ -78,9 +78,7 @@ export default class AnimateHeight extends Component {
{