Closed Bug 1612984 Opened 5 years ago Closed 5 years ago

Enable regions that get stories via a pref

Categories

(Firefox :: New Tab Page, enhancement, P1)

enhancement

Tracking

()

VERIFIED FIXED
Firefox 75
Tracking Status
firefox75 --- verified

People

(Reporter: thecount, Assigned: thecount)

References

Details

Attachments

(1 file)

Similar to https://bugzilla.mozilla.org/show_bug.cgi?id=1612270

We want to be able to modify which regions see stories and which do not without shipping code. So I'm adding a pref of regions that get stories, example: "US,CA,DE" would be the current list.

We compare this list to a list of regions to locales. In the end the list of regions to locales is still hard coded. The advantage is, the list that's hard coded is optimistic and lists all the values we could enable.

The reason I kept this hard coded component was to keep the pref simple.

I'm adding JP and GB to the hard coded list, but the pref is still "US,CA,DE", once we add JP or GB to the pref list, it'll then start to use the hard coded list of locales.

To test:

  1. Change browser.search.region to GB
  2. Change "browser.newtabpage.activity-stream.discoverystream.region-stories-config" to "US,CA,DE,GB"
  3. Restart

Expected: You should see Pocket stories

  1. Use a Japan browser or language pack.
  2. Change browser.search.region to JP
  3. Restart

Expected: You should not see Pocket stories

  1. Change "browser.newtabpage.activity-stream.discoverystream.region-stories-config" to "US,CA,DE,JP"
  2. Restart

Expected: You should now see pocket stories

Priority: -- → P1
Assignee: nobody → sdowne
Pushed by sdowne@getpocket.com: https://hg.mozilla.org/integration/autoland/rev/1535cf84e13d Enable regions that get stories via a pref r=gvn
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 75

I have verified the following scenarios:

  • “en-US” build + browser.search.region: “GB” + browser.newtabpage.activity-stream.discoverystream.region-stories-config: “GB” = YES Pocket;
  • “en-US” build + browser.search.region: “CA” + browser.newtabpage.activity-stream.discoverystream.region-stories-config: “CA” = YES Pocket;
  • “en-US” build + browser.search.region: “JP” + browser.newtabpage.activity-stream.discoverystream.region-stories-config: “JP” = NO Pocket;
  • “en-US” build + browser.search.region: “DE” + browser.newtabpage.activity-stream.discoverystream.region-stories-config: “DE” = NO Pocket;
  • “en-US” build + browser.search.region: “JP” + browser.newtabpage.activity-stream.discoverystream.region-stories-config: “JP” = NO Pocket;
  • “JP” build + browser.search.region: “JP” + browser.newtabpage.activity-stream.discoverystream.region-stories-config: “JP” = YES Pocket;
  • “RO” build + browser.search.region: “RO” + browser.newtabpage.activity-stream.discoverystream.region-stories-config: “RO” = NO Pocket;
  • “DE” build + browser.search.region: “DE” + browser.newtabpage.activity-stream.discoverystream.region-stories-config: “DE” = YES Pocket;

Using Firefox Nightly Build ID 20200217214434 on Windows 10, Mac 10.14 and Linux Ubuntu 16.04.

In conclusion:

  1. US, CA, and GB regions do not require the equivalent Firefox locale builds and show Pocket section using en-US build.
  2. JP region requires equivalent Firefox JP locale build and show Pocket section only if all requirements (build, pref1, pref2) are met. Same for DE.
  3. Other combinations like: en-US/IT/IT or RO/RO/RO do not show the Pocket section.

@Scott I think it would be helpful for us to have the hard-coded locales list, what it’s your opinion about this?

Status: RESOLVED → VERIFIED
Flags: needinfo?(sdowne)

I don't think I'm fully as to what you mean by "hard-coded locales list", can you elaborate a bit more?

But I suspect it wouldn't hurt. That's my guess anyway, without knowing more details.

Flags: needinfo?(sdowne) → needinfo?(vvirlics)

(In reply to Scott [:thecount] Downe from comment #0)

Similar to https://bugzilla.mozilla.org/show_bug.cgi?id=1612270

We want to be able to modify which regions see stories and which do not without shipping code. So I'm adding a pref of regions that get stories, example: "US,CA,DE" would be the current list.

We compare this list to a list of regions to locales. In the end the list of regions to locales is still hard coded. The advantage is, the list that's hard coded is optimistic and lists all the values we could enable.

The reason I kept this hard coded component was to keep the pref simple.

I'm adding JP and GB to the hard coded list, but the pref is still "US,CA,DE", once we add JP or GB to the pref list, it'll then start to use the hard coded list of locales.

Based on your comment, I thought that it would be helpful for us to have the hard-coded locales list.
Thanks!

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

Attachment

General

Created:
Updated:
Size: