From a831b7f91e10126dd80cb8a5f7963272afd8e3ec Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Fri, 30 Jul 2021 13:57:33 +0100 Subject: [PATCH 01/14] Add modal option to hide divider, and make title rendering optional --- packages/bbui/src/Modal/ModalContent.svelte | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/packages/bbui/src/Modal/ModalContent.svelte b/packages/bbui/src/Modal/ModalContent.svelte index e6d4ab5f0f..5bf8ab599c 100644 --- a/packages/bbui/src/Modal/ModalContent.svelte +++ b/packages/bbui/src/Modal/ModalContent.svelte @@ -15,6 +15,7 @@ export let showCloseIcon = true export let onConfirm = undefined export let disabled = false + export let showDivider = true const { hide, cancel } = getContext(Context.Modal) let loading = false @@ -41,11 +42,17 @@ aria-modal="true" >
-

- {title} -

- - + {#if title} +

+ {title} +

+ {#if showDivider} + + {/if} + {/if}
@@ -96,6 +103,9 @@ .spectrum-Dialog-heading { font-family: var(--font-sans); } + .spectrum-Dialog-heading.noDivider { + margin-bottom: 12px; + } .spectrum-Dialog-buttonGroup { gap: var(--spectrum-global-dimension-static-size-200); From e711fffc45e08c96b691fc528de092297f47ebf0 Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Fri, 30 Jul 2021 13:58:34 +0100 Subject: [PATCH 02/14] Break out notification component to standalone component --- .../bbui/src/Notification/Notification.svelte | 20 +++++++++++++ .../Notification/NotificationDisplay.svelte | 28 ++++--------------- packages/bbui/src/index.js | 1 + 3 files changed, 27 insertions(+), 22 deletions(-) create mode 100644 packages/bbui/src/Notification/Notification.svelte diff --git a/packages/bbui/src/Notification/Notification.svelte b/packages/bbui/src/Notification/Notification.svelte new file mode 100644 index 0000000000..cebc859bda --- /dev/null +++ b/packages/bbui/src/Notification/Notification.svelte @@ -0,0 +1,20 @@ + + +
+ {#if icon} + + {/if} +
+
{message || ""}
+
+
diff --git a/packages/bbui/src/Notification/NotificationDisplay.svelte b/packages/bbui/src/Notification/NotificationDisplay.svelte index 89e7666cc7..9d96bf7e70 100644 --- a/packages/bbui/src/Notification/NotificationDisplay.svelte +++ b/packages/bbui/src/Notification/NotificationDisplay.svelte @@ -2,30 +2,16 @@ import "@spectrum-css/toast/dist/index-vars.css" import Portal from "svelte-portal" import { flip } from "svelte/animate" - import { fly } from "svelte/transition" import { notifications } from "../Stores/notifications" + import Notification from "./Notification.svelte" + import { fly } from "svelte/transition"
{#each $notifications as { type, icon, message, id } (id)} -
- {#if icon} - - {/if} -
-
{message}
-
+
+
{/each}
@@ -34,7 +20,7 @@ diff --git a/packages/bbui/src/index.js b/packages/bbui/src/index.js index 4d045e504b..3a491bfb54 100644 --- a/packages/bbui/src/index.js +++ b/packages/bbui/src/index.js @@ -38,6 +38,7 @@ export { default as MenuItem } from "./Menu/Item.svelte" export { default as Modal } from "./Modal/Modal.svelte" export { default as ModalContent } from "./Modal/ModalContent.svelte" export { default as NotificationDisplay } from "./Notification/NotificationDisplay.svelte" +export { default as Notification } from "./Notification/Notification.svelte" export { default as SideNavigation } from "./SideNavigation/Navigation.svelte" export { default as SideNavigationItem } from "./SideNavigation/Item.svelte" export { default as DatePicker } from "./Form/DatePicker.svelte" From 7723a1ed60e59950893c7cfec277b6a804fdc25f Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Fri, 30 Jul 2021 13:59:04 +0100 Subject: [PATCH 03/14] Add checkbox to specify navigate action should open in a modal insteaf --- .../EventsEditor/actions/NavigateTo.svelte | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/packages/builder/src/components/design/PropertiesPanel/PropertyControls/EventsEditor/actions/NavigateTo.svelte b/packages/builder/src/components/design/PropertiesPanel/PropertyControls/EventsEditor/actions/NavigateTo.svelte index e713ccce4a..931c807ec9 100644 --- a/packages/builder/src/components/design/PropertiesPanel/PropertyControls/EventsEditor/actions/NavigateTo.svelte +++ b/packages/builder/src/components/design/PropertiesPanel/PropertyControls/EventsEditor/actions/NavigateTo.svelte @@ -1,5 +1,5 @@
- {#each $notifications as notification (notification.id)} -
-
{notification.message}
- {#if notification.icon}{/if} -
- {/each} + {#if $notificationStore} + {#key $notificationStore.id} +
+ +
+ {/key} + {/if}
diff --git a/packages/client/src/components/PeekScreenDisplay.svelte b/packages/client/src/components/PeekScreenDisplay.svelte new file mode 100644 index 0000000000..236a228c3b --- /dev/null +++ b/packages/client/src/components/PeekScreenDisplay.svelte @@ -0,0 +1,78 @@ + + +{#if $peekStore.showPeek} + + +