Pre-install a new colorful theme (Alpenglow) to be used a fourth option in multistage about:welcome theme screen
Categories
(Firefox :: Messaging System, enhancement, P1)
Tracking
()
Tracking | Status | |
---|---|---|
firefox78 | --- | unaffected |
firefox79 | --- | wontfix |
firefox80 | --- | wontfix |
firefox81 | --- | verified |
People
(Reporter: pdahiya, Assigned: dmosedale)
References
(Blocks 2 open bugs, Regressed 1 open bug)
Details
Attachments
(7 files, 1 obsolete file)
Scope of this bug is to pre-install a third theme so that its available to be shown on theme screen for multistage about:welcome 79 v2 experiment users.
Aaron is working on getting this new theme done
Updated•4 years ago
|
Reporter | ||
Comment 1•4 years ago
|
||
Figma link displaying choose a theme onboarding screen
Reporter | ||
Comment 2•4 years ago
•
|
||
NI Dao to help answer scope of work in terms of complexity to add a new theme packaged in Firefox 79 similar to https://searchfox.org/mozilla-central/source/browser/themes/addons. Please note click of theme tile in above figma prorotype, supports theme viewer and changes theme of 'Choose a look' screen
For 79 onboarding experiment, we would like to show the new theme only during onboarding and need not surface it under about:addon#themes and Menu -> Customize -> Themes.
Thanks!
Comment 3•4 years ago
|
||
(In reply to Punam Dahiya [:pdahiya] from comment #2)
NI Dao to help answer scope of work in terms of complexity to add a new theme packaged in Firefox 79 similar to https://searchfox.org/mozilla-central/source/browser/themes/addons. Please note click of theme tile in above figma prorotype, supports theme viewer and changes theme of 'Choose a look' screen
You can add themes in browser/themes/addons
, they won't automatically be shown to the user. To expose the theme to the addon manager, call AddonManager.maybeInstallBuiltinAddon
: https://searchfox.org/mozilla-central/rev/35b97af64a55d1d30caa4d6e9fabc1a7fbabc509/browser/components/BrowserGlue.jsm#1321-1330
After that your code can select the theme by calling theme.enable()
like here: https://searchfox.org/mozilla-central/rev/35b97af64a55d1d30caa4d6e9fabc1a7fbabc509/browser/components/customizableui/CustomizeMode.jsm#1528
For 79 onboarding experiment, we would like to show the new theme only during onboarding and need not surface it under about:addon#themes and Menu -> Customize -> Themes.
So you want to package the theme with Firefox, but then not offer a way to use it besides onboarding? That seems a bit weird (as in limiting and wasteful) to me.
(In reply to Punam Dahiya [:pdahiya] from comment #1)
Figma link displaying choose a theme onboarding screen
You'll have the somehow handle the case of the OS being in dark mode, in which case "default" isn't really available (it automatically switches to the dark theme).
Reporter | ||
Comment 4•4 years ago
|
||
For 79 onboarding experiment, we would like to show the new theme only during onboarding and need not surface it under about:addon#themes and Menu -> Customize -> Themes.
So you want to package the theme with Firefox, but then not offer a way to use it besides onboarding? That seems a bit weird (as in limiting and wasteful) to me.
+1, for experiment in 79 we have decided to keep scope to existing preinstalled themes (light and dark) and when we are ready to add a new theme in onboarding, have it available everywhere.
You'll have the somehow handle the case of the OS being in dark mode, in which case "default" isn't really available (it automatically switches to the dark theme).
Instead of default, showing two options as light and dark theme should help resolve this case
Updated•4 years ago
|
Reporter | ||
Updated•4 years ago
|
Reporter | ||
Updated•4 years ago
|
Reporter | ||
Comment 5•4 years ago
•
|
||
Adding link to colorful theme https://addons.mozilla.org/en-US/firefox/addon/firefox-alpenglow/, that should be pre-installed in firefox.
Scope of this bug is to pre-install new theme in firefox - https://searchfox.org/mozilla-central/source/browser/components/BrowserGlue.jsm#1275
and display it as fourth option in 'Choose a look' screen in onboarding flow.
Onboarding flow can retrieve this pre-installed theme using AddonManager.getAddonByID method
Reporter | ||
Updated•4 years ago
|
Reporter | ||
Comment 6•4 years ago
|
||
NI shorlander to help share colorful theme (https://addons.mozilla.org/en-US/firefox/addon/firefox-alpenglow/,) assets similar to light theme below. Thanks!
https://searchfox.org/mozilla-central/source/browser/themes/addons/light
Comment 7•4 years ago
|
||
Would there be any engineering support available from the add-on team to get this new theme landed in Firefox?
Comment 8•4 years ago
|
||
Redirecting Amy's NI to Stuart.
FYI, I'm not sure if this falls under the WebExtensions team's purview.
Comment 9•4 years ago
|
||
(In reply to Meridel from comment #7)
Would there be any engineering support available from the add-on team to get this new theme landed in Firefox?
Do you have any specific questions that need answering? That should point the way to who is best to help with this.
Reporter | ||
Comment 10•4 years ago
|
||
Thanks Stuart, NI Luca to help answer below questions, please feel free to redirect if someone else can help answer
a) Whats the scope of pre-installing a colorful theme https://addons.mozilla.org/en-US/firefox/addon/firefox-alpenglow/ in firefox assuming we don't want to surface this new theme in about:addons and customize -> themes
I see below places where we should be updating
https://searchfox.org/mozilla-central/source/browser/components/BrowserGlue.jsm#1275
https://searchfox.org/mozilla-central/source/browser/themes/addons/light
https://searchfox.org/mozilla-central/source/toolkit/mozapps/extensions/content/aboutaddons.js#87
https://searchfox.org/mozilla-central/source/browser/tools/mozscreenshots/mozscreenshots/extension/configurations/LightweightThemes.jsm#31
Are there other touchpoints? Will be great to get high level guidance on scope here
This theme should surface alongside Default, Light and Dark in 'Choose a look' screen during onboarding and enabled if user selects
https://searchfox.org/mozilla-central/source/browser/components/newtab/aboutwelcome/AboutWelcomeParent.jsm#197
b) Can we retrieve files needed for new theme from AMO side?
Comment 11•4 years ago
•
|
||
(In reply to Punam Dahiya [:pdahiya] from comment #10)
Thanks Stuart, NI Luca to help answer below questions, please feel free to redirect if someone else can help answer
a) Whats the scope of pre-installing a colorful theme https://addons.mozilla.org/en-US/firefox/addon/firefox-alpenglow/ in firefox assuming we don't want to surface this new theme in about:addons and customize -> themes
I see below places where we should be updating
https://searchfox.org/mozilla-central/source/browser/components/BrowserGlue.jsm#1275
https://searchfox.org/mozilla-central/source/browser/themes/addons/light
https://searchfox.org/mozilla-central/source/toolkit/mozapps/extensions/content/aboutaddons.js#87
https://searchfox.org/mozilla-central/source/browser/tools/mozscreenshots/mozscreenshots/extension/configurations/LightweightThemes.jsm#31Are there other touchpoints? Will be great to get high level guidance on scope here
Follows some details about the parts that would need changes and what the purpose of that change is.
Let me know if this helps and if you have more doubts or questions (or issues with this details that are blocking you).
BrowserGlue.jsm
Based on my current understanding (derived by reading the other comments in this issue) I think that in BrowserGlue.jsm this theme should be handled a bit differently, if you call AddonManager.maybeInstallBuiltinAddon for this theme unconditionally, the theme will be listed in the available ones even if it hasn't been selected during the about:welcome onboarding wizard.
I personally think it would be totally fine, if we are ok to have that theme listed by default as all other builtin themes, but if we are not, then the change in BrowserGlue.jsm should only be called if the theme is already installed, with the purpose to update it to a more recent version if necessary when the browser is updated.
browser/themes/addons
In this directory, a new sub-directory should be created for the new builtin theme, and inside that directory the https://addons.mozilla.org/en-US/firefox/addon/firefox-alpenglow/ xpi should be unpacked and after that:
- a new entry should be added to the DIRS variable in the browser/themes/addons/moz.build file
- a new moz.build file should be added in the new theme sub-directory, and based on the current content of the xpi it should look like more or less like:
EXTRA_JS_MODULES.themes['theme-dirname'] += [
'icon.svg',
'manifest.json',
]
EXTRA_JS_MODULES.themes['theme-dirname']["images"] += [
'images/*.svg',
]
- to the theme manifest.json file, we should also add (as done for the other builtin themes):
- an explicit extension id using the
applications.gecko.id
manifest property (something likefirefox-themename@mozilla.org
) - an icon (by adding something like
"icons": { "32": "icon.svg" }
), which is what will be shown in the customize mode theme selector
(otherwise it would show a default theme icon) - a description property
- an explicit extension id using the
I see that the theme name is currently "Firefox Radiance", that name will be visible in the customize mode theme selector and in about:addons, we should change it if that isn't the name that should be visible there.
toolkit/mozapps/extensions/content/aboutaddons.js
The change in aboutaddons.js is needed to associate a screenshot to the builtin theme.
Besides that, there shouldn't be any additional changes needed on the about:addons page internals.
browser/tools/mozscreenshots/mozscreenshots/extension/configurations/LightweightThemes.jsm
I'm not sure about this part, I guess that listing a builtin theme there may be required to take some screenshot automatically, but that is just a guess, we should double-check that with someone with more direct knowledge about what is the purpose of this jsm.
browser/components/newtab/aboutwelcome/AboutWelcomeParent.jsm
In this jsm module I think that we may need to just special case this particular theme and before trying to enable it we should be sure that it is installed.
AddonManager.maybeInstallBuiltinTheme
takes care of also checking if the theme is already installed and only need to be updated, but unfortunately it doesn't return the resulting addon wrapper, not a promise to wait that the addon has been completely installed and so calling AddonManager.getAddonByID
right after calling AddonManager.maybeInstallBuiltinAddon
is not going to return an addon wrapper as you would expect.
As an alternative approach, AboutWelcomeParent.jsm could check if the addon is already installed using AddonManager.getAddonByID
and if it is not it could call AddonManager.installBuiltinAddon
which return a promise that resolves to the addon wrapper (on which we can call the enable
method and have the theme enabled as for the other builtin themes).
Then I guess that the browser.aboutwelcome.overrideContent
pref would also need to be updated to list this additional theme.
This theme should surface alongside Default, Light and Dark in 'Choose a look' screen during onboarding and enabled if user selects
https://searchfox.org/mozilla-central/source/browser/components/newtab/aboutwelcome/AboutWelcomeParent.jsm#197b) Can we retrieve files needed for new theme from AMO side?
If you want or need it to be a builtin, I don't think so, at least is not something that I think we have ever done before and so it is not unlikely that to achieve it we may have to evaluate what kind of changes should be done to the related internals.
It should be possible to install the theme from a AMO url, e.g. I recall that some times ago activity-stream used to support installing extensions as part of the onboarding wizard (I'm not sure if it is still something that is still supported by activity-stream, but from AboutWelcomeParent it would be definitely possible to install an extension from a given AMO url).
By default installing the theme from an AMO url would show a confirmation doorhanger (a doorhanger with a Add and Cancel buttons, no permissions to accept given that it would be a pure theme add-on without any js code in it), it may be possible to workaround that, but it would likely be an hack without apply changes to make it possible without any crude workaround.
Reporter | ||
Comment 12•4 years ago
|
||
Thanks Luca for detailed info, this is very helpful, I might have more questions as I work on the patch
BrowserGlue.jsm
Based on my current understanding (derived by reading the other comments in this issue) I think that in BrowserGlue.jsm this theme should be handled a bit differently, if you call AddonManager.maybeInstallBuiltinAddon for this theme unconditionally, the theme will be listed in the available ones even if it hasn't been selected during the about:welcome onboarding wizard.
I can run it by product, If this is easier I think we should make this new theme available everywhere by installing it unconditionally as all other builtin themes
I personally think it would be totally fine, if we are ok to have that theme listed by default as all other builtin themes, but if we are not, then the change in BrowserGlue.jsm should only be called if the theme is already installed, with the purpose to update it to a more recent version if necessary when the browser is updated.
Comment 13•4 years ago
|
||
Assignee | ||
Updated•4 years ago
|
Assignee | ||
Comment 14•4 years ago
|
||
(In reply to Punam Dahiya [:pdahiya] from comment #1)
Figma link displaying choose a theme onboarding screen
This figma link doesn't seem to point to anything related to theme choice; am I missing something?
Reporter | ||
Comment 15•4 years ago
|
||
(In reply to Dan Mosedale (:dmose, :dmosedale) from comment #14)
(In reply to Punam Dahiya [:pdahiya] from comment #1)
Figma link displaying choose a theme onboarding screen
This figma link doesn't seem to point to anything related to theme choice; am I missing something?
yes, the link is outdated. Here's the link with new colorful theme design specs. Thanks!
https://www.figma.com/file/KqQZwwLhft9cUIcBtMVmbz/Desktop-First-Run?node-id=122%3A973
Assignee | ||
Comment 16•4 years ago
|
||
I don't quite follow the intent of the last sentence here, Punam, can you unpack the meaning a bit?
(In reply to Punam Dahiya [:pdahiya] from comment #12)
Thanks Luca for detailed info, this is very helpful, I might have more questions as I work on the patch
BrowserGlue.jsm
Based on my current understanding (derived by reading the other comments in this issue) I think that in BrowserGlue.jsm this theme should be handled a bit differently, if you call AddonManager.maybeInstallBuiltinAddon for this theme unconditionally, the theme will be listed in the available ones even if it hasn't been selected during the about:welcome onboarding wizard.
I can run it by product, If this is easier I think we should make this new theme available everywhere by installing it unconditionally as all other builtin themes
Reporter | ||
Comment 17•4 years ago
|
||
(In reply to Dan Mosedale (:dmose, :dmosedale) from comment #16)
I don't quite follow the intent of the last sentence here, Punam, can you unpack the meaning a bit?
(In reply to Punam Dahiya [:pdahiya] from comment #12)
Thanks Luca for detailed info, this is very helpful, I might have more questions as I work on the patch
BrowserGlue.jsm
Based on my current understanding (derived by reading the other comments in this issue) I think that in BrowserGlue.jsm this theme should be handled a bit differently, if you call AddonManager.maybeInstallBuiltinAddon for this theme unconditionally, the theme will be listed in the available ones even if it hasn't been selected during the about:welcome onboarding wizard.
I can run it by product, If this is easier I think we should make this new theme available everywhere by installing it unconditionally as all other builtin themes
My understanding from Luca feedback is, using AddonManager.maybeInstallBuiltinAddon for this theme unconditionally in BrowserGlue.jsm will result in surfacing this theme as default builtin theme at all places (about:addons, customize -> theme and onboarding) . If it makes implementation easier we should use this approach and share with product managers of these respective modules.
Assignee | ||
Updated•4 years ago
|
Assignee | ||
Comment 18•4 years ago
|
||
Updated•4 years ago
|
Assignee | ||
Comment 19•4 years ago
|
||
Aaron, here's a needinfo about getting both a dark and a light icon for the about:welcome installer. If you're pressed for time, I imagine one could be good enough.
Reporter | ||
Comment 20•4 years ago
|
||
Reporter | ||
Comment 21•4 years ago
|
||
Adding screenshots for UI review with new Alpenglow theme. Thanks!
Reporter | ||
Comment 22•4 years ago
|
||
As discussed with @dmose filed bug 1659871 for tests and follow up performance improvements. Thanks!
Comment 23•4 years ago
|
||
Comment 24•4 years ago
|
||
Comment 25•4 years ago
|
||
Reporter | ||
Comment 26•4 years ago
|
||
Thanks @shorlander, updated screenshots with final images
Comment 27•4 years ago
|
||
Pushed by pdahiya@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/6ffb6196daf7 Add Alpenglow theme r=dmose,rpl,flod
Comment 28•4 years ago
|
||
Backed out for perma failures.
Log: https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=313580306&repo=autoland&lineNumber=3442
Backout: https://hg.mozilla.org/integration/autoland/rev/c2608f6c9a5079cf0a3f36cbb30ead5659ab98f8
Comment 29•4 years ago
|
||
Pushed by pdahiya@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/2a1fa73b1a63 Add Alpenglow theme r=dmose,rpl,flod
Reporter | ||
Comment 30•4 years ago
|
||
Fixed test browser_all_files_referenced.js, and re-landed patch after adding a trailing slash in the exception path for alpenglow images. Thanks
Comment 31•4 years ago
|
||
Backed out for perma failures.
Log: https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=313590839&repo=autoland&lineNumber=2609
Backout: https://hg.mozilla.org/integration/autoland/rev/5eed1f555203af951b7a2dcf35ea23c81134e6aa
Assignee | ||
Comment 32•4 years ago
|
||
So the problem here is that the error doesn't seem to reproduce either locally or on try, even when we're explicitly running the test that all files are referenced. So I have a theory about a thing that has some reasonable chance of working, and as far as we can tell, there's no known way to test it without actually landing it. If this blows up again, my apologies to the sheriffs.
Updated•4 years ago
|
Comment 33•4 years ago
|
||
Pushed by pdahiya@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/2f4bf8bab6cf Add Alpenglow theme, r=dmose,rpl,flod
Comment 34•4 years ago
|
||
Backed out for causing bug 1660323, as requested by glandiun on Riot.
https://hg.mozilla.org/integration/autoland/rev/564a3a6c2eb1aa1bf6c1bfb71a15ce382e6b8141
Comment 35•4 years ago
|
||
Pushed by pdahiya@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/edf8192f88f9 Add Alpenglow theme, r=dmose,rpl,flod
Assignee | ||
Updated•4 years ago
|
Assignee | ||
Updated•4 years ago
|
Comment 36•4 years ago
|
||
bugherder |
Comment 37•4 years ago
|
||
Since the status are different for nightly and release, what's the status for beta?
For more information, please visit auto_nag documentation.
Comment 38•4 years ago
|
||
I have verified the following using Firefox Nightly 81.0a1 (Build ID: 20200824094458) on Windows 10 x64, macOS 10.15, and Ubuntu Linux 18.04.
- The 4th theme option, "Firefox Alpenglow" is correctly displayed on the "Choose a look" slide from the "about:welcome" page.
- The "Firefox Alpenglow" is a 4th default option in the "Themes" section from the "about:addons" page.
- The "Firefox Alpenglow" option is available in the "Themes" menu of the "Customize Nightly" page. This can be observed by doing the following:
1. Open the hamburger menu located in the top right corner of the browser.
2. Select the "Customize..." option.
3. Click the "Themes" dropdown menu located at the bottom right side of the page and observe the displayed theme options. - The "Firefox Alpenglow" is displayed correctly if the OS theme is set to Light.
- The "Firefox Alpenglow" is displayed correctly if the OS theme is set to Dark.
Updated•4 years ago
|
Reporter | ||
Comment 39•4 years ago
|
||
Marking this feature as won't fix for 80. Thanks
Updated•4 years ago
|
Updated•4 years ago
|
Assignee | ||
Updated•4 years ago
|
Assignee | ||
Updated•4 years ago
|
Description
•