From f540f1786198c7358d950ba38376c39e58795d06 Mon Sep 17 00:00:00 2001 From: Michael Shanks Date: Wed, 21 Oct 2020 17:24:08 +0100 Subject: [PATCH 1/5] feedback nav icon loads iframe to public page --- .../components/common/Icons/Feedback.svelte | 11 +++ .../src/components/common/Icons/index.js | 1 + .../components/userInterface/Feedback.svelte | 76 +++++++++++++++++++ .../src/pages/[application]/_reset.svelte | 2 + 4 files changed, 90 insertions(+) create mode 100644 packages/builder/src/components/common/Icons/Feedback.svelte create mode 100644 packages/builder/src/components/userInterface/Feedback.svelte diff --git a/packages/builder/src/components/common/Icons/Feedback.svelte b/packages/builder/src/components/common/Icons/Feedback.svelte new file mode 100644 index 0000000000..e34415d612 --- /dev/null +++ b/packages/builder/src/components/common/Icons/Feedback.svelte @@ -0,0 +1,11 @@ + + + + diff --git a/packages/builder/src/components/common/Icons/index.js b/packages/builder/src/components/common/Icons/index.js index 7082b1b5e0..f11188ee34 100644 --- a/packages/builder/src/components/common/Icons/index.js +++ b/packages/builder/src/components/common/Icons/index.js @@ -33,3 +33,4 @@ export { default as InfoIcon } from "./Info.svelte" export { default as CloseIcon } from "./Close.svelte" export { default as MoreIcon } from "./More.svelte" export { default as CloseCircleIcon } from "./CloseCircle.svelte" +export { default as FeedbackIcon } from "./Feedback.svelte" diff --git a/packages/builder/src/components/userInterface/Feedback.svelte b/packages/builder/src/components/userInterface/Feedback.svelte new file mode 100644 index 0000000000..5b44d42a81 --- /dev/null +++ b/packages/builder/src/components/userInterface/Feedback.svelte @@ -0,0 +1,76 @@ + + + + + + + + + + diff --git a/packages/builder/src/pages/[application]/_reset.svelte b/packages/builder/src/pages/[application]/_reset.svelte index 87759aef97..7647bb6819 100644 --- a/packages/builder/src/pages/[application]/_reset.svelte +++ b/packages/builder/src/pages/[application]/_reset.svelte @@ -2,6 +2,7 @@ import { store, automationStore, backendUiStore } from "builderStore" import { Button } from "@budibase/bbui" import SettingsLink from "components/settings/Link.svelte" + import Feedback from "components/userInterface/Feedback.svelte" import { get } from "builderStore/api" import { isActive, goto, layout } from "@sveltech/routify" import { PreviewIcon } from "components/common/Icons/" @@ -65,6 +66,7 @@ {/each}
+ Date: Thu, 22 Oct 2020 14:54:28 +0100 Subject: [PATCH 2/5] Feedback - close on submit --- .../builder/src/components/userInterface/Feedback.svelte | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/packages/builder/src/components/userInterface/Feedback.svelte b/packages/builder/src/components/userInterface/Feedback.svelte index 5b44d42a81..ecce78b1b0 100644 --- a/packages/builder/src/components/userInterface/Feedback.svelte +++ b/packages/builder/src/components/userInterface/Feedback.svelte @@ -24,6 +24,7 @@ ) } else if (ev.data.type === "submitted") { analytics.captureEvent("Feedback Submitted", ev.data.data) + popover.hide() } }, false @@ -66,6 +67,11 @@ box-sizing: border-box; } + .container:hover { + color: var(--ink); + font-weight: 500; + } + iframe { border-style: none; height: auto; From cecf00a09e7bb4c4f8ba77e5a793967ae4f7bbd1 Mon Sep 17 00:00:00 2001 From: Michael Shanks Date: Thu, 22 Oct 2020 21:59:40 +0100 Subject: [PATCH 3/5] Feedback - added Modal after deploy --- .../components/userInterface/Feedback.svelte | 82 ------------------- .../Feedback/FeedbackIframe.svelte | 57 +++++++++++++ .../Feedback/FeedbackNavLink.svelte | 35 ++++++++ .../src/pages/[application]/_reset.svelte | 4 +- .../pages/[application]/deploy/index.svelte | 8 +- 5 files changed, 101 insertions(+), 85 deletions(-) delete mode 100644 packages/builder/src/components/userInterface/Feedback.svelte create mode 100644 packages/builder/src/components/userInterface/Feedback/FeedbackIframe.svelte create mode 100644 packages/builder/src/components/userInterface/Feedback/FeedbackNavLink.svelte diff --git a/packages/builder/src/components/userInterface/Feedback.svelte b/packages/builder/src/components/userInterface/Feedback.svelte deleted file mode 100644 index ecce78b1b0..0000000000 --- a/packages/builder/src/components/userInterface/Feedback.svelte +++ /dev/null @@ -1,82 +0,0 @@ - - - - - - - - - - diff --git a/packages/builder/src/components/userInterface/Feedback/FeedbackIframe.svelte b/packages/builder/src/components/userInterface/Feedback/FeedbackIframe.svelte new file mode 100644 index 0000000000..0de129ff80 --- /dev/null +++ b/packages/builder/src/components/userInterface/Feedback/FeedbackIframe.svelte @@ -0,0 +1,57 @@ + + + + + diff --git a/packages/builder/src/components/userInterface/Feedback/FeedbackNavLink.svelte b/packages/builder/src/components/userInterface/Feedback/FeedbackNavLink.svelte new file mode 100644 index 0000000000..0a6afe268f --- /dev/null +++ b/packages/builder/src/components/userInterface/Feedback/FeedbackNavLink.svelte @@ -0,0 +1,35 @@ + + + + + + + + + + diff --git a/packages/builder/src/pages/[application]/_reset.svelte b/packages/builder/src/pages/[application]/_reset.svelte index 7647bb6819..fb2b233e2c 100644 --- a/packages/builder/src/pages/[application]/_reset.svelte +++ b/packages/builder/src/pages/[application]/_reset.svelte @@ -2,7 +2,7 @@ import { store, automationStore, backendUiStore } from "builderStore" import { Button } from "@budibase/bbui" import SettingsLink from "components/settings/Link.svelte" - import Feedback from "components/userInterface/Feedback.svelte" + import FeedbackNavLink from "components/userInterface/Feedback/FeedbackNavLink.svelte" import { get } from "builderStore/api" import { isActive, goto, layout } from "@sveltech/routify" import { PreviewIcon } from "components/common/Icons/" @@ -66,7 +66,7 @@ {/each}
- + import { onMount } from "svelte" - import { Button, Spacer } from "@budibase/bbui" + import { Button, Spacer, Modal } from "@budibase/bbui" import { store } from "builderStore" import { notifier } from "builderStore/store/notifications" import api from "builderStore/api" import Spinner from "components/common/Spinner.svelte" import DeploymentHistory from "components/deploy/DeploymentHistory.svelte" import analytics from "analytics" + import FeedbackIframe from "components/userInterface/Feedback/FeedbackIframe.svelte" let loading = false let deployments = [] let poll + let feedbackModal $: appId = $store.appId @@ -31,6 +33,7 @@ analytics.captureEvent("Deployed App", { appId, }) + feedbackModal.show() } catch (err) { analytics.captureEvent("Deploy App Failed", { appId, @@ -57,6 +60,9 @@ src="/_builder/assets/deploy-rocket.jpg" alt="Rocket flying through sky" /> + + + diff --git a/packages/builder/src/pages/[application]/deploy/index.svelte b/packages/builder/src/pages/[application]/deploy/index.svelte index 691e039e38..b2ee0e8fdb 100644 --- a/packages/builder/src/pages/[application]/deploy/index.svelte +++ b/packages/builder/src/pages/[application]/deploy/index.svelte @@ -33,7 +33,10 @@ analytics.captureEvent("Deployed App", { appId, }) - feedbackModal.show() + + if (analytics.requestFeedbackOnDeploy()) { + feedbackModal.show() + } } catch (err) { analytics.captureEvent("Deploy App Failed", { appId, @@ -61,7 +64,7 @@ alt="Rocket flying through sky" /> - + feedbackModal.hide()} /> From 3d126579ce8990f54ab50d8f50cc8510546f40e5 Mon Sep 17 00:00:00 2001 From: Michael Shanks Date: Mon, 26 Oct 2020 11:35:38 +0000 Subject: [PATCH 5/5] Feedback check interval to const --- .../components/userInterface/Feedback/FeedbackNavLink.svelte | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/builder/src/components/userInterface/Feedback/FeedbackNavLink.svelte b/packages/builder/src/components/userInterface/Feedback/FeedbackNavLink.svelte index 535cb4d3f4..5299e7d5c0 100644 --- a/packages/builder/src/components/userInterface/Feedback/FeedbackNavLink.svelte +++ b/packages/builder/src/components/userInterface/Feedback/FeedbackNavLink.svelte @@ -6,12 +6,14 @@ import FeedbackIframe from "./FeedbackIframe.svelte" import analytics from "analytics" + const FIVE_MINUTES = 300000 + let iconContainer let popover setInterval(() => { $store.highlightFeedbackIcon = analytics.highlightFeedbackIcon() - }, 300000 /*check every 5 minutes*/) + }, FIVE_MINUTES)