Fix train-hop compatibility to 143 and 144 caused by missing discoverystream.optIn-region-weather-config and discoverystream.optIn-locale-weather-config prefs
Categories
(Firefox :: New Tab Page, defect)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox-esr140 | --- | unaffected |
| firefox143 | --- | unaffected |
| firefox144 | --- | unaffected |
| firefox145 | --- | fixed |
People
(Reporter: mconley, Assigned: rhamoui)
References
(Regression)
Details
(Keywords: regression)
Attachments
(1 external file)
Bug 1988925 landed which added new prefs for controlling the display of an opt-in for the weather widget. The patch did all of the right things by adding the preferences to both firefox.js AND ActivityStream's PREFS_CONFIG map.
Unfortunately, it also added a showWeatherOptIn dynamic pref, which is based on the user's geo / locale. That gets computed [here] in _updateDynamicPrefs, but that occurs before default prefs has a chance to initialize and insert the default pref values in that showWeatherOptIn relies on.
Swapping the order of these two broke other things. I'm not entirely sure what the solution is here just yet.
Comment 1•1 year ago
|
||
Set release status flags based on info from the regressing bug 1988925
:rhamoui, since you are the author of the regressor, bug 1988925, could you take a look? Also, could you set the severity field?
For more information, please visit BugBot documentation.
Comment 2•1 year ago
|
||
So looks like the old pattern of adding region/loale-config prefs in firefox.js isn't going to work with train hopping.
I totally missed this.
I think we need to hard code these in ActivityStream.sys.mjs.
Something like this?
function showWeatherOptIn({ geo, locale }) {
return (
csvHasValue("DE,GB,FR,ES,IT,CH,AT,BE,IE,NL,PL,CZ,SE,SG,HU,SK,FI,DK,NO,PT", geo) &&
csvHasValue("fr,de", locale)
);
}
csvHasValue is made up, you don't have to use that, it was just for a quick example.
I think then we can just delete the prefs for "discoverystream.optIn-region-weather-config" and "discoverystream.optIn-locale-weather-config" from both ActivityStream.sys.mjs and firefox.js
I also suspect we need to move browser.newtabpage.activity-stream.discoverystream.region-weather-config and browser.newtabpage.activity-stream.discoverystream.locale-weather-config to hard coded values too.
Again because of train hopping.
| Reporter | ||
Comment 3•1 year ago
|
||
Also cc'ing maxx for visibility.
| Assignee | ||
Comment 4•1 year ago
|
||
Updated•1 year ago
|
Comment 6•1 year ago
|
||
| bugherder | ||
| Assignee | ||
Updated•1 year ago
|
Updated•1 year ago
|
Description
•