From 1ab022a0af1cd4d37a1a1a9c92c15156177e371f Mon Sep 17 00:00:00 2001 From: Martin McKeaveney Date: Tue, 7 Jun 2022 16:40:43 +0100 Subject: [PATCH 1/2] start of beta panel --- .../src/components/beta/BetaTab.svelte | 26 +++++++++++++++++++ .../app/[application]/beta/_layout.svelte | 8 ++++++ .../app/[application]/beta/index.svelte | 5 ++++ .../overview/[application]/index.svelte | 4 +++ .../components/preview/IndicatorSet.svelte | 2 +- packages/server/yarn.lock | 9 ------- packages/worker/yarn.lock | 9 ------- 7 files changed, 44 insertions(+), 19 deletions(-) create mode 100644 packages/builder/src/components/beta/BetaTab.svelte create mode 100644 packages/builder/src/pages/builder/app/[application]/beta/_layout.svelte create mode 100644 packages/builder/src/pages/builder/app/[application]/beta/index.svelte diff --git a/packages/builder/src/components/beta/BetaTab.svelte b/packages/builder/src/components/beta/BetaTab.svelte new file mode 100644 index 0000000000..e8c484eba1 --- /dev/null +++ b/packages/builder/src/components/beta/BetaTab.svelte @@ -0,0 +1,26 @@ + + + + Beta Builder + + Your account has been given access to the budibase beta program. We would + love to hear what you think and get your feedback and suggestions on the new + Design UI. + + + + diff --git a/packages/builder/src/pages/builder/app/[application]/beta/_layout.svelte b/packages/builder/src/pages/builder/app/[application]/beta/_layout.svelte new file mode 100644 index 0000000000..8d61c96488 --- /dev/null +++ b/packages/builder/src/pages/builder/app/[application]/beta/_layout.svelte @@ -0,0 +1,8 @@ + + + + + + diff --git a/packages/builder/src/pages/builder/app/[application]/beta/index.svelte b/packages/builder/src/pages/builder/app/[application]/beta/index.svelte new file mode 100644 index 0000000000..79125ea2c2 --- /dev/null +++ b/packages/builder/src/pages/builder/app/[application]/beta/index.svelte @@ -0,0 +1,5 @@ + + + diff --git a/packages/builder/src/pages/builder/portal/overview/[application]/index.svelte b/packages/builder/src/pages/builder/portal/overview/[application]/index.svelte index 807110e03e..d4a5cb745a 100644 --- a/packages/builder/src/pages/builder/portal/overview/[application]/index.svelte +++ b/packages/builder/src/pages/builder/portal/overview/[application]/index.svelte @@ -27,6 +27,7 @@ import AppLockModal from "components/common/AppLockModal.svelte" import EditableIcon from "components/common/EditableIcon.svelte" import ConfirmDialog from "components/common/ConfirmDialog.svelte" + import BetaTab from "components/beta/BetaTab.svelte" import { checkIncomingDeploymentStatus } from "components/deploy/utils" import { onDestroy, onMount } from "svelte" @@ -318,6 +319,9 @@ + + + >>>>>> eaf3eea73d7d2927f5b87f5fede628947362297a node-fetch "^2.6.1" "@budibase/standard-components@^0.9.139": diff --git a/packages/worker/yarn.lock b/packages/worker/yarn.lock index 39f2be96e2..619a4f2808 100644 --- a/packages/worker/yarn.lock +++ b/packages/worker/yarn.lock @@ -322,21 +322,12 @@ uuid "^8.3.2" zlib "^1.0.5" -<<<<<<< HEAD "@budibase/pro@1.0.178-alpha.0": version "1.0.178-alpha.0" resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-1.0.178-alpha.0.tgz#40a137cdde7f467034d0684882b97e3e4e34a706" integrity sha512-q2XboAmumM2eczhbye/dLcnqkrk9cqXlcGP4IjpNvaNfgFx3Q0pYncr18J5DmmcFoPF+J1zZux5M48dLZxfOCg== dependencies: "@budibase/backend-core" "1.0.178-alpha.0" -======= -"@budibase/pro@^1.0.175": - version "1.0.175" - resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-1.0.175.tgz#1d8ddc698ad17e2f5d73b1ab741c6641da4bda47" - integrity sha512-iGqOtsXeO5bHcg4IJjg8NwOK5bNjI3TnJCr7PtcTjlLyZyCyj+onL2GTk3A6X+d1ZKSQKy9bl3Q+hIsdbZ9GIg== - dependencies: - "@budibase/backend-core" "1.0.175" ->>>>>>> eaf3eea73d7d2927f5b87f5fede628947362297a node-fetch "^2.6.1" "@cspotcode/source-map-consumer@0.8.0": From 02320c0ee036a910bb727f4257ee8454e22ca26f Mon Sep 17 00:00:00 2001 From: Martin McKeaveney Date: Wed, 8 Jun 2022 10:20:47 +0100 Subject: [PATCH 2/2] Beta tab initial test for E2E, needs styled --- packages/builder/src/components/beta/BetaTab.svelte | 6 +++--- packages/builder/src/stores/backend/flags.js | 3 +++ packages/frontend-core/src/api/flags.js | 9 +++++++++ 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/packages/builder/src/components/beta/BetaTab.svelte b/packages/builder/src/components/beta/BetaTab.svelte index e8c484eba1..145fcf9b68 100644 --- a/packages/builder/src/components/beta/BetaTab.svelte +++ b/packages/builder/src/components/beta/BetaTab.svelte @@ -1,13 +1,13 @@ diff --git a/packages/builder/src/stores/backend/flags.js b/packages/builder/src/stores/backend/flags.js index 449d010640..9f1652676c 100644 --- a/packages/builder/src/stores/backend/flags.js +++ b/packages/builder/src/stores/backend/flags.js @@ -16,6 +16,9 @@ export function createFlagsStore() { }) await actions.fetch() }, + toggleUiFeature: async feature => { + await API.toggleUiFeature({ value: feature }) + }, } return { diff --git a/packages/frontend-core/src/api/flags.js b/packages/frontend-core/src/api/flags.js index bb545e83b9..16adeb7b5d 100644 --- a/packages/frontend-core/src/api/flags.js +++ b/packages/frontend-core/src/api/flags.js @@ -22,4 +22,13 @@ export const buildFlagEndpoints = API => ({ }, }) }, + /** + * Allows us to experimentally toggle a beta UI feature through a cookie. + * @param value the feature to toggle + */ + toggleUiFeature: async ({ value }) => { + return await API.post({ + url: `/api/beta/${value}`, + }) + }, })