diff --git a/packages/bbui/src/Form/Core/Picker.svelte b/packages/bbui/src/Form/Core/Picker.svelte index e7de91a7ab..e2456271c7 100644 --- a/packages/bbui/src/Form/Core/Picker.svelte +++ b/packages/bbui/src/Form/Core/Picker.svelte @@ -18,7 +18,7 @@ export let onSelectOption = () => {} export let getOptionLabel = option => option export let getOptionValue = option => option - export let getOptionIcon = null + export let getOptionIcon = () => null export let open = false export let readonly = false export let quiet = false @@ -45,7 +45,7 @@ > {#if fieldIcon} - + {/if} @@ -115,7 +115,7 @@ diff --git a/packages/bbui/src/Form/Core/Select.svelte b/packages/bbui/src/Form/Core/Select.svelte index 398672af10..a815ae2948 100644 --- a/packages/bbui/src/Form/Core/Select.svelte +++ b/packages/bbui/src/Form/Core/Select.svelte @@ -10,7 +10,7 @@ export let options = [] export let getOptionLabel = option => option export let getOptionValue = option => option - export let getOptionIcon = null + export let getOptionIcon = () => null export let readonly = false export let quiet = false export let autoWidth = false diff --git a/packages/builder/src/components/deploy/DeployModal.svelte b/packages/builder/src/components/deploy/DeployModal.svelte index 6e1b5f76e9..4daa16c7c4 100644 --- a/packages/builder/src/components/deploy/DeployModal.svelte +++ b/packages/builder/src/components/deploy/DeployModal.svelte @@ -1,8 +1,6 @@ - - - - - - Loading... - - - - - diff --git a/packages/builder/src/components/feedback/FeedbackNavLink.svelte b/packages/builder/src/components/feedback/FeedbackNavLink.svelte deleted file mode 100644 index 0c7786aa44..0000000000 --- a/packages/builder/src/components/feedback/FeedbackNavLink.svelte +++ /dev/null @@ -1,52 +0,0 @@ - - - - - - - - - - - - diff --git a/packages/builder/src/components/feedback/NPSFeedbackForm.svelte b/packages/builder/src/components/feedback/NPSFeedbackForm.svelte new file mode 100644 index 0000000000..e0ba0e7525 --- /dev/null +++ b/packages/builder/src/components/feedback/NPSFeedbackForm.svelte @@ -0,0 +1,168 @@ + + + + + + + + + {#if step === 0} + How likely are you to recommend Budibase to a colleague? + + + {#each ratings as number} + selectNumber(number)} + > + {number} + + {/each} + + + {:else if step === 1} + What could be improved most in Budibase? + + + + {:else} + How can we improve your experience? + + + + {/if} + + + + + diff --git a/packages/builder/src/constants/backend/index.js b/packages/builder/src/constants/backend/index.js index de49883cf1..88152deb0f 100644 --- a/packages/builder/src/constants/backend/index.js +++ b/packages/builder/src/constants/backend/index.js @@ -1,7 +1,6 @@ export const FIELDS = { STRING: { name: "Text", - icon: "ri-text", type: "string", constraints: { type: "string", @@ -11,7 +10,6 @@ export const FIELDS = { }, LONGFORM: { name: "Long Form Text", - icon: "ri-file-text-line", type: "longform", constraints: { type: "string", @@ -21,7 +19,6 @@ export const FIELDS = { }, OPTIONS: { name: "Options", - icon: "ri-list-check-2", type: "options", constraints: { type: "string", @@ -31,7 +28,6 @@ export const FIELDS = { }, NUMBER: { name: "Number", - icon: "ri-number-1", type: "number", constraints: { type: "number", @@ -41,7 +37,6 @@ export const FIELDS = { }, BOOLEAN: { name: "Boolean", - icon: "ri-toggle-line", type: "boolean", constraints: { type: "boolean", @@ -50,7 +45,6 @@ export const FIELDS = { }, DATETIME: { name: "Date/Time", - icon: "ri-calendar-event-fill", type: "datetime", constraints: { type: "string", @@ -64,7 +58,6 @@ export const FIELDS = { }, ATTACHMENT: { name: "Attachment", - icon: "ri-file-line", type: "attachment", constraints: { type: "array", @@ -73,7 +66,6 @@ export const FIELDS = { }, LINK: { name: "Relationship", - icon: "ri-link", type: "link", constraints: { type: "array", @@ -82,7 +74,6 @@ export const FIELDS = { }, FORMULA: { name: "Formula", - icon: "ri-braces-line", type: "formula", constraints: { type: "string", diff --git a/packages/builder/src/pages/builder/app/[application]/_layout.svelte b/packages/builder/src/pages/builder/app/[application]/_layout.svelte index f3ae6e7c8e..7b0d09844f 100644 --- a/packages/builder/src/pages/builder/app/[application]/_layout.svelte +++ b/packages/builder/src/pages/builder/app/[application]/_layout.svelte @@ -5,7 +5,9 @@ import DeployModal from "components/deploy/DeployModal.svelte" import RevertModal from "components/deploy/RevertModal.svelte" import VersionModal from "components/deploy/VersionModal.svelte" + import NPSFeedbackForm from "components/feedback/NPSFeedbackForm.svelte" import { get } from "builderStore/api" + import { auth } from "stores/portal" import { isActive, goto, layout } from "@roxi/routify" import Logo from "assets/bb-emblem.svg" import { capitalise } from "helpers" @@ -18,6 +20,15 @@ $layout.children.find(layout => $isActive(layout.path))?.title ?? "data" ) + let userShouldPostFeedback = false + + function previewApp() { + if (!$auth?.user?.flags?.feedbackSubmitted) { + userShouldPostFeedback = true + } + window.open(`/${application}`) + } + async function getPackage() { const res = await get(`/api/applications/${application}/appPackage`) const pkg = await res.json() @@ -83,13 +94,7 @@ - { - window.open(`/${application}`) - }} - /> + @@ -99,6 +104,10 @@ Something went wrong: {error.message} {/await} +{#if userShouldPostFeedback} + (userShouldPostFeedback = false)} /> +{/if} +
Something went wrong: {error.message}