From 4e4dfefedef34af178d27cb78bc64cbfa9192a89 Mon Sep 17 00:00:00 2001 From: Michael Drury Date: Mon, 15 Apr 2024 13:41:32 +0100 Subject: [PATCH 1/2] Revert "adds sidepanel open and close actions, and gives the user the option to disable click-outside closure of sidepanel" --- packages/bbui/src/Layout/Page.svelte | 10 +++++----- packages/client/manifest.json | 16 +--------------- packages/client/src/components/app/Layout.svelte | 5 +---- .../client/src/components/app/SidePanel.svelte | 14 -------------- packages/client/src/stores/sidePanel.js | 9 --------- 5 files changed, 7 insertions(+), 47 deletions(-) diff --git a/packages/bbui/src/Layout/Page.svelte b/packages/bbui/src/Layout/Page.svelte index 62dd9cc909..2169a12459 100644 --- a/packages/bbui/src/Layout/Page.svelte +++ b/packages/bbui/src/Layout/Page.svelte @@ -7,11 +7,11 @@ export let narrower = false export let noPadding = false - let sidePanelVisible = false + let sidePanelVisble = false setContext("side-panel", { - open: () => (sidePanelVisible = true), - close: () => (sidePanelVisible = false), + open: () => (sidePanelVisble = true), + close: () => (sidePanelVisble = false), }) @@ -24,9 +24,9 @@
{ - sidePanelVisible = false + sidePanelVisble = false }} > diff --git a/packages/client/manifest.json b/packages/client/manifest.json index c9e28e202b..40abc7a9a0 100644 --- a/packages/client/manifest.json +++ b/packages/client/manifest.json @@ -6723,21 +6723,7 @@ "illegalChildren": ["section", "sidepanel"], "showEmptyState": false, "draggable": false, - "info": "Side panels are hidden by default. They will only be revealed when triggered by the 'Open Side Panel' action.", - "sendEvents": true, - "settings": [ - { - "type": "boolean", - "key": "clickOutsideToClose", - "label": "Click outside to close", - "defaultValue": true - }, - { - "type": "event", - "key": "onSidePanelClose", - "label": "On side panel close" - } - ] + "info": "Side panels are hidden by default. They will only be revealed when triggered by the 'Open Side Panel' action." }, "rowexplorer": { "block": true, diff --git a/packages/client/src/components/app/Layout.svelte b/packages/client/src/components/app/Layout.svelte index bae2bd0faf..8508e943ff 100644 --- a/packages/client/src/components/app/Layout.svelte +++ b/packages/client/src/components/app/Layout.svelte @@ -73,10 +73,7 @@ $context.device.width, $context.device.height ) - $: autoCloseSidePanel = - !$builderStore.inBuilder && - $sidePanelStore.open && - $sidePanelStore.clickOutsideToClose + $: autoCloseSidePanel = !$builderStore.inBuilder && $sidePanelStore.open $: screenId = $builderStore.inBuilder ? `${$builderStore.screen?._id}-screen` : "screen" diff --git a/packages/client/src/components/app/SidePanel.svelte b/packages/client/src/components/app/SidePanel.svelte index 624617ad69..825b401bb8 100644 --- a/packages/client/src/components/app/SidePanel.svelte +++ b/packages/client/src/components/app/SidePanel.svelte @@ -5,9 +5,6 @@ const { styleable, sidePanelStore, builderStore, dndIsDragging } = getContext("sdk") - export let sidePanelClose - export let clickOutsideToClose - // Automatically show and hide the side panel when inside the builder. // For some unknown reason, svelte reactivity breaks if we reference the // reactive variable "open" inside the following expression, or if we define @@ -29,10 +26,6 @@ } } - $: { - sidePanelStore.actions.setSidepanelState(clickOutsideToClose) - } - // Derive visibility $: open = $sidePanelStore.contentId === $component.id @@ -47,12 +40,6 @@ } } - const handleSidePanelClose = async () => { - if (sidePanelClose) { - await sidePanelClose() - } - } - const showInSidePanel = (el, visible) => { const update = visible => { const target = document.getElementById("side-panel-container") @@ -64,7 +51,6 @@ } else { if (target.contains(node)) { target.removeChild(node) - handleSidePanelClose() } } } diff --git a/packages/client/src/stores/sidePanel.js b/packages/client/src/stores/sidePanel.js index df66eca01c..3b3b9f5f4d 100644 --- a/packages/client/src/stores/sidePanel.js +++ b/packages/client/src/stores/sidePanel.js @@ -3,7 +3,6 @@ import { writable, derived } from "svelte/store" export const createSidePanelStore = () => { const initialState = { contentId: null, - clickOutsideToClose: true, } const store = writable(initialState) const derivedStore = derived(store, $store => { @@ -33,19 +32,11 @@ export const createSidePanelStore = () => { }, 50) } - const setSidepanelState = bool => { - clearTimeout(timeout) - store.update(state => { - state.clickOutsideToClose = bool - return state - }) - } return { subscribe: derivedStore.subscribe, actions: { open, close, - setSidepanelState, }, } } From 8b9d07fed6896ffabdc16d6dc98798d99dd5e358 Mon Sep 17 00:00:00 2001 From: melohagan <101575380+melohagan@users.noreply.github.com> Date: Mon, 15 Apr 2024 14:37:12 +0100 Subject: [PATCH 2/2] Simplify camunda account-portal local dev setup (#13482) --- package.json | 1 + scripts/deploy-camunda.sh | 31 +++++++++++++++++++++++++++++++ 2 files changed, 32 insertions(+) create mode 100755 scripts/deploy-camunda.sh diff --git a/package.json b/package.json index 2816247939..e520b7c2cf 100644 --- a/package.json +++ b/package.json @@ -56,6 +56,7 @@ "dev:noserver": "yarn run kill-builder && lerna run --stream dev:stack:up --ignore @budibase/account-portal-server && lerna run --stream dev --ignore @budibase/backend-core --ignore @budibase/server --ignore @budibase/worker --ignore=@budibase/account-portal-ui --ignore @budibase/account-portal-server", "dev:server": "yarn run kill-server && lerna run --stream dev --scope @budibase/worker --scope @budibase/server", "dev:accountportal": "yarn kill-accountportal && lerna run dev --stream --scope @budibase/account-portal-ui --scope @budibase/account-portal-server", + "dev:camunda": "./scripts/deploy-camunda.sh", "dev:all": "yarn run kill-all && lerna run --stream dev", "dev:built": "yarn run kill-all && cd packages/server && yarn dev:stack:up && cd ../../ && lerna run --stream dev:built", "dev:docker": "yarn build --scope @budibase/server --scope @budibase/worker && docker-compose -f hosting/docker-compose.build.yaml -f hosting/docker-compose.dev.yaml --env-file hosting/.env up --build --scale proxy-service=0", diff --git a/scripts/deploy-camunda.sh b/scripts/deploy-camunda.sh new file mode 100755 index 0000000000..d01ed64b5a --- /dev/null +++ b/scripts/deploy-camunda.sh @@ -0,0 +1,31 @@ +#!/bin/bash +yarn global add zbctl +export ZEEBE_ADDRESS='localhost:26500' + +cd ../budibase-bpm + +is_camunda_ready() { + if (zbctl --insecure status 2>/dev/null) | grep -q 'Healthy'; then + return 1 + else + return 0 + fi +} + +docker-compose up -d +echo "waiting for Camunda to be ready..." + +while is_camunda_ready -eq 0; do sleep 1; done + +cd src/main/resources/models + +echo "deploy processes..." +zbctl deploy resource offboarding.bpmn --insecure +zbctl deploy resource onboarding.bpmn --insecure + +cd ../../../../../budibase/packages/account-portal/packages/server + +yarn worker:run & cd ../../../.. && yarn dev:accountportal + + +