(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
This commit is contained in:
Alex Hall 2022-08-26 11:51:32 +02:00
parent 1c43aed5dd
commit 81810bd44b

View File

@ -262,6 +262,10 @@ export class GristDoc extends DisposableWithEvents {
if (isNarrowScreen()) { if (isNarrowScreen()) {
return; 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 we have an active tour (or are in the process of starting one), don't start a new one.
if (tourStarting || isTourActive()) { if (tourStarting || isTourActive()) {
return; return;