Closed Bug 1765907 Opened 2 years ago Closed 2 years ago

PBM experiment message should override default promo message

Categories

(Firefox :: Messaging System, enhancement, P1)

enhancement

Tracking

()

VERIFIED FIXED
102 Branch
Iteration:
102.1 - May 2 - May 13
Tracking Status
firefox101 --- verified
firefox102 --- verified

People

(Reporter: pdahiya, Assigned: pdahiya)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

With Fx100, about:privatebrowsing experiment user falls back to default promo message when experiment message frequency cap weekly or lifetime is met.

https://searchfox.org/mozilla-central/source/browser/components/privatebrowsing/content/aboutPrivateBrowsing.js#228
https://searchfox.org/mozilla-central/source/browser/components/newtab/lib/ASRouter.jsm#1620

Ideally when a user is enrolled in an experiment , promo shown in experiment should override default promo message even after frequency cap of experiment message is met.

As per product, in future there could be use cases where default promo message should be shown after experiment promo. To cover those usecases, instead of blanket override of default , a flag in experiment message (e.g. hideDefault) should determine if default promo should be visible or hidden.

To support getting telemetry from default promo message spotlight modal, metrics flag that controls telemetry should be computed and passed dynamically.

In Fx100 metric flag is set inside action.data of spotlight message https://searchfox.org/mozilla-central/rev/5204ea3d3dac5832075fb61d9689dd7879ed91b2/browser/components/newtab/lib/OnboardingMessageProvider.jsm#125

In future to support collecting telemetry from default message shown in an experiment, we should compute and set this flag dynamically before passing from aboutPrivateBrowsing.js
https://searchfox.org/mozilla-central/rev/5204ea3d3dac5832075fb61d9689dd7879ed91b2/browser/components/privatebrowsing/content/aboutPrivateBrowsing.js#123

One option to implement override default promo messages via flag set in experiments is

https://searchfox.org/mozilla-central/rev/5204ea3d3dac5832075fb61d9689dd7879ed91b2/browser/components/newtab/lib/ASRouter.jsm#1613

Assignee: nobody → pdahiya
Priority: -- → P1
Iteration: --- → 101.2 - April 18 - April 29

separate field type: 'default'

This seems like the cleaner of the two choices.

Iteration: 101.2 - April 18 - April 29 → 102.1 - May 2 - May 13
Attachment #9274113 - Attachment description: WIP: Bug 1765907 - PBM experiment message should override default promo message → Bug 1765907 - PBM experiment message should override default promo message
Pushed by pdahiya@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/297265ab08f0 PBM experiment message should override default promo message r=mviar

Backed out for causing mochitest failures on browser_privatebrowsing_protocolhandler.js

Flags: needinfo?(pdahiya)

Trying re-land after intermittent failure fix thanks

Flags: needinfo?(pdahiya)
Pushed by pdahiya@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/eb12cdc5d1e8 PBM experiment message should override default promo message r=mviar

Backed out for causing mochitest failures on browser_privatebrowsing_focus_promo.js

  • Backout link
  • Push with failures
  • Failure log
  • Failure line: TEST-UNEXPECTED-FAIL | browser/components/privatebrowsing/test/browser/browser_privatebrowsing_focus_promo.js | Focus promo is shown for allowed region - null == true - got null, expected true (operator ==)
Flags: needinfo?(pdahiya)
See Also: → 1768730
Pushed by pdahiya@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/851e8c15869e PBM experiment message should override default promo message r=mviar

Updated patch by adding extra cleanups and removing test opening spotlight from PBM that seems to be cause . Filed followup to cover opening spotlight test flow

https://bugzilla.mozilla.org/show_bug.cgi?id=1769085

Flags: needinfo?(pdahiya)
Blocks: 1769085
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 102 Branch

Comment on attachment 9274113 [details]
Bug 1765907 - PBM experiment message should override default promo message

Beta/Release Uplift Approval Request

  • User impact if declined: PBM experiment in Fx101 will not have capability to configure show/hide default promo from experiment JSON
  • Is this code covered by automated tests?: Yes
  • Has the fix been verified in Nightly?: Yes
  • Needs manual test from QE?: Yes
  • If yes, steps to reproduce: See Test Plan in https://phabricator.services.mozilla.com/D144871
  • List of other uplifts needed: None
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): This enhancement is used in experiments only
  • String changes made/needed: None
  • Is Android affected?: No
Attachment #9274113 - Flags: approval-mozilla-beta?
Flags: qe-verify+
QA Whiteboard: [qa-triaged]

I‘ve verified this enhancement using the latest Firefox Nightly 102.0a1 (Build ID: 20220515214519) on Windows 10 x64, macOS 12.3.1, and Ubuntu 20.04 x64.

  • PBM experiment message overrides the default promo message.
  • The experiment metrics are displayed in the “Browser Console”.
  • The PBM experiment message is no longer displayed on a new private tab.
Status: RESOLVED → VERIFIED

Comment on attachment 9274113 [details]
Bug 1765907 - PBM experiment message should override default promo message

Approved for 101.0b8.

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

I‘ve verified this enhancement using Firefox Beta 101.0b8 (Build ID: 20220517185920) on Windows 10 x64, macOS 12.3.1, and Ubuntu 20.04 x64.

  • PBM experiment message overrides the default promo message.
  • The experiment metrics are displayed in the “Browser Console”.
  • The PBM experiment message is no longer displayed on a new private tab.
Flags: qe-verify+

Hello! We encountered the following regression for talos on mozilla-beta. Would it be possible for this push to have triggered that regression ?

Flags: needinfo?(pdahiya)

Fix in this bug touches only about:privatebrowsing . Regressing Talos test doesn’t seem to indicate that its testing page load in private browsing mode and IMO doesn’t appear to be the cause.

https://searchfox.org/mozilla-central/source/testing/talos/talos/tests/perf-reftest-singletons/window-named-property-get.html

https://firefox-source-docs.mozilla.org/testing/perfdocs/talos.html#perf_reftest_singletons

https://firefox-source-docs.mozilla.org/testing/perfdocs/talos.html#page-load

Flags: needinfo?(pdahiya)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: