diff --git a/packages/theme/styles/common.scss b/packages/theme/styles/common.scss index 0eac052b97..315ad0567e 100644 --- a/packages/theme/styles/common.scss +++ b/packages/theme/styles/common.scss @@ -41,11 +41,13 @@ &.border-right { border-right: 1px solid var(--divider-color); } } .antiPanel-navigator { + position: relative; min-width: 18rem; max-width: 18rem; width: 18rem; - - &.float { +} +@media (max-width: 1024px) { + .antiPanel-navigator { position: fixed; top: var(--status-bar-height); left: var(--app-panel-width); diff --git a/packages/theme/styles/panel.scss b/packages/theme/styles/panel.scss index a252d72791..3853e05182 100644 --- a/packages/theme/styles/panel.scss +++ b/packages/theme/styles/panel.scss @@ -180,11 +180,13 @@ box-shadow: 0 0 0 0 rgba(0, 0, 0, 0); transition: box-shadow 150ms ease 0s, transform 150ms cubic-bezier(0.175, 0.885, 0.32, 1.275); transform: translateX(0); + visibility: hidden; &::before { content: none; } &.shown { box-shadow: var(--popup-aside-shadow); transform: translateX(-100%); + visibility: visible; &::after { position: absolute; diff --git a/packages/ui/src/components/Panel.svelte b/packages/ui/src/components/Panel.svelte index 0b852a93de..31d41a658d 100644 --- a/packages/ui/src/components/Panel.svelte +++ b/packages/ui/src/components/Panel.svelte @@ -13,7 +13,7 @@ // limitations under the License. --> -
{ panelWidth = element.clientWidth + checkPanel() }} >
diff --git a/plugins/workbench-resources/src/components/Workbench.svelte b/plugins/workbench-resources/src/components/Workbench.svelte index 49aac17ff9..b40b181f72 100644 --- a/plugins/workbench-resources/src/components/Workbench.svelte +++ b/plugins/workbench-resources/src/components/Workbench.svelte @@ -362,20 +362,21 @@ } } + let docWidth: number let navFloat: boolean = !(window.innerWidth < 1024) const windowResize = (): void => { - if (window.innerWidth < 1024 && !navFloat) { + if (window.innerWidth <= 1024 && !navFloat) { visibileNav = false navFloat = true - } else if (window.innerWidth >= 1024 && navFloat) { + } else if (window.innerWidth > 1024 && navFloat) { navFloat = false visibileNav = true } } - const checkOnHide = (): void => { - if (visibileNav && navFloat) visibileNav = false - } windowResize() + const checkOnHide = (): void => { + if (visibileNav && docWidth <= 1024) visibileNav = false + } @@ -459,7 +460,7 @@ }} /> {#if currentApplication && navigatorModel && navigator && visibileNav} -
+
{#if currentApplication} {#if currentApplication.navHeaderComponent} diff --git a/tests/create-local.sh b/tests/create-local.sh index b1ea9b4885..e2edacdfe8 100755 --- a/tests/create-local.sh +++ b/tests/create-local.sh @@ -5,6 +5,7 @@ export MINIO_ENDPOINT=localhost:9000 export MONGO_URL=mongodb://localhost:27017 export TRANSACTOR_URL=ws:/localhost:3333 export ELASTIC_URL=http://localhost:9200 +export SERVER_SECRET=secret # Create workspace record in accounts node ../dev/tool/bundle.js create-workspace sanity-ws -o SanityTest diff --git a/tests/restore-local.sh b/tests/restore-local.sh index 878784f13f..dc9832f305 100755 --- a/tests/restore-local.sh +++ b/tests/restore-local.sh @@ -5,7 +5,7 @@ export MINIO_ENDPOINT=localhost:9000 export MONGO_URL=mongodb://localhost:27017 export TRANSACTOR_URL=ws:/localhost:3333 export ELASTIC_URL=http://localhost:9200 - +export SERVER_SECRET=secret # Restore workspace contents in mongo/elastic node ../dev/tool/bundle.js restore-workspace sanity-ws sanity-ws/