Closed Bug 1750390 Opened 3 years ago Closed 3 years ago

The Firefox Suggest opt-in modal should not be shown on top of about:welcome

Categories

(Firefox :: Address Bar, defect, P1)

Desktop
All
defect
Points:
2

Tracking

()

VERIFIED FIXED
98 Branch
Iteration:
98.1 - Jan 10 - Jan 23
Tracking Status
firefox96 --- verified
firefox97 --- verified
firefox98 --- verified

People

(Reporter: adw, Assigned: adw)

References

Details

Attachments

(2 files)

Attached image 2022-01-14_16h41_49.gif

+++ This bug was initially created as a clone of Bug #1749692 +++

This is similar to bug 1749692 but different enough it should have its own bug. Cosmin brought it up on Slack.

STR

  1. Create a new profile but don't start it
  2. Copy a treatment user.js into the profile
  3. Start the profile

The modal is shown on top of about:welcome, which we specifically want to avoid.

This may be possible in the real world because enrollment can happen on startup in new profiles. I doubt that enrollment in a new profile would have time to finish before Firefox decides whether to show the modal, but it's not possible to say for sure, so we should try to fix this.

The logic we added to _maybeShowDefaultBrowserPrompt() in BrowserGlue in
D135308 isn't enough to prevent the modal from opening on top of about:welcome.
AFAICT the decision to open about:welcome isn't part of that logic at all.

This revision bails out of maybeShowOnboardingDialog() if the top window's
current tab is about:welcome. That seems sufficient to prevent this from
happening in most cases. There are a couple of cases where this wouldn't work:

  1. about:welcome is opened after the Suggest modal. But so far I've never seen
    that happen and I'm not sure it's even possible. Preventing this case would
    require deeper integration with the logic that opens about:welcome. It would
    also block the remainder of _maybeShowDefaultBrowserPrompt() that is
    awaiting the call to maybeShowOnboardingDialog(), which seems like a bad
    idea.
  2. about:welcome is open in an unselected tab. This seems very unlikely because
    the user would need to select/open a new tab in the brief period of time
    between when about:welcome is shown and the modal is shown. It would be
    simple to look through all tabs in the top window (and all windows), but if
    the profile isn't new -- which would be the common case -- and it has
    restored a ton of tabs, it would be inefficient to look through all of them,
    and preventing this case is just not worth that. (tabbrowser doesn't have a
    set or map keyed on URLs that would provide O(1) lookup AFAIK.)

[Tracking Requested - why for this release]:
This is a blocker for the Firefox Suggest experiment in a 96 dot release.

I have verified this issue using a new Firefox 96.0.2 try build that contains the fix on Windows 10 x64, macOS 10.15.7 and Ubuntu 20.10 x64.

  • Using this build I haven't managed to reproduce the issue using the STR described.

However, this behavior was intermittent, but I have found a way to reproduce it every time. More exactly if we start the browser using the Command Prompt/Terminal, we can force to load the about:welcome page at every start-up by this line "firefox.exe -p -- url about:welcome". On the older try build, the opt-in modal was displayed over about:welcome page.
With the new try build, at every startup where the about:welcome is displayed the opt-in modal is not triggered. If we start the same profile without opening about:welcome page, the modal is correctly displayed. Considering this, the issue seems to be fixed by this patch.

We will re-verify this issue as soon as it lands in Nightly.

Pushed by dwillcoxon@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/43c652f4eeb3 Don't show the Firefox Suggest online opt-in modal on top of about:welcome. r=nanj

Comment on attachment 9259254 [details]
Bug 1750390 - Don't show the Firefox Suggest online opt-in modal on top of about:welcome.

Beta/Release Uplift Approval Request

  • User impact if declined: This is a blocker for the Firefox Suggest experiment in a 96 dot release.
  • Is this code covered by automated tests?: Yes
  • Has the fix been verified in Nightly?: No
  • Needs manual test from QE?: Yes
  • If yes, steps to reproduce: Should be clear from the bug comments
  • List of other uplifts needed: None
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): Very small patch that only affects the opening of the Firefox Suggest opt-in modal.
  • String changes made/needed:
Attachment #9259254 - Flags: approval-mozilla-release?
Attachment #9259254 - Flags: approval-mozilla-beta?
Flags: qe-verify+
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 98 Branch
QA Whiteboard: [qa-triaged]

I have verified this issue on the latest Nightly 98.0a1 (Build ID: 20220118095036) on Windows 10 x64, macOS 10.15.7 and Linux Mint 20 x64.

  • The opt-in modal is no longer displayed over about:welcome page.

I will let the "qe-verify" flag set until we will verify the bug after it will be uplifted in Beta.

Status: RESOLVED → VERIFIED

Comment on attachment 9259254 [details]
Bug 1750390 - Don't show the Firefox Suggest online opt-in modal on top of about:welcome.

Approved for 97.0b5.

Attachment #9259254 - Flags: approval-mozilla-beta? → approval-mozilla-beta+

Comment on attachment 9259254 [details]
Bug 1750390 - Don't show the Firefox Suggest online opt-in modal on top of about:welcome.

Approved for 96.0.2

Attachment #9259254 - Flags: approval-mozilla-release? → approval-mozilla-release+

I have verified this issue on the latest Beta 97.0b5 (Build ID: 20220118185733) and the latest build 96.0.2 (Build ID: 20220119040736) on Windows 10 x64, macOS 10.15.7 and Ubuntu 20.04 x64.

  • The opt-in modal is no longer displayed over about:welcome page.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: