Invoke window modal for new users on first startup
Categories
(Firefox :: Messaging System, task, P2)
Tracking
()
Tracking | Status | |
---|---|---|
firefox110 | --- | verified |
People
(Reporter: pdahiya, Assigned: nsauermann)
References
(Depends on 1 open bug, Blocks 1 open bug, Regressed 1 open bug)
Details
Attachments
(1 file)
Scope of this bug is to investigate calling a window modal on first startup for new users enrolled in Nimbus experiment branch.
We should be able to call upgradeDialog similar to https://searchfox.org/mozilla-central/rev/2f47e3dacf0d773e9c7f363cecf10cfbea490679/browser/components/BrowserGlue.jsm#4433
from inside BrowserContentHandler
https://searchfox.org/mozilla-central/source/browser/components/BrowserContentHandler.jsm#689
Reporter | ||
Updated•1 year ago
|
Comment 1•1 year ago
|
||
I think it'd make sense to do the actual dialog opening in BrowserGlue, and set a flag so that BrowserContentHandler doesn't load about:welcome in this case. That way we don't have to add side effects to getArgs
The implementation is a bit trickier than anticipated, this is because we can't seem to load a window on startup with the current implementation because of when getTopWindow
gets called. Currently, on start up it returns null (and we need a window to render the messaging).
[@:aminomancer] suggested instead to edit openBrowserWindow
and check if the url is about:welcome
and isStartup
(so checking whether the user is viewing the onboarding flow on first load), and if so - use a dummy url instead (i.e. about:welcomedialog
) so we can add a flag/aren't opening two onboarding flows at the same time. In browser.js
we can then set a flag and replace the dummy URL with a generic homepage URL and from there open the dialog/window modal. Because of this implementation, we still need to open a first tab instead of about:welcome
, so I guess the question is what tab would we be loading if we go with this direction?
Reporter | ||
Updated•1 year ago
|
Reporter | ||
Updated•1 year ago
|
Updated•1 year ago
|
Updated•1 year ago
|
Updated•1 year ago
|
Updated•1 year ago
|
Pushed by smolnar@mozilla.com: https://hg.mozilla.org/mozilla-central/rev/35fd7fb9f3d3 Invoke window modal for new users on first startup r=pdahiya
Comment 5•1 year ago
|
||
bugherder |
Reporter | ||
Comment 6•1 year ago
•
|
||
Steps to test fix in Nightly
- Set pref 'browser.aboutwelcome.showModal' as true and 'browser.aboutwelcome.screens' value from https://gist.github.com/punamdahiya/ee4ed710e1ecbb432324058a61624015
- In browser console run below script
Cc["@mozilla.org/browser/clh;1"].getService().wrappedJSObject.firstRunProfile = true; Cc["@mozilla.org/browser/browserglue;1"].getService().wrappedJSObject._maybeShowDefaultBrowserPrompt()
- Window modal should open with two screens from pref
browser.aboutwelcome.screens
Comment 7•1 year ago
|
||
I have verified this task using the steps provided in comment 6 and I can confirm that after running the provided script a modal containing two screens is successfully opened.
Verified using the latest Firefox Beta (110.0b2 Build ID - 20230117185909) installed on Windows 10 x64, macOS 12.6.1, and Ubuntu 22.04 x64.
Description
•