From 014eaf8c83ca3aaa10c4c0323e003ed654926a81 Mon Sep 17 00:00:00 2001 From: Dean Date: Wed, 1 Feb 2023 12:14:10 +0000 Subject: [PATCH] Added a tenant feature flag for the onboarding tour --- packages/builder/src/helpers/featureFlags.js | 1 + .../src/pages/builder/app/[application]/_layout.svelte | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/packages/builder/src/helpers/featureFlags.js b/packages/builder/src/helpers/featureFlags.js index ae6646bd9f..bc937064f2 100644 --- a/packages/builder/src/helpers/featureFlags.js +++ b/packages/builder/src/helpers/featureFlags.js @@ -4,6 +4,7 @@ import { get } from "svelte/store" export const TENANT_FEATURE_FLAGS = { LICENSING: "LICENSING", USER_GROUPS: "USER_GROUPS", + ONBOADING_TOUR: "ONBOADING_TOUR", } export const isEnabled = featureFlag => { diff --git a/packages/builder/src/pages/builder/app/[application]/_layout.svelte b/packages/builder/src/pages/builder/app/[application]/_layout.svelte index c99776320f..43efe279a8 100644 --- a/packages/builder/src/pages/builder/app/[application]/_layout.svelte +++ b/packages/builder/src/pages/builder/app/[application]/_layout.svelte @@ -2,6 +2,7 @@ import { store, automationStore } from "builderStore" import { roles, flags } from "stores/backend" import { auth } from "stores/portal" + import { TENANT_FEATURE_FLAGS, isEnabled } from "helpers/featureFlags" import { ActionMenu, MenuItem, @@ -68,7 +69,10 @@ } const initTour = async () => { - if (!$auth.user?.onboardedAt) { + if ( + !$auth.user?.onboardedAt && + isEnabled(TENANT_FEATURE_FLAGS.ONBOADING_TOUR) + ) { // Determine the correct step const activeNav = $layout.children.find(c => $isActive(c.path)) const onboardingTour = TOURS[TOUR_KEYS.TOUR_BUILDER_ONBOARDING]