Closed Bug 1591062 Opened 5 years ago Closed 5 years ago

In Privacy Panel the Celebration Toast banner is not displayed for the 20k milestone

Categories

(Firefox :: Protections UI, defect)

defect
Not set
normal

Tracking

()

RESOLVED INVALID
Tracking Status
firefox71 --- affected
firefox72 --- affected

People

(Reporter: obotisan, Unassigned)

References

Details

Attachments

(1 file)

Affected versions

  • Firefox 72.0a1
  • Firefox 71.0b3

Affected platforms

  • Windows 10x64
  • Ubuntu 18.04 x64
  • macOS 10.13

Prerequisites

  • Set "browser.newtabpage.activity-stream.asrouter.devtoolsEnabled" pref to "true"
  • Set "browser.contentblocking.cfr-milestone.milestone-achieved" to "20000"
  • Set "browser.newtabpage.activity-stream.asrouter.providers.cfr" to {"id":"cfr","enabled":true,"type":"local","localProvider":"CFRMessageProvider","frequency":{"custom":[{"period":"daily","cap":10}]},"categories":["cfrAddons","cfrFeatures"],"updateCycleInMs":3600000}
  • Restart Firefox.

Steps to reproduce

  1. Open any site.
  2. Click on the shield icon.

Expected result

  • The Privacy Panel is displayed and at the bottom of it you can see the Celebration Toast banner for the 20000 milestone.

Actual result

  • The Privacy Panel is opened, but the banner is not displayed.

Regression range

  • This is not a regression.

Additional notes

  • Please look at the attached gif.

This is likely because 20,000 is not a real milestone. I'd have to check with nihanth, but I believe the way he implemented the panel is with a particular milestone message for each of 1000, 5000, 10000, 25000, 50000, 100000, 500000.

I checked for 25,000 and 50,000 it worked correctly. I checked 50,001 and it did not show up.

Flags: needinfo?(oana.botisan)

The protections panel does not do the logic of rounding down the number, etc. It relies on the setter of the pref to set it to one of [1000, 5000, 10000...] as Erica mentioned above, since at the time of setting this pref the logic would have already been performed.

Erica, let me know if this wasn't the expectation for the panel implementation and if anything needs to change. The test [1] that I wrote inserts events into the TrackingDB, and seems to work fine with the pref value set after saveEvents is called, but as I write this I realize that the test could be improved by having the count be slightly in excess of the actual milestone so that rounding is tested.

[1] https://searchfox.org/mozilla-central/source/browser/base/content/test/siteProtections/browser_protections_UI_milestones.js

You are right. 20,000 is not one of the milestones. It was a mistake in the Technical Documentation Guidelines that we got. We changed the info in that doc as well.
By default the pref has these numbers as milestones: 1000, 5000, 10000, 25000, 50000, 100000, 500000.

Flags: needinfo?(oana.botisan)

Closing this since 20k is not a defined milestone.

Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: