Closed Bug 1650852 Opened 4 years ago Closed 4 years ago

Support locale specific default top sites inside multistage about:welcome

Categories

(Firefox :: Messaging System, enhancement, P1)

enhancement

Tracking

()

VERIFIED FIXED
81 Branch
Iteration:
81.1 - July 27 - Aug 09
Tracking Status
firefox79 --- unaffected
firefox80 --- verified
firefox81 --- verified

People

(Reporter: pdahiya, Assigned: pdahiya)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

Default top sites shown in import screen are currently picked from code and not configurable. Scope of this bug is implement locale specific default topsites on import screen in Fx80

https://searchfox.org/mozilla-central/source/browser/components/newtab/content-src/aboutwelcome/components/MultiStageAboutWelcome.jsx#11

Assignee: nobody → edilee
Iteration: --- → 80.2 - July 13 - July 26
Priority: -- → P1
Assignee: edilee → pdahiya

(In reply to Ed Lee :Mardak from comment #1)

browser.newtabpage.activity-stream.default.sites is set by ActivityStream.jsm:
https://searchfox.org/mozilla-central/rev/9b282b34b5aa0f836beb735656c55efb2cc4c617/browser/components/newtab/lib/ActivityStream.jsm#100-137,159-164

This pref should be accessible from content that needs to be converted to icons:
https://searchfox.org/mozilla-central/rev/9b282b34b5aa0f836beb735656c55efb2cc4c617/browser/components/newtab/content-src/aboutwelcome/components/MultiStageAboutWelcome.jsx#11-21

@mardak is it safe to assume default sites set in browser.newtabpage.activity-stream.default.sites pref will have rich icons available here
https://searchfox.org/mozilla-central/source/browser/components/newtab/data/content/tippytop/images

or do we need to call TippyTopService to cover edge cases when default topsites set doesn't have packaged rich icons

Flags: needinfo?(edilee)

The default sites set will have rich icons, but I suppose someone or an add-on could change the pref value to anything. Not sure if we need to support that initially although TippyTopService should handle converting a url to rich icon if we have it instead of having some custom logic.

Flags: needinfo?(edilee)

[Tracking Requested - why for this release]: showing users localized top-sites is necessary for this onboarding treatment

Iteration: 80.2 - July 13 - July 26 → 81.1 - July 27 - Aug 09

(In reply to Ed Lee :Mardak from comment #3)

The default sites set will have rich icons, but I suppose someone or an add-on could change the pref value to anything. Not sure if we need to support that initially although TippyTopService should handle converting a url to rich icon if we have it instead of having some custom logic.

Realizing default.sites pref is not available early enough in first run and introduces dependency on ActivityStream.jsm to intialize first for pref values to be available. Other option is to move DEFAULT_SITES by locale in its own module that's refrenced from ActivityStream and AboutWelcome, doing so still keeps dependency/wait on browser.search.region set by Search Service to be available

Will the default sites be needed for the initial page or can there be a delay in getting and rendering async? You should be able to watch for the pref change / getting set.

(In reply to Ed Lee :Mardak from comment #7)

Will the default sites be needed for the initial page or can there be a delay in getting and rendering async? You should be able to watch for the pref change / getting set.

That's correct, have chosen to watch for search.region instead of default.sites as ActivityStream.jsm initializes and update default.sites pref with fallback values even before region is set by search service. Updated patch to bring out Default Sites from ActivityStream in its own module that has benefit of removing AboutWelcome dependency on ActivityStream. Thanks!

Pushed by pdahiya@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/e28b50796aef Support locale specific default top sites inside multistage about:welcome r=Mardak
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 81 Branch

Steps to QA fix

  1. Ensure there is no history or favorite sites in other browsers on user desktop
  2. Create a new profile and open Nightly
  3. Open about:config and set browser.search.region as 'RU'
  4. Open about:welcome -> Click Start Setup -> Default fixed topsites displayed should be respective to region RU from list in link below

https://searchfox.org/mozilla-central/source/browser/components/newtab/lib/DefaultSites.jsm#31

Comment on attachment 9165822 [details]
Bug 1650852 - Support locale specific default top sites inside multistage about:welcome

Beta/Release Uplift Approval Request

  • User impact if declined: User will see fixed default topsites in onboarding flow for all locales
  • Is this code covered by automated tests?: Yes
  • Has the fix been verified in Nightly?: Yes
  • Needs manual test from QE?: Yes
  • If yes, steps to reproduce: https://bugzilla.mozilla.org/show_bug.cgi?id=1650852#c11
  • List of other uplifts needed: None
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): Feature is already available in 80, fix switches Import screen to show locale specific default sites
  • String changes made/needed: None
Attachment #9165822 - Flags: approval-mozilla-beta?
Flags: qe-verify+
QA Whiteboard: [qa-triaged]

Comment on attachment 9165822 [details]
Bug 1650852 - Support locale specific default top sites inside multistage about:welcome

approved for 80.0b4

Attachment #9165822 - Flags: approval-mozilla-beta? → approval-mozilla-beta+

I have verified that the default Top Sites displayed are the following:

I have done this by following the STR provided in comment 11 on Firefox Beta 80.0b4 RU (Build ID: 20200804180257) and Firefox Nightly 81.0a1 (Build ID: 20200804215246) using Windows 10 x64, macOS 10.15, and Ubuntu Linux 18.04.

Status: RESOLVED → VERIFIED
Blocks: 1704128
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: