fix(editor): Cleanup demo/video experiment (#5974)

This commit is contained in:
Ricardo Espinoza
2023-04-18 07:28:12 -04:00
committed by GitHub
parent 1bb987140a
commit c171365d2a
5 changed files with 6 additions and 66 deletions

View File

@@ -2533,35 +2533,7 @@ export default mixins(
},
async tryToAddWelcomeSticky(): Promise<void> {
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<void> {
if (this.$route.params.action === 'workflowSave') {