Closed Bug 1492942 Opened Last year Closed Last year

ASR Snippets should respect onboarding, user pref

Categories

(Firefox :: Messaging System, enhancement, P1)

enhancement

Tracking

()

VERIFIED FIXED
Firefox 64
Iteration:
64.3 - Oct 12
Tracking Status
firefox64 --- verified

People

(Reporter: k88hudson, Assigned: k88hudson)

References

(Blocks 1 open bug)

Details

We need to make sure our snippets implementation does not conflict with onboarding "snippets" on the new tab page and respects the user-defined preference for snippets, i.e. if someone has turned off snippets in about:preferences#home, no snippets should show up.
Depends on: 1494427
Iteration: 64.2 (Sep 28) → 64.3 (Oct 12)
Blocks: 1494427
No longer depends on: 1494427
Status: NEW → RESOLVED
Closed: Last year
Resolution: --- → FIXED
To verify this, please try the following:

For the user preference:

1. First turn on ASRouter snippets by pasting the following code into the browser console:

Services.prefs.setStringPref(
  "browser.newtabpage.activity-stream.asrouter.messageProviders",
  JSON.stringify([{"id":"onboarding","type":"local","localProvider":"OnboardingMessageProvider","enabled":true,"cohort":1},{"id":"snippets","type":"remote","url":"https://snippets.cdn.mozilla.net/us-west/bundles/bundle_d6d90fb9098ce8b45e60acf601bcb91b68322309.json","updateCycleInMs":14400000,"enabled":true},{"id":"cfr","type":"local","localProvider":"CFRMessageProvider","enabled":true,"cohort":0}])
);

2. Ensure that snippets are visible on about:newtab
3. Turn off the user preference for snippets on about:preferences#home
4. Ensure snippets are no longer visible on about:newtab
5. Turn the preference back on
6. Ensure snippets are showing up again


For the onboarding conflict:

1. Create a new profile at set browser.onboarding.notification.mute-duration-on-first-session-ms to 0 in about:config.
2. Ensure onboarding messages show up on about:newtab.
3. Turn on ASRouter snippets using the code snippet in step 1 of the previous section;
4. Ensure snippets are NOT visible on about:newtab
5. Set browser.onboarding.notification.finished to true in about:config to simulate onboarding being finished.
6. Ensure snippets now show up on about:newtab
I have verified that this issue is no longer reproducible with the latest version of "Firefox Nightly" (64.0a1 - Build ID 20181003100127) installed, on Windows 10 x64, Arch Linux and Mac 10.13.3. Now, the "Snippets" are respecting the user-defined preferences and are not conflicting with the onboarding ones.
Status: RESOLVED → VERIFIED
This bug fixes bug #1503047 which appears to be a driver for a 63 point release
Component: Activity Streams: Newtab → Messaging System
You need to log in before you can comment on or make changes to this bug.