Skip to content
This repository has been archived by the owner on Feb 29, 2020. It is now read-only.

Bug 1561540 - CFR messages should have a priority field that allows sorting #5156

Merged
merged 6 commits into from Jul 9, 2019

Conversation

piatra
Copy link
Contributor

@piatra piatra commented Jul 4, 2019

No description provided.

@piatra piatra force-pushed the bug1561349 branch 3 times, most recently from 95079fd to bcaae99 Compare July 5, 2019 14:44
@piatra piatra requested a review from rlr July 5, 2019 14:44
lib/ASRouterTargeting.jsm Outdated Show resolved Hide resolved
@rlr
Copy link
Contributor

rlr commented Jul 5, 2019

this will need to be rebased again and have the formatting fixed with prettier

@@ -771,6 +780,10 @@ class _ASRouter {

uninit() {
this._storage.set("previousSessionEnd", Date.now());
this._storage.set(
"previousSessionFirefoxVersion",
ASRouterTargeting.Environment.firefoxVersion
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we said we might want to uplift this to 69 right? Or will we handle the special case of undefined and assume that means an upgrade happened?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure anymore this is the best way to do it. For example it will not cover users that upgrade from 68 to 70.
I think a better targeting expression would be

{
  "id": "WHATS_NEW_BADGE_${FIREFOX_VERSION}",
  "template": "toolbar_badge",
  ...
  "targeting": "firefoxVersion >= 70 && ..."

I think this will work:

  • We know the feature will be in 70 and we want to show it for everyone starting with 70
  • It will work for 70+
  • Because of the priority field we know it will be picked before other badges
  • WHATS_NEW_BADGE_70 won't be shown after 4 days because of targeting + impressions
  • WHATS_NEW_BADGE_71 will match again because of the different impression key
    • And we don't need to update the targeting for this or publish a new message
  • It's independent of the what's new messages (they can have different targeting expressions that decide what Fx 70 users see vs Fx 71)

Let me know what you think, am I missing any case here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, but we want to show whats's new to users that upgrade to 70 not users that first run 70.

Copy link
Contributor Author

@piatra piatra Jul 9, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can use TelemetryReportingPolicy.isFirstRun() to detect first runs in 70 (new users). We can skip what's new notifications for a whole release for these users by setting some pref/indexedDB value. This should work around the need to land before 70 constraint and work for users that upgrade from an older version.

Copy link
Contributor

@rlr rlr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good for now 🚢

@rlr
Copy link
Contributor

rlr commented Jul 8, 2019

oh, looks like an aboutwelcome mochitest failed

@piatra piatra merged commit d8570e0 into mozilla:whatsnew-panel Jul 9, 2019
Mardak pushed a commit to Mardak/activity-stream that referenced this pull request Aug 13, 2019
…orting (mozilla#5156)

Resolve conflicts from not uplifting ToolbarPanelHub 025e6d2
Mardak pushed a commit to Mardak/activity-stream that referenced this pull request Aug 15, 2019
…orting (mozilla#5156)

Resolve conflicts from not uplifting ToolbarPanelHub 025e6d2
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants