Closed Bug 1625283 Opened 5 months ago Closed 4 months ago

Hard code list of regions we may want to turn on for stories in newtab.

Categories

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

enhancement

Tracking

()

VERIFIED FIXED
Firefox 76
Iteration:
76.2 - Mar 23 - Apr 5
Tracking Status
firefox76 --- verified
firefox77 --- verified

People

(Reporter: thecount, Assigned: thecount)

Details

Attachments

(1 file)

We should figure out a rough list of regions (and then map them to locales) we may want to have stories on in the future.

For which regions see stories, we generally control this via this pref: https://firefox-source-docs.mozilla.org/browser/components/newtab/docs/v2-system-addon/preferences.html#browser-newtabpage-activity-stream-discoverystream-region-stories-config

This pref is a csv of regions we want stories on, it's pretty simple.

The bit in that doc that makes this a little complex, and why we still have a bit of hard coded bits in this, is the bit that says "then looks for a matching locale".

What "then looks for a matching locale" means is, when we want to turn on stories for US, we don't want to turn on stories for US for users using a non English browser. (as an example, but isn't the only case)

The existing list is this: https://searchfox.org/mozilla-central/source/browser/components/newtab/lib/ActivityStream.jsm#614

Also documented here: https://docs.google.com/document/d/1omclr-eETJ7zAWTMI7mvvsc3_-ns2Iiho4jPEfrmZfo/edit

We need to be able to map the locales supported by the regions. Right now that is hard coded, and a limited list.

We right now could add in a bunch of regions and just not use them until we are ready.

Tawanda, can you list all the regions we want?

Flags: needinfo?(kanhema)
Flags: needinfo?(kanhema) → needinfo?(tkanhema)
Assignee: nobody → sdowne
Iteration: --- → 76.2 - Mar 23 - Apr 5
Priority: -- → P1

We can go broader, but let's include the following:
en-AU
en-NZ
en-IN
en-ZA
fr-FR
fr-BE
de-AT

Flags: needinfo?(tkanhema)

@Scott - Jess has requested an uplift on this if it's possible.

Flags: needinfo?(sdowne)
  • an uplift into Beta 76 if the code freeze means no nightly landing until next week.
Pushed by sdowne@getpocket.com:
https://hg.mozilla.org/integration/autoland/rev/43f3b4e93116
Initial list of locale/regions for pocket stories r=gvn
Status: NEW → RESOLVED
Closed: 4 months ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 76

I have verified this using Firefox Nightly 76.0a1 (Build ID 20200405212522) on Windows 10 x64, and observed "Recommended By Pocket" stories for the following combinations of regions and locales:

  1. Regions: AU, NZ, IN and ZA and "en-GB" locale build. (as we noticed in some bugs, all mentioned locales were included in the en-GB one)

    • Popular Links are displayed in these cases;
  2. Region AT and "de" locale build.

    • Popular Links are displayed in this case;
  3. Region FR, BE and the "fr-FR" locale build;

    • No Popular Links;

@Scott: Please let me know if these check results are correct and enough. Thanks!

You should only be seeing stories in the following regions: US,DE,CA

If you're seeing them in AU, NZ, IN, ZA, AT, FR, BE and GB, it's likely you need to restart after changing the regions.

I'll provide more accurate steps to test.

Also I found this link to e helpful in which locales have a shipped browser: https://searchfox.org/mozilla-central/source/browser/locales/shipped-locales

First two cases are known locale/regions, with stories enabled by default.
Third case is a known locale/region with stories disabled by defailt.
Fourth test case is an unknown locale/region combination.

Using an en-US browser:

  1. set the browser.search.region pref to "US" or "CA"
  2. Restart, you should see stories

Using a de browser

  1. set browser.search.region pref to "DE"
  2. Restart, you should see stories

Using a "fr", "it", "es", "pl", "ja", etc. browser. For the purpose of this test, we'll use "fr"

  1. set browser.search.region pref to "FR"
  2. Restart you should not see stories.
  3. Now set browser.newtabpage.activity-stream.discoverystream.region-stories-config to "US,DE,CA,FR"
  4. Restart, you should see stories

Finally:

  1. set browser.search.region pref to "NL"
  2. Restart you should not see stories.
  3. Now set browser.newtabpage.activity-stream.discoverystream.region-stories-config to "US,DE,CA,NL"
  4. Restart, you should still not see stories
Flags: needinfo?(sdowne)

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

Thank you for clarification!

I have verified this using Firefox Nighlty 77.0a1 (Build ID 20200413225327) on Windows 10 x64, Linux Ubuntu 18.04, Mac OS 10.14 and obtained the expected results:

  • en-US locale build - US and CA regions => stories listed
  • de locale build - DE region => stories listed
  • fr locale build - FR region => no stories
    • set "browser.newtabpage.activity-stream.discoverystream.region-stories-config" to "US,DE,CA,FR" => stories listed
  • nl locale build - NL region => no stories
    • set "browser.newtabpage.activity-stream.discoverystream.region-stories-config" to "US,DE,CA,NL" => no stories
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.