From c171365d2a613ea1fb9b08c22c54be29d1c8ade7 Mon Sep 17 00:00:00 2001 From: Ricardo Espinoza Date: Tue, 18 Apr 2023 07:28:12 -0400 Subject: [PATCH] fix(editor): Cleanup demo/video experiment (#5974) --- packages/editor-ui/src/constants.ts | 9 +----- packages/editor-ui/src/utils/nodeViewUtils.ts | 11 ------- packages/editor-ui/src/views/NodeView.vue | 30 +------------------ packages/editor-ui/src/views/SetupView.vue | 7 ++--- .../editor-ui/src/views/WorkflowsView.vue | 15 ++-------- 5 files changed, 6 insertions(+), 66 deletions(-) diff --git a/packages/editor-ui/src/constants.ts b/packages/editor-ui/src/constants.ts index b74bc5bbf8..f123b23d09 100644 --- a/packages/editor-ui/src/constants.ts +++ b/packages/editor-ui/src/constants.ts @@ -536,19 +536,12 @@ export const KEEP_AUTH_IN_NDV_FOR_NODES = [HTTP_REQUEST_NODE_TYPE, WEBHOOK_NODE_ export const MAIN_AUTH_FIELD_NAME = 'authentication'; export const NODE_RESOURCE_FIELD_NAME = 'resource'; -export const ASSUMPTION_EXPERIMENT = { - name: 'adore-assumption-tests-1', - control: 'control', - demo: 'assumption-demo', - video: 'assumption-video', -}; - export const ONBOARDING_EXPERIMENT = { name: 'checklist_001', control: 'control', variant: 'variant', }; -export const EXPERIMENTS_TO_TRACK = [ASSUMPTION_EXPERIMENT.name, ONBOARDING_EXPERIMENT.name]; +export const EXPERIMENTS_TO_TRACK = [ONBOARDING_EXPERIMENT.name]; export const NODE_TYPES_EXCLUDED_FROM_OUTPUT_NAME_APPEND = [FILTER_NODE_TYPE]; diff --git a/packages/editor-ui/src/utils/nodeViewUtils.ts b/packages/editor-ui/src/utils/nodeViewUtils.ts index a626537ed1..6884924a38 100644 --- a/packages/editor-ui/src/utils/nodeViewUtils.ts +++ b/packages/editor-ui/src/utils/nodeViewUtils.ts @@ -62,17 +62,6 @@ export const DEFAULT_PLACEHOLDER_TRIGGER_BUTTON = { }, }; -export const WELCOME_STICKY_NODE = { - name: QUICKSTART_NOTE_NAME, - type: STICKY_NODE_TYPE, - typeVersion: 1, - position: [0, 0] as XYPosition, - parameters: { - height: 320, - width: 380, - }, -}; - export const CONNECTOR_FLOWCHART_TYPE: ConnectorSpec = { type: N8nConnector.type, options: { diff --git a/packages/editor-ui/src/views/NodeView.vue b/packages/editor-ui/src/views/NodeView.vue index b7a8f66eb8..470f06faf7 100644 --- a/packages/editor-ui/src/views/NodeView.vue +++ b/packages/editor-ui/src/views/NodeView.vue @@ -2533,35 +2533,7 @@ export default mixins( }, async tryToAddWelcomeSticky(): Promise { const newWorkflow = this.workflowData; - if (usePostHog().isVariantEnabled(ASSUMPTION_EXPERIMENT.name, ASSUMPTION_EXPERIMENT.video)) { - // For novice users (onboardingFlowEnabled == true) - // Inject welcome sticky note and zoom to fit - - if (newWorkflow?.onboardingFlowEnabled && !this.isReadOnly) { - // Position the welcome sticky left to the added trigger node - const position: XYPosition = [50, 250]; - - await this.addNodes([ - { - id: uuid(), - ...NodeViewUtils.WELCOME_STICKY_NODE, - parameters: { - // Use parameters from the template but add translated content - ...NodeViewUtils.WELCOME_STICKY_NODE.parameters, - content: this.$locale.baseText('onboardingWorkflow.stickyContent'), - }, - position, - }, - ]); - setTimeout(() => { - this.canvasStore.zoomToFit(); - this.canvasStore.canvasAddButtonPosition = [500, 350]; - this.$telemetry.track('welcome note inserted'); - }, 0); - } - } else { - this.canvasStore.zoomToFit(); - } + this.canvasStore.zoomToFit(); }, async initView(): Promise { if (this.$route.params.action === 'workflowSave') { diff --git a/packages/editor-ui/src/views/SetupView.vue b/packages/editor-ui/src/views/SetupView.vue index 14a362f1e8..87b46c2b94 100644 --- a/packages/editor-ui/src/views/SetupView.vue +++ b/packages/editor-ui/src/views/SetupView.vue @@ -101,9 +101,6 @@ export default mixins(showMessage, restApi).extend({ }, computed: { ...mapStores(useCredentialsStore, useSettingsStore, useUIStore, useUsersStore), - isDemoTest(): boolean { - return usePostHog().isVariantEnabled(ASSUMPTION_EXPERIMENT.name, ASSUMPTION_EXPERIMENT.demo); - }, }, methods: { async confirmSetupOrGoBack(): Promise { @@ -163,7 +160,7 @@ export default mixins(showMessage, restApi).extend({ } if (forceRedirectedHere) { - await this.$router.push({ name: this.isDemoTest ? VIEWS.HOMEPAGE : VIEWS.NEW_WORKFLOW }); + await this.$router.push({ name: VIEWS.NEW_WORKFLOW }); } else { await this.$router.push({ name: VIEWS.USERS_SETTINGS }); } @@ -187,7 +184,7 @@ export default mixins(showMessage, restApi).extend({ onSkip() { this.usersStore.skipOwnerSetup(); this.$router.push({ - name: this.isDemoTest ? VIEWS.HOMEPAGE : VIEWS.NEW_WORKFLOW, + name: VIEWS.NEW_WORKFLOW, }); }, }, diff --git a/packages/editor-ui/src/views/WorkflowsView.vue b/packages/editor-ui/src/views/WorkflowsView.vue index 4d718b1c2c..5311c1c6bb 100644 --- a/packages/editor-ui/src/views/WorkflowsView.vue +++ b/packages/editor-ui/src/views/WorkflowsView.vue @@ -11,7 +11,7 @@ @click:add="addWorkflow" @update:filters="filters = $event" > -