diff --git a/lerna.json b/lerna.json
index 3f92ee6697..80d7963f04 100644
--- a/lerna.json
+++ b/lerna.json
@@ -1,5 +1,5 @@
{
- "version": "1.0.91-alpha.9",
+ "version": "1.0.91-alpha.10",
"npmClient": "yarn",
"packages": [
"packages/*"
diff --git a/packages/backend-core/package.json b/packages/backend-core/package.json
index a2d6a2bc7a..6766ae6987 100644
--- a/packages/backend-core/package.json
+++ b/packages/backend-core/package.json
@@ -1,6 +1,6 @@
{
"name": "@budibase/backend-core",
- "version": "1.0.91-alpha.9",
+ "version": "1.0.91-alpha.10",
"description": "Budibase backend core libraries used in server and worker",
"main": "src/index.js",
"author": "Budibase",
diff --git a/packages/bbui/package.json b/packages/bbui/package.json
index ef0a53c688..06afdff505 100644
--- a/packages/bbui/package.json
+++ b/packages/bbui/package.json
@@ -1,7 +1,7 @@
{
"name": "@budibase/bbui",
"description": "A UI solution used in the different Budibase projects.",
- "version": "1.0.91-alpha.9",
+ "version": "1.0.91-alpha.10",
"license": "MPL-2.0",
"svelte": "src/index.js",
"module": "dist/bbui.es.js",
@@ -38,7 +38,7 @@
],
"dependencies": {
"@adobe/spectrum-css-workflow-icons": "^1.2.1",
- "@budibase/string-templates": "^1.0.91-alpha.9",
+ "@budibase/string-templates": "^1.0.91-alpha.10",
"@spectrum-css/actionbutton": "^1.0.1",
"@spectrum-css/actiongroup": "^1.0.1",
"@spectrum-css/avatar": "^3.0.2",
diff --git a/packages/builder/package.json b/packages/builder/package.json
index 51b9574ab3..5813335526 100644
--- a/packages/builder/package.json
+++ b/packages/builder/package.json
@@ -1,6 +1,6 @@
{
"name": "@budibase/builder",
- "version": "1.0.91-alpha.9",
+ "version": "1.0.91-alpha.10",
"license": "GPL-3.0",
"private": true,
"scripts": {
@@ -65,10 +65,10 @@
}
},
"dependencies": {
- "@budibase/bbui": "^1.0.91-alpha.9",
- "@budibase/client": "^1.0.91-alpha.9",
- "@budibase/frontend-core": "^1.0.91-alpha.9",
- "@budibase/string-templates": "^1.0.91-alpha.9",
+ "@budibase/bbui": "^1.0.91-alpha.10",
+ "@budibase/client": "^1.0.91-alpha.10",
+ "@budibase/frontend-core": "^1.0.91-alpha.10",
+ "@budibase/string-templates": "^1.0.91-alpha.10",
"@sentry/browser": "5.19.1",
"@spectrum-css/page": "^3.0.1",
"@spectrum-css/vars": "^3.0.1",
diff --git a/packages/builder/src/builderStore/index.js b/packages/builder/src/builderStore/index.js
index 82556c74cf..619bdd94a1 100644
--- a/packages/builder/src/builderStore/index.js
+++ b/packages/builder/src/builderStore/index.js
@@ -3,7 +3,7 @@ import { getAutomationStore } from "./store/automation"
import { getThemeStore } from "./store/theme"
import { derived, writable } from "svelte/store"
import { FrontendTypes, LAYOUT_NAMES } from "../constants"
-import { findComponent } from "./componentUtils"
+import { findComponent, findComponentPath } from "./componentUtils"
export const store = getFrontendStore()
export const automationStore = getAutomationStore()
@@ -29,6 +29,16 @@ export const selectedComponent = derived(
}
)
+export const selectedComponentPath = derived(
+ [store, currentAsset],
+ ([$store, $currentAsset]) => {
+ return findComponentPath(
+ $currentAsset?.props,
+ $store.selectedComponentId
+ ).map(component => component._id)
+ }
+)
+
export const currentAssetId = derived(store, $store => {
return $store.currentFrontEndType === FrontendTypes.SCREEN
? $store.selectedScreenId
diff --git a/packages/builder/src/components/automation/AutomationPanel/AutomationPanel.svelte b/packages/builder/src/components/automation/AutomationPanel/AutomationPanel.svelte
index 0c975eab18..2c67a3966c 100644
--- a/packages/builder/src/components/automation/AutomationPanel/AutomationPanel.svelte
+++ b/packages/builder/src/components/automation/AutomationPanel/AutomationPanel.svelte
@@ -10,12 +10,10 @@
-
+
+
+
+
@@ -24,9 +22,6 @@
diff --git a/packages/builder/src/components/design/NavigationPanel/ComponentNavigationTree/ComponentTree.svelte b/packages/builder/src/components/design/NavigationPanel/ComponentNavigationTree/ComponentTree.svelte
index d0095b2c0d..6b78bc40c1 100644
--- a/packages/builder/src/components/design/NavigationPanel/ComponentNavigationTree/ComponentTree.svelte
+++ b/packages/builder/src/components/design/NavigationPanel/ComponentNavigationTree/ComponentTree.svelte
@@ -5,6 +5,7 @@
import NavItem from "components/common/NavItem.svelte"
import { capitalise } from "helpers"
import { notifications } from "@budibase/bbui"
+ import { selectedComponentPath } from "builderStore"
export let components = []
export let currentComponent
@@ -71,10 +72,20 @@
notifications.error("Error saving component")
}
}
+
+ const isOpen = (component, selectedComponentPath, closedNodes) => {
+ if (!component?._children?.length) {
+ return false
+ }
+ if (selectedComponentPath.includes(component._id)) {
+ return true
+ }
+ return !closedNodes[component._id]
+ }
- {#each components as component, index (component._id)}
+ {#each components || [] as component, index (component._id)}
- selectComponent(component)}>
{#if $dragDropStore?.targetComponent === component && $dragDropStore.dropPosition === DropPosition.ABOVE}
- {#if component._children && !closedNodes[component._id]}
+ {#if isOpen(component, $selectedComponentPath, closedNodes)}
+
+
diff --git a/packages/builder/src/components/design/NavigationPanel/ComponentNavigationTree/PathDropdownMenu.svelte b/packages/builder/src/components/design/NavigationPanel/ComponentNavigationTree/PathDropdownMenu.svelte
index 5d9eb2568c..6de656b6b5 100644
--- a/packages/builder/src/components/design/NavigationPanel/ComponentNavigationTree/PathDropdownMenu.svelte
+++ b/packages/builder/src/components/design/NavigationPanel/ComponentNavigationTree/PathDropdownMenu.svelte
@@ -75,4 +75,8 @@
align-items: flex-start;
padding-left: var(--spacing-xl);
}
+ .icon {
+ display: grid;
+ place-items: center;
+ }
diff --git a/packages/builder/src/components/design/NavigationPanel/ComponentNavigationTree/PathTree.svelte b/packages/builder/src/components/design/NavigationPanel/ComponentNavigationTree/PathTree.svelte
index ee6de5c797..3d6984cf14 100644
--- a/packages/builder/src/components/design/NavigationPanel/ComponentNavigationTree/PathTree.svelte
+++ b/packages/builder/src/components/design/NavigationPanel/ComponentNavigationTree/PathTree.svelte
@@ -29,6 +29,7 @@
export let border
let routeManuallyOpened = false
+
$: selectedScreen = $currentAsset
$: allScreens = getAllScreens(route)
$: filteredScreens = getFilteredScreens(allScreens, $screenSearchString)
@@ -83,7 +84,8 @@
+
+
diff --git a/packages/builder/src/components/design/NavigationPanel/ComponentNavigationTree/index.svelte b/packages/builder/src/components/design/NavigationPanel/ComponentNavigationTree/index.svelte
index 65425a5b9f..1c108f164e 100644
--- a/packages/builder/src/components/design/NavigationPanel/ComponentNavigationTree/index.svelte
+++ b/packages/builder/src/components/design/NavigationPanel/ComponentNavigationTree/index.svelte
@@ -55,11 +55,10 @@
}
-
+
{#each paths as path, idx (path)}
0} {path} route={routes[path]} />
{/each}
-
{#if !paths.length}
There aren't any screens configured with this access role.
@@ -68,9 +67,12 @@
diff --git a/packages/builder/src/components/design/NavigationPanel/FrontendNavigatePane.svelte b/packages/builder/src/components/design/NavigationPanel/FrontendNavigatePane.svelte
index a5045d8e9f..0611d4fc71 100644
--- a/packages/builder/src/components/design/NavigationPanel/FrontendNavigatePane.svelte
+++ b/packages/builder/src/components/design/NavigationPanel/FrontendNavigatePane.svelte
@@ -1,5 +1,5 @@