diff --git a/packages/bbui/src/ActionButton/ActionButton.svelte b/packages/bbui/src/ActionButton/ActionButton.svelte index 53ba6c7e51..cfc810807e 100644 --- a/packages/bbui/src/ActionButton/ActionButton.svelte +++ b/packages/bbui/src/ActionButton/ActionButton.svelte @@ -84,6 +84,7 @@ } :global([dir="ltr"] .spectrum-ActionButton .spectrum-Icon) { margin-left: 0; + transition: color ease-out 130ms; } .is-selected:not(.spectrum-ActionButton--emphasized) { background: var(--spectrum-global-color-gray-300); @@ -92,4 +93,10 @@ padding: 0; min-width: 0; } + .spectrum-ActionButton--quiet { + padding: 0 8px; + } + .is-selected:not(.emphasized) .spectrum-Icon { + color: var(--spectrum-global-color-gray-900); + } diff --git a/packages/bbui/src/Form/Core/Picker.svelte b/packages/bbui/src/Form/Core/Picker.svelte index fc9f801be2..cdaf00aded 100644 --- a/packages/bbui/src/Form/Core/Picker.svelte +++ b/packages/bbui/src/Form/Core/Picker.svelte @@ -87,10 +87,15 @@ on:mousedown={onClick} > {#if fieldIcon} - + {/if} + {#if fieldColour} + + + + {/if} {/if} - {#if fieldColour} - - - - {/if} onSelectOption(getOptionValue(option, idx))} > {#if getOptionIcon(option, idx)} - + {/if} + {#if getOptionColour(option, idx)} + + + + {/if} {getOptionLabel(option, idx)} @@ -180,11 +185,6 @@ > - {#if getOptionColour(option, idx)} - - - - {/if} {/each} {/if} @@ -209,6 +209,9 @@ width: 100%; box-shadow: none; } + .spectrum-Picker-label.auto-width { + margin-right: var(--spacing-xs); + } .spectrum-Picker-label:not(.auto-width) { overflow: hidden; text-overflow: ellipsis; @@ -221,16 +224,16 @@ .spectrum-Picker-label.auto-width.is-placeholder { padding-right: 2px; } + .auto-width .spectrum-Menu-item { + padding-right: var(--spacing-xl); + } /* Icon and colour alignment */ .spectrum-Menu-checkmark { align-self: center; margin-top: 0; } - .option-colour { - padding-left: 8px; - } - .option-icon { + .option-extra { padding-right: 8px; } diff --git a/packages/bbui/src/StatusLight/StatusLight.svelte b/packages/bbui/src/StatusLight/StatusLight.svelte index a0c72443a6..5b7257891f 100644 --- a/packages/bbui/src/StatusLight/StatusLight.svelte +++ b/packages/bbui/src/StatusLight/StatusLight.svelte @@ -18,11 +18,16 @@ export let disabled = false export let active = false export let color = null + export let square = false + export let hoverable = false
diff --git a/packages/bbui/src/Table/AttachmentRenderer.svelte b/packages/bbui/src/Table/AttachmentRenderer.svelte index 97ce1394cc..4dff22aef8 100644 --- a/packages/bbui/src/Table/AttachmentRenderer.svelte +++ b/packages/bbui/src/Table/AttachmentRenderer.svelte @@ -1,5 +1,4 @@ -{#if !hideIcon} -
- -
+{#if !hideIcon && updateAvailable} + + Update available + {/if} {title || ""}
- {#if showExpandIcon} + {#if expandable} {/if} + {#if showCloseButton} + + {/if}
diff --git a/packages/builder/src/pages/builder/app/[application]/_layout.svelte b/packages/builder/src/pages/builder/app/[application]/_layout.svelte index df84277142..28c5fe18c6 100644 --- a/packages/builder/src/pages/builder/app/[application]/_layout.svelte +++ b/packages/builder/src/pages/builder/app/[application]/_layout.svelte @@ -23,10 +23,6 @@ $layout.children.find(layout => $isActive(layout.path))?.title ?? "data" ) - const previewApp = () => { - window.open(`/${application}`) - } - async function getPackage() { try { store.actions.reset() @@ -108,14 +104,10 @@
- +
+ +
-
@@ -183,4 +175,8 @@ align-items: center; gap: var(--spacing-xl); } + + .version { + margin-right: var(--spacing-s); + } diff --git a/packages/builder/src/pages/builder/app/[application]/design/[screenId]/_components/AppPanel.svelte b/packages/builder/src/pages/builder/app/[application]/design/[screenId]/_components/AppPanel.svelte index 76118cc9c8..c4b80dcc3a 100644 --- a/packages/builder/src/pages/builder/app/[application]/design/[screenId]/_components/AppPanel.svelte +++ b/packages/builder/src/pages/builder/app/[application]/design/[screenId]/_components/AppPanel.svelte @@ -1,10 +1,9 @@
@@ -15,24 +14,17 @@ options={$sortedScreens} getOptionLabel={x => x.routing.route} getOptionValue={x => x._id} - getOptionIcon={x => (x.routing.homeScreen ? "Home" : "WebPage")} getOptionColour={x => RoleUtils.getRoleColour(x.routing.roleId)} value={$store.selectedScreenId} on:change={e => store.actions.screens.select(e.detail)} + quiet + autoWidth />
{#if $store.clientFeatures.devicePreview} {/if} -
@@ -59,6 +51,7 @@ justify-content: space-between; align-items: flex-start; gap: var(--spacing-l); + margin: 0 2px; } .header-left, .header-right { @@ -69,7 +62,8 @@ gap: var(--spacing-l); } .header-left :global(.spectrum-Picker) { - width: 250px; + font-weight: 600; + color: var(--spectrum-global-color-gray-900); } .content { flex: 1 1 auto; diff --git a/packages/builder/src/pages/builder/app/[application]/design/[screenId]/_components/AppPreview.svelte b/packages/builder/src/pages/builder/app/[application]/design/[screenId]/_components/AppPreview.svelte index abb956c9d3..304d41ad19 100644 --- a/packages/builder/src/pages/builder/app/[application]/design/[screenId]/_components/AppPreview.svelte +++ b/packages/builder/src/pages/builder/app/[application]/design/[screenId]/_components/AppPreview.svelte @@ -3,6 +3,7 @@ import { onMount, onDestroy } from "svelte" import { store, + selectedComponent, selectedScreen, selectedLayout, currentAsset, @@ -14,6 +15,7 @@ Layout, Heading, Body, + Icon, notifications, } from "@budibase/bbui" import ErrorSVG from "@budibase/frontend-core/assets/error.svg?raw" @@ -96,6 +98,11 @@ $: json = JSON.stringify(previewData) $: refreshContent(json) + // Determine if the add component menu is active + $: isAddingComponent = $isActive( + `./components/${$selectedComponent?._id}/new` + ) + // Update the iframe with the builder info to render the correct preview const refreshContent = message => { if (iframe) { @@ -219,6 +226,16 @@ idToDelete = null } + const toggleAddComponent = () => { + if (isAddingComponent) { + $goto(`../${$selectedScreen._id}/components/${$selectedComponent?._id}`) + } else { + $goto( + `../${$selectedScreen._id}/components/${$selectedComponent?._id}/new` + ) + } + } + onMount(() => { window.addEventListener("message", receiveMessage) if (!$store.clientFeatures.messagePassing) { @@ -282,6 +299,13 @@ class:tablet={$store.previewDevice === "tablet"} class:mobile={$store.previewDevice === "mobile"} /> +
+ Component +
diff --git a/packages/builder/src/pages/builder/app/[application]/design/[screenId]/_components/DevicePreviewSelect.svelte b/packages/builder/src/pages/builder/app/[application]/design/[screenId]/_components/DevicePreviewSelect.svelte index 9f9447daee..870f801336 100644 --- a/packages/builder/src/pages/builder/app/[application]/design/[screenId]/_components/DevicePreviewSelect.svelte +++ b/packages/builder/src/pages/builder/app/[application]/design/[screenId]/_components/DevicePreviewSelect.svelte @@ -3,18 +3,21 @@ import { store } from "builderStore" - + store.actions.preview.setDevice("desktop")} /> store.actions.preview.setDevice("tablet")} /> store.actions.preview.setDevice("mobile")} diff --git a/packages/builder/src/pages/builder/app/[application]/design/[screenId]/components/[componentId]/_components/navigation/ComponentListPanel.svelte b/packages/builder/src/pages/builder/app/[application]/design/[screenId]/components/[componentId]/_components/navigation/ComponentListPanel.svelte index 1bb4e3d9cd..ab776dea5d 100644 --- a/packages/builder/src/pages/builder/app/[application]/design/[screenId]/components/[componentId]/_components/navigation/ComponentListPanel.svelte +++ b/packages/builder/src/pages/builder/app/[application]/design/[screenId]/components/[componentId]/_components/navigation/ComponentListPanel.svelte @@ -9,7 +9,7 @@ import { setContext } from "svelte" import DNDPositionIndicator from "./DNDPositionIndicator.svelte" import { DropPosition } from "./dndStore" - import { notifications } from "@budibase/bbui" + import { notifications, Button } from "@budibase/bbui" let scrollRef @@ -24,7 +24,7 @@ let newOffsets = {} // Calculate left offset - const offsetX = bounds.left + bounds.width + scrollLeft - 58 + const offsetX = bounds.left + bounds.width + scrollLeft - 36 if (offsetX > sidebarWidth) { newOffsets.left = offsetX - sidebarWidth } else { @@ -71,13 +71,10 @@ }) - $goto("../new")} - showExpandIcon - borderRight -> + +
+ +