Ask user to pin Firefox during windows about:welcome onboarding
Categories
(Firefox :: Messaging System, enhancement, P1)
Tracking
()
People
(Reporter: Mardak, Assigned: Mardak)
References
(Blocks 2 open bugs)
Details
Attachments
(8 files)
Ideally somehow we do this requiring only 1 click from the user, and to start we can focus on windows 10. As from bug 1558206, automatic pinning stopped working from Windows 10 1903, so we might want to show this messaging for newer versions of Windows?
Comment 1•5 months ago
|
||
While I'm not a developer and I don't have a full grasp on what has broken in the past, there does still seem to be an API for this.
https://docs.microsoft.com/en-us/windows/uwp/design/shell/pin-to-taskbar
The key thing is that it "must be called from a foreground UI thread, otherwise an exception will be thrown."
| Assignee | ||
Comment 2•5 months ago
|
||
(In reply to Alex Davis [:adavis] from comment #1)
https://docs.microsoft.com/en-us/windows/uwp/design/shell/pin-to-taskbar
The key thing is that it "must be called from a foreground UI thread, otherwise an exception will be thrown."
I'm definitely not familiar with windows firefox development, but looks like we do have various uses of the windows runtime api adjacent to Windows.UI.Shell:
https://searchfox.org/mozilla-central/search?q=%3Cwindows.ui
The specific TaskbarManager.RequestPinCurrentApp API was added for version 1709 / build 16299, and it's still available in version 1903+ that we're particularly interested in:
https://docs.microsoft.com/en-us/uwp/api/windows.ui.shell.taskbarmanager.requestpincurrentappasync
Previous pinning behavior seems to have been done during installation via https://searchfox.org/mozilla-central/source/browser/installer/windows/nsis/shared.nsh
mhowell, is using this api a reasonable approach, and if so I can try setting up a windows development environment? Or if there's a simpler way for me to prototype using the windows runtime APIs from a windows build?
Comment 3•5 months ago
|
||
I don't think the TaskbarManager interface is available to Win32 apps; just trying to instantiate it out of either the (deprecated) WRL mechanism that we use elsewhere or the more current cppwinrt library results in an ERROR_NOT_FOUND exception. I don't know for sure because I don't see this documented, but I assume that means it can only be called from within a UWP app.
| Assignee | ||
Comment 4•5 months ago
|
||
I just made up some strings assuming Firefox is not pinned. At least for an experiment, we should be able to target something like os.windowsBuildNumber >= 18362 to avoid showing this message to windows users who already have firefox pinned. Alternatively, the message could be more generic and shown to all windows users, e.g., "make sure firefox is pinned to your taskbar for easy access"
Updated•4 months ago
|
| Assignee | ||
Comment 5•4 months ago
|
||
Instead of the previous attachment 9197495 [details] which asks the user to do the actions of pinning to taskbar, if there was an API like bug 1687562, ideally we could show something like attached instead. (Again, I'm just making up strings.)
| Assignee | ||
Comment 6•4 months ago
|
||
We might want something like bug 1685213 to tell if Firefox is already pinned to avoid showing this screen/message.
Updated•4 months ago
|
Updated•4 months ago
|
| Assignee | ||
Comment 7•4 months ago
|
||
Meant to mark this bug depends instead of bug 1687562 comment 11. With the ability to detect that Firefox is pinned or failed to get pinned with bug 1685213, we could show a followup message after attempting to pin, e.g., "Automatic Firefox pinning was unsuccessful. Please open the menu for the Firefox icon in the taskbar to pin."
Updated•4 months ago
|
| Assignee | ||
Comment 8•4 months ago
|
||
Here's a recording of the 64 bit target.zip build from https://treeherder.mozilla.org/jobs?repo=try&revision=4d73080718fe89fdb40a057b5b5d17bf9003d717 extracted to my desktop.
Looks like it can result in a duplicate taskbar item when pinning the executable directly. Although in the recording, I launched it from a desktop shortcut, and it worked this particular time…
const { path } = Services.dirsvc.get("XREExeF", Ci.nsIFile);
pinnedList.contents.vtbl.contents.Modify(
pinnedList,
null,
ILCreateFromPathW(path),
12345
);
I'll try this suggestion next: "if the taskbar doesn't already know about the app, it may not be able to figure out what AUMID to put in the taskbar shortcut. Giving Modify the path to the Start Menu shortcut (under %PROGRAMDATA%\Microsoft\Windows\Start Menu\Programs for a All Users install) should avoid that."
| Assignee | ||
Comment 9•4 months ago
|
||
One of the potential treatment branches could show both pinning and default browser instead of having each on separate onboarding welcome screens. Here's a quick proof of concept reusing the "theme" tile selection. https://hg.mozilla.org/try/rev/dd6b11d89a12fe0f230f4d0982d48df5abae6438
Comment 10•4 months ago
|
||
[Tracking Requested - why for this release]: Product team would like to see this feature and experiment in 87
Comment 11•4 months ago
|
||
The soft code freeze / feature complete deadline for 87 is in a couple of days, when do we expect this to be ready to land?
| Assignee | ||
Comment 12•3 months ago
|
||
I just used a dummy image for now, but it's supposed to be an animation showing firefox getting selected from a list of defaults like in https://www.figma.com/proto/KqQZwwLhft9cUIcBtMVmbz/Desktop-First-Run?node-id=3698%3A0&scaling=min-zoom
Comment 13•3 months ago
|
||
I'm not sure it gets explicit user consent because nothing regarding "pin to taskbar" is shown until the user clicks the button.
| Assignee | ||
Comment 14•3 months ago
|
||
Support pin special action and add a new action property to wait for default browser that changes styles and content.
Comment 15•3 months ago
|
||
animated GIF for this screen
| Assignee | ||
Comment 16•3 months ago
|
||
(In reply to Masatoshi Kimura [:emk] from comment #13)
I'm not sure it gets explicit user consent because nothing regarding "pin to taskbar" is shown until the user clicks the button.
Ah indeed. The copy was wrong. Looks like the current copy is…
Treatment C:
Title: Start by making Firefox a click away
Initial subtitle: Fast, safe, and private browsing every time you use the web.
Initial button: Pin Firefox and Set to Default
Initial help: Make Firefox your main browser
Updated subtitle: Choose Firefox under Web browser when your settings open
Updated image: <attachment 9204057 [details]>
Updated button/help: <removed>
Treatment D -- mostly like Treatment C except…
Initial button: Make Firefox My Primary Browser
Initial help: Pin Firefox to taskbar and open settings
(see attached)
As these are remote experiment branches, we can adjust the copy, etc. even after the code changes land.
Comment 17•3 months ago
|
||
Pushed by elee@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/af7e4b09a4fb Ask user to pin Firefox during windows about:welcome onboarding r=pdahiya
Comment 18•3 months ago
|
||
| bugherder | ||
| Assignee | ||
Comment 19•3 months ago
•
|
||
This is now in nightly 87, and we should have all the pieces needed for an 87 release experiment for pinning from about:welcome.
QA steps (for new functionality in this bug and dependent windows API bug -- but not for the experiment, which has more branches/targeting):
- install firefox on windows via installer, e.g., https://nightly.mozilla.org/ download link
- open about:config
- set
browser.aboutwelcome.overrideContentpref to desired value (examples below) - open about:welcome
- ensure firefox is pinned/unpinned from taskbar and/or default/not-default browser
- go through about:welcome onboarding
Potential treatment D branch with combined action button that pins firefox to taskbar and opens windows' default settings dialog where about:welcome shows the next screen when Firefox becomes the default browser
{"template":"multistage","screens":[{"id":"AW_PIN_AND_DEFAULT","order":0,"content":{"title":"Start by making Firefox a click away","subtitle":"Fast, safe, and private browsing every time you use the web.","help_text":{"position":"default","text":"Pin Firefox to taskbar and open settings"},"primary_button":{"label":"Make Firefox My Primary Browser","action":{"navigate":true,"type":"PIN_AND_DEFAULT","waitForDefault":true}},"secondary_button":{"label":{"string_id":"onboarding-multistage-set-default-secondary-button-label"},"action":{"navigate":true}},"secondary_button_top":{"text":{"string_id":"onboarding-multistage-welcome-secondary-button-text"},"label":{"string_id":"onboarding-multistage-welcome-secondary-button-label"},"action":{"data":{"entrypoint":"activity-stream-firstrun"},"type":"SHOW_FIREFOX_ACCOUNTS","addFlowParams":true}},"waiting_for_default":{"subtitle":"Choose Firefox under Web browser when your settings open","help_text":null,"primary_button":null,"tiles":{"media_type":"tiles-delayed","type":"image","source":{"default":"chrome://activity-stream/content/data/content/assets/remote/windows-default-browser.gif"}}}}},{"id":"AW_IMPORT_SETTINGS","order":1,"content":{"zap":true,"help_text":{"text":{"string_id":"onboarding-import-sites-disclaimer"}},"title":{"string_id":"onboarding-multistage-import-header"},"subtitle":{"string_id":"onboarding-multistage-import-subtitle"},"tiles":{"type":"topsites","showTitles":true},"primary_button":{"label":{"string_id":"onboarding-multistage-import-primary-button-label"},"action":{"type":"SHOW_MIGRATION_WIZARD","navigate":true}},"secondary_button":{"label":{"string_id":"onboarding-multistage-import-secondary-button-label"},"action":{"navigate":true}}}},{"id":"AW_CHOOSE_THEME","order":2,"content":{"zap":true,"title":{"string_id":"onboarding-multistage-theme-header"},"subtitle":{"string_id":"onboarding-multistage-theme-subtitle"},"tiles":{"type":"theme","action":{"theme":"<event>"},"data":[{"theme":"automatic","label":{"string_id":"onboarding-multistage-theme-label-automatic"},"tooltip":{"string_id":"onboarding-multistage-theme-tooltip-automatic-2"},"description":{"string_id":"onboarding-multistage-theme-description-automatic-2"}},{"theme":"light","label":{"string_id":"onboarding-multistage-theme-label-light"},"tooltip":{"string_id":"onboarding-multistage-theme-tooltip-light-2"},"description":{"string_id":"onboarding-multistage-theme-description-light"}},{"theme":"dark","label":{"string_id":"onboarding-multistage-theme-label-dark"},"tooltip":{"string_id":"onboarding-multistage-theme-tooltip-dark-2"},"description":{"string_id":"onboarding-multistage-theme-description-dark"}},{"theme":"alpenglow","label":{"string_id":"onboarding-multistage-theme-label-alpenglow"},"tooltip":{"string_id":"onboarding-multistage-theme-tooltip-alpenglow-2"},"description":{"string_id":"onboarding-multistage-theme-description-alpenglow"}}]},"primary_button":{"label":{"string_id":"onboarding-multistage-theme-primary-button-label"},"action":{"navigate":true}},"secondary_button":{"label":{"string_id":"onboarding-multistage-theme-secondary-button-label"},"action":{"theme":"automatic","navigate":true}}}}]}
Control branch (no overrideContent set) should show "make default" that immediately moves on to import (instead of waiting) as per bug 1691145.
Potential treatment A branch that shows pin on first page then make default on second page (also without waiting), so mainly useful for testing that the single pin action works:
{"template":"multistage","screens":[{"id":"AW_PIN_FIREFOX","order":0,"content":{"zap":true,"title":"Pin Firefox to your taskbar","subtitle":{"string_id":"onboarding-multistage-set-default-subtitle"},"primary_button":{"label":"Pin to Taskbar","action":{"navigate":true,"type":"PIN_FIREFOX_TO_TASKBAR"}},"secondary_button":{"label":{"string_id":"onboarding-multistage-set-default-secondary-button-label"},"action":{"navigate":true}},"secondary_button_top":{"text":{"string_id":"onboarding-multistage-welcome-secondary-button-text"},"label":{"string_id":"onboarding-multistage-welcome-secondary-button-label"},"action":{"data":{"entrypoint":"activity-stream-firstrun"},"type":"SHOW_FIREFOX_ACCOUNTS","addFlowParams":true}},"tiles":{"type":"image","source":{"default":"chrome://activity-stream/content/data/content/assets/remote/pin-to-taskbar-v1.svg"}}}},{"id":"AW_SET_DEFAULT","order":1,"content":{"zap":true,"title":{"string_id":"onboarding-multistage-set-default-header"},"subtitle":{"string_id":"onboarding-multistage-set-default-subtitle"},"primary_button":{"label":{"string_id":"onboarding-multistage-set-default-primary-button-label"},"action":{"navigate":true,"type":"SET_DEFAULT_BROWSER"}},"secondary_button":{"label":{"string_id":"onboarding-multistage-set-default-secondary-button-label"},"action":{"navigate":true}}}},{"id":"AW_IMPORT_SETTINGS","order":2,"content":{"zap":true,"help_text":{"text":{"string_id":"onboarding-import-sites-disclaimer"}},"title":{"string_id":"onboarding-multistage-import-header"},"subtitle":{"string_id":"onboarding-multistage-import-subtitle"},"tiles":{"type":"topsites","showTitles":true},"primary_button":{"label":{"string_id":"onboarding-multistage-import-primary-button-label"},"action":{"type":"SHOW_MIGRATION_WIZARD","navigate":true}},"secondary_button":{"label":{"string_id":"onboarding-multistage-import-secondary-button-label"},"action":{"navigate":true}}}},{"id":"AW_CHOOSE_THEME","order":3,"content":{"zap":true,"title":{"string_id":"onboarding-multistage-theme-header"},"subtitle":{"string_id":"onboarding-multistage-theme-subtitle"},"tiles":{"type":"theme","action":{"theme":"<event>"},"data":[{"theme":"automatic","label":{"string_id":"onboarding-multistage-theme-label-automatic"},"tooltip":{"string_id":"onboarding-multistage-theme-tooltip-automatic-2"},"description":{"string_id":"onboarding-multistage-theme-description-automatic-2"}},{"theme":"light","label":{"string_id":"onboarding-multistage-theme-label-light"},"tooltip":{"string_id":"onboarding-multistage-theme-tooltip-light-2"},"description":{"string_id":"onboarding-multistage-theme-description-light"}},{"theme":"dark","label":{"string_id":"onboarding-multistage-theme-label-dark"},"tooltip":{"string_id":"onboarding-multistage-theme-tooltip-dark-2"},"description":{"string_id":"onboarding-multistage-theme-description-dark"}},{"theme":"alpenglow","label":{"string_id":"onboarding-multistage-theme-label-alpenglow"},"tooltip":{"string_id":"onboarding-multistage-theme-tooltip-alpenglow-2"},"description":{"string_id":"onboarding-multistage-theme-description-alpenglow"}}]},"primary_button":{"label":{"string_id":"onboarding-multistage-theme-primary-button-label"},"action":{"navigate":true}},"secondary_button":{"label":{"string_id":"onboarding-multistage-theme-secondary-button-label"},"action":{"theme":"automatic","navigate":true}}}}]}
Potential treatment B branch that shows default browser like control then adds pin on second page:
{"template":"multistage","screens":[{"id":"AW_SET_DEFAULT","order":0,"content":{"zap":true,"title":{"string_id":"onboarding-multistage-set-default-header"},"subtitle":{"string_id":"onboarding-multistage-set-default-subtitle"},"primary_button":{"label":{"string_id":"onboarding-multistage-set-default-primary-button-label"},"action":{"navigate":true,"type":"SET_DEFAULT_BROWSER"}},"secondary_button":{"label":{"string_id":"onboarding-multistage-set-default-secondary-button-label"},"action":{"navigate":true}},"secondary_button_top":{"text":{"string_id":"onboarding-multistage-welcome-secondary-button-text"},"label":{"string_id":"onboarding-multistage-welcome-secondary-button-label"},"action":{"data":{"entrypoint":"activity-stream-firstrun"},"type":"SHOW_FIREFOX_ACCOUNTS","addFlowParams":true}}}},{"id":"AW_PIN_FIREFOX","order":1,"content":{"zap":true,"title":"Pin Firefox to your taskbar","subtitle":{"string_id":"onboarding-multistage-set-default-subtitle"},"primary_button":{"label":"Pin to Taskbar","action":{"navigate":true,"type":"PIN_FIREFOX_TO_TASKBAR"}},"secondary_button":{"label":{"string_id":"onboarding-multistage-set-default-secondary-button-label"},"action":{"navigate":true}},"tiles":{"type":"image","source":{"default":"chrome://activity-stream/content/data/content/assets/remote/pin-to-taskbar-v1.svg"}}}},{"id":"AW_IMPORT_SETTINGS","order":2,"content":{"zap":true,"help_text":{"text":{"string_id":"onboarding-import-sites-disclaimer"}},"title":{"string_id":"onboarding-multistage-import-header"},"subtitle":{"string_id":"onboarding-multistage-import-subtitle"},"tiles":{"type":"topsites","showTitles":true},"primary_button":{"label":{"string_id":"onboarding-multistage-import-primary-button-label"},"action":{"type":"SHOW_MIGRATION_WIZARD","navigate":true}},"secondary_button":{"label":{"string_id":"onboarding-multistage-import-secondary-button-label"},"action":{"navigate":true}}}},{"id":"AW_CHOOSE_THEME","order":3,"content":{"zap":true,"title":{"string_id":"onboarding-multistage-theme-header"},"subtitle":{"string_id":"onboarding-multistage-theme-subtitle"},"tiles":{"type":"theme","action":{"theme":"<event>"},"data":[{"theme":"automatic","label":{"string_id":"onboarding-multistage-theme-label-automatic"},"tooltip":{"string_id":"onboarding-multistage-theme-tooltip-automatic-2"},"description":{"string_id":"onboarding-multistage-theme-description-automatic-2"}},{"theme":"light","label":{"string_id":"onboarding-multistage-theme-label-light"},"tooltip":{"string_id":"onboarding-multistage-theme-tooltip-light-2"},"description":{"string_id":"onboarding-multistage-theme-description-light"}},{"theme":"dark","label":{"string_id":"onboarding-multistage-theme-label-dark"},"tooltip":{"string_id":"onboarding-multistage-theme-tooltip-dark-2"},"description":{"string_id":"onboarding-multistage-theme-description-dark"}},{"theme":"alpenglow","label":{"string_id":"onboarding-multistage-theme-label-alpenglow"},"tooltip":{"string_id":"onboarding-multistage-theme-tooltip-alpenglow-2"},"description":{"string_id":"onboarding-multistage-theme-description-alpenglow"}}]},"primary_button":{"label":{"string_id":"onboarding-multistage-theme-primary-button-label"},"action":{"navigate":true}},"secondary_button":{"label":{"string_id":"onboarding-multistage-theme-secondary-button-label"},"action":{"theme":"automatic","navigate":true}}}}]}
Potential treatment C branch behaves like D above but slightly different text on the first screen:
{"template":"multistage","screens":[{"id":"AW_PIN_AND_DEFAULT","order":0,"content":{"title":"Start by making Firefox a click away","subtitle":"Fast, safe, and private browsing every time you use the web.","help_text":{"position":"default","text":"Make Firefox your main browser"},"primary_button":{"label":"Pin Firefox and Set to Default","action":{"navigate":true,"type":"PIN_AND_DEFAULT","waitForDefault":true}},"secondary_button":{"label":{"string_id":"onboarding-multistage-set-default-secondary-button-label"},"action":{"navigate":true}},"secondary_button_top":{"text":{"string_id":"onboarding-multistage-welcome-secondary-button-text"},"label":{"string_id":"onboarding-multistage-welcome-secondary-button-label"},"action":{"data":{"entrypoint":"activity-stream-firstrun"},"type":"SHOW_FIREFOX_ACCOUNTS","addFlowParams":true}},"waiting_for_default":{"subtitle":"Choose Firefox under Web browser when your settings open","help_text":null,"primary_button":null,"tiles":{"media_type":"tiles-delayed","type":"image","source":{"default":"chrome://activity-stream/content/data/content/assets/remote/windows-default-browser.gif"}}}}},{"id":"AW_IMPORT_SETTINGS","order":1,"content":{"zap":true,"help_text":{"text":{"string_id":"onboarding-import-sites-disclaimer"}},"title":{"string_id":"onboarding-multistage-import-header"},"subtitle":{"string_id":"onboarding-multistage-import-subtitle"},"tiles":{"type":"topsites","showTitles":true},"primary_button":{"label":{"string_id":"onboarding-multistage-import-primary-button-label"},"action":{"type":"SHOW_MIGRATION_WIZARD","navigate":true}},"secondary_button":{"label":{"string_id":"onboarding-multistage-import-secondary-button-label"},"action":{"navigate":true}}}},{"id":"AW_CHOOSE_THEME","order":2,"content":{"zap":true,"title":{"string_id":"onboarding-multistage-theme-header"},"subtitle":{"string_id":"onboarding-multistage-theme-subtitle"},"tiles":{"type":"theme","action":{"theme":"<event>"},"data":[{"theme":"automatic","label":{"string_id":"onboarding-multistage-theme-label-automatic"},"tooltip":{"string_id":"onboarding-multistage-theme-tooltip-automatic-2"},"description":{"string_id":"onboarding-multistage-theme-description-automatic-2"}},{"theme":"light","label":{"string_id":"onboarding-multistage-theme-label-light"},"tooltip":{"string_id":"onboarding-multistage-theme-tooltip-light-2"},"description":{"string_id":"onboarding-multistage-theme-description-light"}},{"theme":"dark","label":{"string_id":"onboarding-multistage-theme-label-dark"},"tooltip":{"string_id":"onboarding-multistage-theme-tooltip-dark-2"},"description":{"string_id":"onboarding-multistage-theme-description-dark"}},{"theme":"alpenglow","label":{"string_id":"onboarding-multistage-theme-label-alpenglow"},"tooltip":{"string_id":"onboarding-multistage-theme-tooltip-alpenglow-2"},"description":{"string_id":"onboarding-multistage-theme-description-alpenglow"}}]},"primary_button":{"label":{"string_id":"onboarding-multistage-theme-primary-button-label"},"action":{"navigate":true}},"secondary_button":{"label":{"string_id":"onboarding-multistage-theme-secondary-button-label"},"action":{"theme":"automatic","navigate":true}}}}]}
Updated•3 months ago
|
Comment 20•3 months ago
|
||
I have verified this enhancement and I can confirm that the functionality of pinning/unpinning and settings the browser default/non-default using the five versions of about:welcome is as described. Also, we will perform a more thoughtfully testing round in the Firefox 87 Pre-Release phase which will conclude with a testing report.
Comment 21•3 months ago
|
||
This issue was verified as part of the work done on PI-963 which concluded with a Testing Report that you can see here.
Considering the above, I'm marking this issue as VERIFIED.
Description
•