From 343aff9f88df81354dfbf041997b5a2e3cf74357 Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Wed, 23 Nov 2022 16:14:58 +0000 Subject: [PATCH] Update side panel transition to be much smoother --- .../client/src/components/app/Layout.svelte | 8 +++--- .../src/components/app/SidePanel.svelte | 25 ++----------------- .../components/app/blocks/TableBlock.svelte | 7 +++--- 3 files changed, 10 insertions(+), 30 deletions(-) diff --git a/packages/client/src/components/app/Layout.svelte b/packages/client/src/components/app/Layout.svelte index 0f84785505..5c124e80ac 100644 --- a/packages/client/src/components/app/Layout.svelte +++ b/packages/client/src/components/app/Layout.svelte @@ -356,21 +356,21 @@ flex-direction: column; gap: 30px; overflow-y: auto; - transition: margin-right 130ms ease-out; + transition: transform 130ms ease-out; position: absolute; width: 400px; right: 0; - margin-right: -400px; + transform: translateX(100%); height: 100%; } #side-panel-container.builder { - margin-right: 0; + transform: translateX(0); opacity: 0; pointer-events: none; } #side-panel-container.open { + transform: translateX(0); box-shadow: 0 0 40px 10px rgba(0, 0, 0, 0.1); - margin-right: 0; } #side-panel-container.builder.open { opacity: 1; diff --git a/packages/client/src/components/app/SidePanel.svelte b/packages/client/src/components/app/SidePanel.svelte index 05862c880e..ed4216fa93 100644 --- a/packages/client/src/components/app/SidePanel.svelte +++ b/packages/client/src/components/app/SidePanel.svelte @@ -1,13 +1,10 @@
- {#if renderContent} - - {/if} +