From db7f267887eefb8c490be9cfae78289396a57159 Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Wed, 8 Mar 2023 19:22:19 +0000 Subject: [PATCH] Update component settings to be left aligned and update long component settings labels to be shorter --- packages/bbui/src/Drawer/Drawer.svelte | 2 +- .../src/components/design/Panel.svelte | 14 +-- .../settings/controls/PropertyControl.svelte | 31 +++--- .../settings/ComponentSettingsPanel.svelte | 2 +- .../new/_components/NewComponentPanel.svelte | 104 ++++++------------ packages/client/manifest.json | 38 +++---- 6 files changed, 71 insertions(+), 120 deletions(-) diff --git a/packages/bbui/src/Drawer/Drawer.svelte b/packages/bbui/src/Drawer/Drawer.svelte index 43729cd794..932236bc0c 100644 --- a/packages/bbui/src/Drawer/Drawer.svelte +++ b/packages/bbui/src/Drawer/Drawer.svelte @@ -7,7 +7,7 @@ export let title export let fillWidth export let left = "314px" - export let width = "calc(100% - 576px)" + export let width = "calc(100% - 626px)" let visible = false diff --git a/packages/builder/src/components/design/Panel.svelte b/packages/builder/src/components/design/Panel.svelte index 6c8753a99e..dbf42c51a5 100644 --- a/packages/builder/src/components/design/Panel.svelte +++ b/packages/builder/src/components/design/Panel.svelte @@ -3,7 +3,6 @@ export let title export let icon - export let expandable = false export let showAddButton = false export let showBackButton = false export let showCloseButton = false @@ -12,8 +11,8 @@ export let onClickCloseButton export let borderLeft = false export let borderRight = false + export let wide = false - let wide = false $: customHeaderContent = $$slots["panel-header-content"] @@ -28,13 +27,6 @@
{title || ""}
- {#if expandable} - (wide = !wide)} - /> - {/if} {#if showAddButton}
@@ -74,8 +66,8 @@ border-right: var(--border-light); } .panel.wide { - width: 420px; - flex: 0 0 420px; + width: 310px; + flex: 0 0 310px; } .header { flex: 0 0 48px; diff --git a/packages/builder/src/components/design/settings/controls/PropertyControl.svelte b/packages/builder/src/components/design/settings/controls/PropertyControl.svelte index ab448b850c..e021cc4288 100644 --- a/packages/builder/src/components/design/settings/controls/PropertyControl.svelte +++ b/packages/builder/src/components/design/settings/controls/PropertyControl.svelte @@ -75,12 +75,10 @@
- {#if type !== "boolean" && label} -
- -
+ {#if label} + {/if} -
+
.property-control { position: relative; - display: flex; - flex-direction: column; - justify-content: flex-start; - align-items: stretch; + display: grid; + grid-template-columns: 90px 1fr; + align-items: center; transition: background 130ms ease-out, border-color 130ms ease-out; border-left: 4px solid transparent; margin: -6px calc(-1 * var(--spacing-xl)); - padding: 6px var(--spacing-xl) 6px calc(var(--spacing-xl) - 4px); + padding: 2px var(--spacing-xl) 6px calc(var(--spacing-xl) - 4px); + gap: 8px; + } + .property-control :global(.spectrum-FieldLabel) { + white-space: normal; } .property-control.highlighted { background: var(--spectrum-global-color-gray-300); border-color: var(--spectrum-global-color-blue-400); } - .label { - padding-bottom: var(--spectrum-global-dimension-size-65); - } .control { position: relative; } + .control.wide { + grid-column: 1 / -1; + } .text { - margin-top: var(--spectrum-global-dimension-size-65); + margin-top: 4px; font-size: var(--spectrum-global-dimension-font-size-75); color: var(--grey-6); + grid-column: 1 / -1; } diff --git a/packages/builder/src/pages/builder/app/[application]/design/[screenId]/components/[componentId]/_components/settings/ComponentSettingsPanel.svelte b/packages/builder/src/pages/builder/app/[application]/design/[screenId]/components/[componentId]/_components/settings/ComponentSettingsPanel.svelte index 1e889ffe93..2ff605cc77 100644 --- a/packages/builder/src/pages/builder/app/[application]/design/[screenId]/components/[componentId]/_components/settings/ComponentSettingsPanel.svelte +++ b/packages/builder/src/pages/builder/app/[application]/design/[screenId]/components/[componentId]/_components/settings/ComponentSettingsPanel.svelte @@ -37,7 +37,7 @@ {#if $selectedComponent} {#key $selectedComponent._id} - +
{#each tabs as tab} diff --git a/packages/builder/src/pages/builder/app/[application]/design/[screenId]/components/[componentId]/new/_components/NewComponentPanel.svelte b/packages/builder/src/pages/builder/app/[application]/design/[screenId]/components/[componentId]/new/_components/NewComponentPanel.svelte index 033881c0ac..5246b26bc7 100644 --- a/packages/builder/src/pages/builder/app/[application]/design/[screenId]/components/[componentId]/new/_components/NewComponentPanel.svelte +++ b/packages/builder/src/pages/builder/app/[application]/design/[screenId]/components/[componentId]/new/_components/NewComponentPanel.svelte @@ -1,22 +1,13 @@