Bug 1933293 - Rework aboutWelcome modal behavior to still show about:welcome page and make requiring action to proceed configurable r=firefox-desktop-core-reviewers ,mossop,pdahiya

This patch updates the logic that prevents about:welcome from showing when the Nimbus `aboutWelcome` `showModal` variable is set to true. If separate screens for the modal are provided, it can now be shown on top of the default onboarding flow in about:welcome.

A `requireAction` variable that sets the modal to be a window modal requiring action (other than pressing ESC) to dismiss is also added to the `aboutWelcome` Nimbus feature

Differential Revision: https://phabricator.services.mozilla.com/D230185
This commit is contained in:
Meg Viar
2024-12-18 19:04:43 +00:00
parent e8d71f9fe9
commit 5567720814
4 changed files with 115 additions and 30 deletions

View File

@@ -817,7 +817,12 @@ nsBrowserContentHandler.prototype = {
case OVERRIDE_NEW_PROFILE:
// New profile.
gFirstRunProfile = true;
if (lazy.NimbusFeatures.aboutwelcome.getVariable("showModal")) {
// If we're showing the main onboarding content in a modal, skip
// showing about:welcome as the homepage.
if (
lazy.NimbusFeatures.aboutwelcome.getVariable("showModal") &&
!lazy.NimbusFeatures.aboutwelcome.getVariable("modalScreens")
) {
break;
}
overridePage = Services.urlFormatter.formatURLPref(