From 27845336b76e4e02a9b9b348e33b816a3cedad5a Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Wed, 30 Nov 2022 14:18:31 +0000 Subject: [PATCH] Add ability to show component info above the settings panel and add info to side panels --- .../src/DetailSummary/DetailSummary.svelte | 23 ++++++++---- .../settings/ComponentInfoSection.svelte | 36 +++++++++++++++++++ .../settings/ComponentSettingsPanel.svelte | 4 +++ packages/client/manifest.json | 3 +- 4 files changed, 58 insertions(+), 8 deletions(-) create mode 100644 packages/builder/src/pages/builder/app/[application]/design/[screenId]/components/[componentId]/_components/settings/ComponentInfoSection.svelte diff --git a/packages/bbui/src/DetailSummary/DetailSummary.svelte b/packages/bbui/src/DetailSummary/DetailSummary.svelte index 518c615504..f7e2611792 100644 --- a/packages/bbui/src/DetailSummary/DetailSummary.svelte +++ b/packages/bbui/src/DetailSummary/DetailSummary.svelte @@ -19,13 +19,19 @@
-
-
{name}
- {#if collapsible} - - {/if} -
-
+ {#if name} +
+
{name}
+ {#if collapsible} + + {/if} +
+ {/if} +
@@ -72,6 +78,9 @@ padding: var(--spacing-s) var(--spacing-xl) var(--spacing-xl) var(--spacing-xl); } + .property-panel.no-title { + padding: var(--spacing-xl); + } .show { display: flex; diff --git a/packages/builder/src/pages/builder/app/[application]/design/[screenId]/components/[componentId]/_components/settings/ComponentInfoSection.svelte b/packages/builder/src/pages/builder/app/[application]/design/[screenId]/components/[componentId]/_components/settings/ComponentInfoSection.svelte new file mode 100644 index 0000000000..756a4bb43e --- /dev/null +++ b/packages/builder/src/pages/builder/app/[application]/design/[screenId]/components/[componentId]/_components/settings/ComponentInfoSection.svelte @@ -0,0 +1,36 @@ + + + +
+
+ + {componentDefinition.name} +
+ {componentDefinition.info} +
+
+ + \ No newline at end of file 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 688d7c5db9..c301bfdc20 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 @@ -5,6 +5,7 @@ import DesignSection from "./DesignSection.svelte" import CustomStylesSection from "./CustomStylesSection.svelte" import ConditionalUISection from "./ConditionalUISection.svelte" + import ComponentInfoSection from "./ComponentInfoSection.svelte" import { getBindableProperties, getComponentBindableProperties, @@ -29,6 +30,9 @@ {#if $selectedComponent} {#key $selectedComponent._id} + {#if componentDefinition.info} + + {/if}