From 58ef8d59b5dd7aab1190f091ed45930a9b3c540a Mon Sep 17 00:00:00 2001 From: George Gevoian Date: Wed, 29 Mar 2023 09:14:30 -0400 Subject: [PATCH] (core) Show coaching popup after Add New tip is dismissed Summary: This is to prevent too many popups from being shown on screen at any given moment. Test Plan: Tested manually. Reviewers: jarek Reviewed By: jarek Differential Revision: https://phab.getgrist.com/D3841 --- app/client/components/BehavioralPromptsManager.ts | 4 ++++ test/nbrowser/gristUtils.ts | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/app/client/components/BehavioralPromptsManager.ts b/app/client/components/BehavioralPromptsManager.ts index a7f7ec06..6d1a2c4f 100644 --- a/app/client/components/BehavioralPromptsManager.ts +++ b/app/client/components/BehavioralPromptsManager.ts @@ -63,6 +63,10 @@ export class BehavioralPromptsManager extends Disposable { return this._dismissedTips.get().has(prompt); } + public shouldShowTips() { + return !this._prefs.get().dontShowTips; + } + private _queueTip(refElement: Element, prompt: BehavioralPrompt, options: AttachOptions) { if ( // Don't show tips if surveying is disabled. diff --git a/test/nbrowser/gristUtils.ts b/test/nbrowser/gristUtils.ts index 695aba3d..531735a0 100644 --- a/test/nbrowser/gristUtils.ts +++ b/test/nbrowser/gristUtils.ts @@ -751,7 +751,7 @@ export async function reloadDoc() { * Wait for the doc list to show, to know that workspaces are fetched, and imports enabled. */ export async function waitForDocMenuToLoad(): Promise { - await driver.findWait('.test-dm-doclist', 1000); + await driver.findWait('.test-dm-doclist', 2000); await driver.wait(() => driver.find('.test-dm-doclist').isDisplayed(), 2000); }