Merge remote-tracking branch 'origin/develop' into feature/templates-home-screen
This commit is contained in:
commit
768f9e8679
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"version": "1.0.91-alpha.7",
|
"version": "1.0.91-alpha.9",
|
||||||
"npmClient": "yarn",
|
"npmClient": "yarn",
|
||||||
"packages": [
|
"packages": [
|
||||||
"packages/*"
|
"packages/*"
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "@budibase/backend-core",
|
"name": "@budibase/backend-core",
|
||||||
"version": "1.0.91-alpha.7",
|
"version": "1.0.91-alpha.9",
|
||||||
"description": "Budibase backend core libraries used in server and worker",
|
"description": "Budibase backend core libraries used in server and worker",
|
||||||
"main": "src/index.js",
|
"main": "src/index.js",
|
||||||
"author": "Budibase",
|
"author": "Budibase",
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"name": "@budibase/bbui",
|
"name": "@budibase/bbui",
|
||||||
"description": "A UI solution used in the different Budibase projects.",
|
"description": "A UI solution used in the different Budibase projects.",
|
||||||
"version": "1.0.91-alpha.7",
|
"version": "1.0.91-alpha.9",
|
||||||
"license": "MPL-2.0",
|
"license": "MPL-2.0",
|
||||||
"svelte": "src/index.js",
|
"svelte": "src/index.js",
|
||||||
"module": "dist/bbui.es.js",
|
"module": "dist/bbui.es.js",
|
||||||
|
@ -38,7 +38,7 @@
|
||||||
],
|
],
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@adobe/spectrum-css-workflow-icons": "^1.2.1",
|
"@adobe/spectrum-css-workflow-icons": "^1.2.1",
|
||||||
"@budibase/string-templates": "^1.0.91-alpha.7",
|
"@budibase/string-templates": "^1.0.91-alpha.9",
|
||||||
"@spectrum-css/actionbutton": "^1.0.1",
|
"@spectrum-css/actionbutton": "^1.0.1",
|
||||||
"@spectrum-css/actiongroup": "^1.0.1",
|
"@spectrum-css/actiongroup": "^1.0.1",
|
||||||
"@spectrum-css/avatar": "^3.0.2",
|
"@spectrum-css/avatar": "^3.0.2",
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "@budibase/builder",
|
"name": "@budibase/builder",
|
||||||
"version": "1.0.91-alpha.7",
|
"version": "1.0.91-alpha.9",
|
||||||
"license": "GPL-3.0",
|
"license": "GPL-3.0",
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
@ -65,10 +65,10 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@budibase/bbui": "^1.0.91-alpha.7",
|
"@budibase/bbui": "^1.0.91-alpha.9",
|
||||||
"@budibase/client": "^1.0.91-alpha.7",
|
"@budibase/client": "^1.0.91-alpha.9",
|
||||||
"@budibase/frontend-core": "^1.0.91-alpha.7",
|
"@budibase/frontend-core": "^1.0.91-alpha.9",
|
||||||
"@budibase/string-templates": "^1.0.91-alpha.7",
|
"@budibase/string-templates": "^1.0.91-alpha.9",
|
||||||
"@sentry/browser": "5.19.1",
|
"@sentry/browser": "5.19.1",
|
||||||
"@spectrum-css/page": "^3.0.1",
|
"@spectrum-css/page": "^3.0.1",
|
||||||
"@spectrum-css/vars": "^3.0.1",
|
"@spectrum-css/vars": "^3.0.1",
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
Modal,
|
Modal,
|
||||||
notifications,
|
notifications,
|
||||||
} from "@budibase/bbui"
|
} from "@budibase/bbui"
|
||||||
import { createEventDispatcher } from "svelte"
|
import { createEventDispatcher, onMount } from "svelte"
|
||||||
import { cloneDeep } from "lodash/fp"
|
import { cloneDeep } from "lodash/fp"
|
||||||
import { tables } from "stores/backend"
|
import { tables } from "stores/backend"
|
||||||
import { TableNames, UNEDITABLE_USER_FIELDS } from "constants"
|
import { TableNames, UNEDITABLE_USER_FIELDS } from "constants"
|
||||||
|
@ -321,6 +321,12 @@
|
||||||
}
|
}
|
||||||
return newError
|
return newError
|
||||||
}
|
}
|
||||||
|
|
||||||
|
onMount(() => {
|
||||||
|
if (primaryDisplay) {
|
||||||
|
field.constraints.presence = { allowEmpty: false }
|
||||||
|
}
|
||||||
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<ModalContent
|
<ModalContent
|
||||||
|
|
|
@ -1,171 +0,0 @@
|
||||||
<script>
|
|
||||||
import analytics from "analytics"
|
|
||||||
import { createEventDispatcher } from "svelte"
|
|
||||||
import { fade, fly } from "svelte/transition"
|
|
||||||
import {
|
|
||||||
ActionButton,
|
|
||||||
ClearButton,
|
|
||||||
RadioGroup,
|
|
||||||
TextArea,
|
|
||||||
ButtonGroup,
|
|
||||||
Button,
|
|
||||||
Heading,
|
|
||||||
Detail,
|
|
||||||
Divider,
|
|
||||||
Layout,
|
|
||||||
notifications,
|
|
||||||
} from "@budibase/bbui"
|
|
||||||
import { auth } from "stores/portal"
|
|
||||||
|
|
||||||
let step = 0
|
|
||||||
let ratings = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
|
|
||||||
let options = [
|
|
||||||
"Importing / managing data",
|
|
||||||
"Designing",
|
|
||||||
"Automations",
|
|
||||||
"Managing users / groups",
|
|
||||||
"Deployment / hosting",
|
|
||||||
"Documentation",
|
|
||||||
]
|
|
||||||
|
|
||||||
const dispatch = createEventDispatcher()
|
|
||||||
|
|
||||||
// Data to send off
|
|
||||||
let rating
|
|
||||||
let improvements = ""
|
|
||||||
let comment = ""
|
|
||||||
|
|
||||||
function selectNumber(n) {
|
|
||||||
rating = n
|
|
||||||
step = 1
|
|
||||||
}
|
|
||||||
|
|
||||||
function submitFeedback() {
|
|
||||||
analytics.submitFeedback({
|
|
||||||
rating,
|
|
||||||
improvements,
|
|
||||||
comment,
|
|
||||||
})
|
|
||||||
try {
|
|
||||||
auth.updateSelf({
|
|
||||||
flags: {
|
|
||||||
feedbackSubmitted: true,
|
|
||||||
},
|
|
||||||
})
|
|
||||||
} catch (error) {
|
|
||||||
notifications.error("Error updating user")
|
|
||||||
}
|
|
||||||
dispatch("complete")
|
|
||||||
}
|
|
||||||
|
|
||||||
function cancelFeedback() {
|
|
||||||
try {
|
|
||||||
auth.updateSelf({
|
|
||||||
flags: {
|
|
||||||
feedbackSubmitted: true,
|
|
||||||
},
|
|
||||||
})
|
|
||||||
} catch (error) {
|
|
||||||
notifications.error("Error updating user")
|
|
||||||
}
|
|
||||||
dispatch("complete")
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<div
|
|
||||||
class="position"
|
|
||||||
in:fade={{ duration: 200 }}
|
|
||||||
out:fade|local={{ duration: 200 }}
|
|
||||||
>
|
|
||||||
<div
|
|
||||||
class="feedback-frame"
|
|
||||||
in:fly={{ y: 30, duration: 200 }}
|
|
||||||
out:fly|local={{ y: 30, duration: 200 }}
|
|
||||||
>
|
|
||||||
<div class="close">
|
|
||||||
<ClearButton on:click={cancelFeedback} />
|
|
||||||
</div>
|
|
||||||
<Layout gap="XS">
|
|
||||||
{#if step === 0}
|
|
||||||
<Heading size="XS"
|
|
||||||
>How likely are you to recommend Budibase to a colleague?</Heading
|
|
||||||
>
|
|
||||||
<Divider />
|
|
||||||
<div class="ratings">
|
|
||||||
{#each ratings as number}
|
|
||||||
<ActionButton
|
|
||||||
size="L"
|
|
||||||
emphasized
|
|
||||||
selected={number === rating}
|
|
||||||
on:click={() => selectNumber(number)}
|
|
||||||
>
|
|
||||||
{number}
|
|
||||||
</ActionButton>
|
|
||||||
{/each}
|
|
||||||
</div>
|
|
||||||
<div class="footer">
|
|
||||||
<Detail size="S">NOT LIKELY</Detail>
|
|
||||||
<Detail size="S">EXTREMELY LIKELY</Detail>
|
|
||||||
</div>
|
|
||||||
{:else if step === 1}
|
|
||||||
<Heading size="XS">What could be improved most in Budibase?</Heading>
|
|
||||||
<Divider />
|
|
||||||
<RadioGroup bind:value={improvements} {options} />
|
|
||||||
<div class="footer">
|
|
||||||
<Detail size="S">STEP 2 OF 3</Detail>
|
|
||||||
<ButtonGroup>
|
|
||||||
<Button secondary on:click={() => (step -= 1)}>Previous</Button>
|
|
||||||
<Button primary on:click={() => (step += 1)}>Next</Button>
|
|
||||||
</ButtonGroup>
|
|
||||||
</div>
|
|
||||||
{:else}
|
|
||||||
<Heading size="XS">How can we improve your experience?</Heading>
|
|
||||||
<Divider />
|
|
||||||
<TextArea bind:value={comment} placeholder="Add comments" />
|
|
||||||
<div class="footer">
|
|
||||||
<Detail size="S">STEP 3 OF 3</Detail>
|
|
||||||
<ButtonGroup>
|
|
||||||
<Button secondary on:click={() => (step -= 1)}>Previous</Button>
|
|
||||||
<Button cta on:click={submitFeedback}>Complete</Button>
|
|
||||||
</ButtonGroup>
|
|
||||||
</div>
|
|
||||||
{/if}
|
|
||||||
</Layout>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<style>
|
|
||||||
.feedback-frame :global(textarea) {
|
|
||||||
min-height: 180px !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.position {
|
|
||||||
position: absolute;
|
|
||||||
right: var(--spacing-l);
|
|
||||||
bottom: calc(5 * var(--spacing-xl));
|
|
||||||
}
|
|
||||||
.feedback-frame {
|
|
||||||
position: absolute;
|
|
||||||
bottom: 0;
|
|
||||||
right: 0;
|
|
||||||
min-width: 510px;
|
|
||||||
background: var(--background);
|
|
||||||
border-radius: var(--spectrum-global-dimension-size-50);
|
|
||||||
border: 2px solid var(--spectrum-global-color-blue-400);
|
|
||||||
padding: var(--spacing-xl);
|
|
||||||
}
|
|
||||||
.ratings {
|
|
||||||
display: flex;
|
|
||||||
justify-content: space-between;
|
|
||||||
}
|
|
||||||
.close {
|
|
||||||
position: absolute;
|
|
||||||
top: 0;
|
|
||||||
right: 0;
|
|
||||||
}
|
|
||||||
.footer {
|
|
||||||
display: flex;
|
|
||||||
justify-content: space-between;
|
|
||||||
align-items: center;
|
|
||||||
}
|
|
||||||
</style>
|
|
|
@ -5,7 +5,6 @@
|
||||||
import DeployModal from "components/deploy/DeployModal.svelte"
|
import DeployModal from "components/deploy/DeployModal.svelte"
|
||||||
import RevertModal from "components/deploy/RevertModal.svelte"
|
import RevertModal from "components/deploy/RevertModal.svelte"
|
||||||
import VersionModal from "components/deploy/VersionModal.svelte"
|
import VersionModal from "components/deploy/VersionModal.svelte"
|
||||||
import NPSFeedbackForm from "components/feedback/NPSFeedbackForm.svelte"
|
|
||||||
import { API } from "api"
|
import { API } from "api"
|
||||||
import { auth, admin } from "stores/portal"
|
import { auth, admin } from "stores/portal"
|
||||||
import { isActive, goto, layout, redirect } from "@roxi/routify"
|
import { isActive, goto, layout, redirect } from "@roxi/routify"
|
||||||
|
@ -21,15 +20,11 @@
|
||||||
|
|
||||||
// Sync once when you load the app
|
// Sync once when you load the app
|
||||||
let hasSynced = false
|
let hasSynced = false
|
||||||
let userShouldPostFeedback = false
|
|
||||||
$: selected = capitalise(
|
$: selected = capitalise(
|
||||||
$layout.children.find(layout => $isActive(layout.path))?.title ?? "data"
|
$layout.children.find(layout => $isActive(layout.path))?.title ?? "data"
|
||||||
)
|
)
|
||||||
|
|
||||||
function previewApp() {
|
function previewApp() {
|
||||||
if (!$auth?.user?.flags?.feedbackSubmitted) {
|
|
||||||
userShouldPostFeedback = true
|
|
||||||
}
|
|
||||||
window.open(`/${application}`)
|
window.open(`/${application}`)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -126,10 +121,6 @@
|
||||||
<p>Something went wrong: {error.message}</p>
|
<p>Something went wrong: {error.message}</p>
|
||||||
{/await}
|
{/await}
|
||||||
|
|
||||||
{#if userShouldPostFeedback}
|
|
||||||
<NPSFeedbackForm on:complete={() => (userShouldPostFeedback = false)} />
|
|
||||||
{/if}
|
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
.loading {
|
.loading {
|
||||||
min-height: 100%;
|
min-height: 100%;
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "@budibase/cli",
|
"name": "@budibase/cli",
|
||||||
"version": "1.0.91-alpha.7",
|
"version": "1.0.91-alpha.9",
|
||||||
"description": "Budibase CLI, for developers, self hosting and migrations.",
|
"description": "Budibase CLI, for developers, self hosting and migrations.",
|
||||||
"main": "src/index.js",
|
"main": "src/index.js",
|
||||||
"bin": {
|
"bin": {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "@budibase/client",
|
"name": "@budibase/client",
|
||||||
"version": "1.0.91-alpha.7",
|
"version": "1.0.91-alpha.9",
|
||||||
"license": "MPL-2.0",
|
"license": "MPL-2.0",
|
||||||
"module": "dist/budibase-client.js",
|
"module": "dist/budibase-client.js",
|
||||||
"main": "dist/budibase-client.js",
|
"main": "dist/budibase-client.js",
|
||||||
|
@ -19,9 +19,9 @@
|
||||||
"dev:builder": "rollup -cw"
|
"dev:builder": "rollup -cw"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@budibase/bbui": "^1.0.91-alpha.7",
|
"@budibase/bbui": "^1.0.91-alpha.9",
|
||||||
"@budibase/frontend-core": "^1.0.91-alpha.7",
|
"@budibase/frontend-core": "^1.0.91-alpha.9",
|
||||||
"@budibase/string-templates": "^1.0.91-alpha.7",
|
"@budibase/string-templates": "^1.0.91-alpha.9",
|
||||||
"@spectrum-css/button": "^3.0.3",
|
"@spectrum-css/button": "^3.0.3",
|
||||||
"@spectrum-css/card": "^3.0.3",
|
"@spectrum-css/card": "^3.0.3",
|
||||||
"@spectrum-css/divider": "^1.0.3",
|
"@spectrum-css/divider": "^1.0.3",
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
{
|
{
|
||||||
"name": "@budibase/frontend-core",
|
"name": "@budibase/frontend-core",
|
||||||
"version": "1.0.91-alpha.7",
|
"version": "1.0.91-alpha.9",
|
||||||
"description": "Budibase frontend core libraries used in builder and client",
|
"description": "Budibase frontend core libraries used in builder and client",
|
||||||
"author": "Budibase",
|
"author": "Budibase",
|
||||||
"license": "MPL-2.0",
|
"license": "MPL-2.0",
|
||||||
"svelte": "src/index.js",
|
"svelte": "src/index.js",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@budibase/bbui": "^1.0.91-alpha.7",
|
"@budibase/bbui": "^1.0.91-alpha.9",
|
||||||
"lodash": "^4.17.21",
|
"lodash": "^4.17.21",
|
||||||
"svelte": "^3.46.2"
|
"svelte": "^3.46.2"
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,7 +4,7 @@ export const buildAnalyticsEndpoints = API => ({
|
||||||
*/
|
*/
|
||||||
pingEndUser: async () => {
|
pingEndUser: async () => {
|
||||||
return await API.post({
|
return await API.post({
|
||||||
url: `/api/analytics/ping`,
|
url: `/api/bbtel/ping`,
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -13,7 +13,7 @@ export const buildAnalyticsEndpoints = API => ({
|
||||||
*/
|
*/
|
||||||
getAnalyticsStatus: async () => {
|
getAnalyticsStatus: async () => {
|
||||||
return await API.get({
|
return await API.get({
|
||||||
url: "/api/analytics",
|
url: "/api/bbtel",
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"name": "@budibase/server",
|
"name": "@budibase/server",
|
||||||
"email": "hi@budibase.com",
|
"email": "hi@budibase.com",
|
||||||
"version": "1.0.91-alpha.7",
|
"version": "1.0.91-alpha.9",
|
||||||
"description": "Budibase Web Server",
|
"description": "Budibase Web Server",
|
||||||
"main": "src/index.ts",
|
"main": "src/index.ts",
|
||||||
"repository": {
|
"repository": {
|
||||||
|
@ -71,9 +71,9 @@
|
||||||
"license": "GPL-3.0",
|
"license": "GPL-3.0",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@apidevtools/swagger-parser": "^10.0.3",
|
"@apidevtools/swagger-parser": "^10.0.3",
|
||||||
"@budibase/backend-core": "^1.0.91-alpha.7",
|
"@budibase/backend-core": "^1.0.91-alpha.9",
|
||||||
"@budibase/client": "^1.0.91-alpha.7",
|
"@budibase/client": "^1.0.91-alpha.9",
|
||||||
"@budibase/string-templates": "^1.0.91-alpha.7",
|
"@budibase/string-templates": "^1.0.91-alpha.9",
|
||||||
"@bull-board/api": "^3.7.0",
|
"@bull-board/api": "^3.7.0",
|
||||||
"@bull-board/koa": "^3.7.0",
|
"@bull-board/koa": "^3.7.0",
|
||||||
"@elastic/elasticsearch": "7.10.0",
|
"@elastic/elasticsearch": "7.10.0",
|
||||||
|
|
|
@ -4,7 +4,7 @@ const controller = require("../controllers/analytics")
|
||||||
const router = Router()
|
const router = Router()
|
||||||
|
|
||||||
router
|
router
|
||||||
.get("/api/analytics", controller.isEnabled)
|
.get("/api/bbtel", controller.isEnabled)
|
||||||
.post("/api/analytics/ping", controller.endUserPing)
|
.post("/api/bbtel/ping", controller.endUserPing)
|
||||||
|
|
||||||
module.exports = router
|
module.exports = router
|
||||||
|
|
|
@ -11,10 +11,10 @@ describe("run misc tests", () => {
|
||||||
await config.init()
|
await config.init()
|
||||||
})
|
})
|
||||||
|
|
||||||
describe("/analytics", () => {
|
describe("/bbtel", () => {
|
||||||
it("check if analytics enabled", async () => {
|
it("check if analytics enabled", async () => {
|
||||||
const res = await request
|
const res = await request
|
||||||
.get(`/api/analytics`)
|
.get(`/api/bbtel`)
|
||||||
.set(config.defaultHeaders())
|
.set(config.defaultHeaders())
|
||||||
.expect("Content-Type", /json/)
|
.expect("Content-Type", /json/)
|
||||||
.expect(200)
|
.expect(200)
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "@budibase/string-templates",
|
"name": "@budibase/string-templates",
|
||||||
"version": "1.0.91-alpha.7",
|
"version": "1.0.91-alpha.9",
|
||||||
"description": "Handlebars wrapper for Budibase templating.",
|
"description": "Handlebars wrapper for Budibase templating.",
|
||||||
"main": "src/index.cjs",
|
"main": "src/index.cjs",
|
||||||
"module": "dist/bundle.mjs",
|
"module": "dist/bundle.mjs",
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"name": "@budibase/worker",
|
"name": "@budibase/worker",
|
||||||
"email": "hi@budibase.com",
|
"email": "hi@budibase.com",
|
||||||
"version": "1.0.91-alpha.7",
|
"version": "1.0.91-alpha.9",
|
||||||
"description": "Budibase background service",
|
"description": "Budibase background service",
|
||||||
"main": "src/index.ts",
|
"main": "src/index.ts",
|
||||||
"repository": {
|
"repository": {
|
||||||
|
@ -34,8 +34,8 @@
|
||||||
"author": "Budibase",
|
"author": "Budibase",
|
||||||
"license": "GPL-3.0",
|
"license": "GPL-3.0",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@budibase/backend-core": "^1.0.91-alpha.7",
|
"@budibase/backend-core": "^1.0.91-alpha.9",
|
||||||
"@budibase/string-templates": "^1.0.91-alpha.7",
|
"@budibase/string-templates": "^1.0.91-alpha.9",
|
||||||
"@koa/router": "^8.0.0",
|
"@koa/router": "^8.0.0",
|
||||||
"@sentry/node": "^6.0.0",
|
"@sentry/node": "^6.0.0",
|
||||||
"@techpass/passport-openidconnect": "^0.3.0",
|
"@techpass/passport-openidconnect": "^0.3.0",
|
||||||
|
|
Loading…
Reference in New Issue