From 81810bd44b40425fdc604f84c742dc6ba817a9e1 Mon Sep 17 00:00:00 2001 From: Alex Hall Date: Fri, 26 Aug 2022 11:51:32 +0200 Subject: [PATCH] (core) Don't show doc/onboarding tour in embedded mode Summary: Tours don't really make sense when you can't see the full interface and document, so they're not shown when the interface style is 'light'. Discussion: https://grist.slack.com/archives/CDHABLZJT/p1661459343666569?thread_ts=1661183887.200899&cid=CDHABLZJT Test Plan: Extended nbrowser DocTour test Reviewers: paulfitz Reviewed By: paulfitz Differential Revision: https://phab.getgrist.com/D3607 --- app/client/components/GristDoc.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/client/components/GristDoc.ts b/app/client/components/GristDoc.ts index 3d4b754e..2ab31665 100644 --- a/app/client/components/GristDoc.ts +++ b/app/client/components/GristDoc.ts @@ -262,6 +262,10 @@ export class GristDoc extends DisposableWithEvents { if (isNarrowScreen()) { return; } + // Only start a tour when the full interface is showing, i.e. not when in embedded mode. + if (state.params?.style === 'light') { + return; + } // If we have an active tour (or are in the process of starting one), don't start a new one. if (tourStarting || isTourActive()) { return;