Closed Bug 1451012 Opened 6 years ago Closed 6 years ago

Show when an extension has called browser.theme.update() in the customization mode

Categories

(Firefox :: Toolbars and Customization, defect, P3)

defect

Tracking

()

RESOLVED DUPLICATE of bug 1373851

People

(Reporter: amylee, Unassigned)

References

(Blocks 1 open bug)

Details

(Whiteboard: [ntim-backlog])

Current Behavior:

When I change the theme in Customize and have the Quantum Lights extension enabled, it will switch back to the Quantum Lights theme when restarting the browser.

Expected:
When I change the theme in Customize, it should save my changes on restart.
:ntim, do you know why this doesn't work as expected?
Flags: needinfo?(ntim.bugs)
(In reply to :Gijs (he/him) from comment #1)
> :ntim, do you know why this doesn't work as expected?

Dynamic themes can be applied on top of any theme (static/dynamic/default), due to their per-window/dynamic nature.

Which means on startup, the current static/default theme will be applied first (dark theme in OPs case), then when Quantum Lights starts up, it will override the current theme.

In the customization mode, we could show "This extension is controlling your browser theme" on windows where the theme is overriden.
Flags: needinfo?(ntim.bugs)
(In reply to Tim Nguyen :ntim from comment #2)
> (In reply to :Gijs (he/him) from comment #1)
> > :ntim, do you know why this doesn't work as expected?
> 
> Dynamic themes can be applied on top of any theme (static/dynamic/default),
> due to their per-window/dynamic nature.

This sentence doesn't really make sense to me. What are static/dynamic/default themes in this context? Which of those is a lightweight theme?

> Which means on startup, the current static/default theme will be applied
> first (dark theme in OPs case), then when Quantum Lights starts up, it will
> override the current theme.

What happens if there are 2 webextension themes installed?

> In the customization mode, we could show "This extension is controlling your
> browser theme" on windows where the theme is overriden.

Seems to me we should do it for all windows, or it'll just be more confusing. Do we show a disclaimer like this in about:addons in the themes section? (Do webextension themes show up there?)

Is this already an issue on 59 or 60, or only on 61? If on release, it's pretty disappointing that we've let the theme stuff ship with primary UI being broken by it.
Flags: needinfo?(ntim.bugs)
> What happens if there are 2 webextension themes installed?

Dynamic webExtension themes (just normal webextensions with the theme permission): can have as many enabled at the same time. The last one which calls browser.theme.update() takes over the browser theme. Note that browser.theme.update() can also target single windows. So one window might have a theme from one extension, and another window will have another theme from another extension.

Default/Light/Dark/Lightweight/static webextension themes: can only have one of those enabled at the same.

This strange combination of things means you can have situations where one window has a lightweight theme, and another one has a per-window theme from a WebExtension dynamic theme.

> Seems to me we should do it for all windows, or it'll just be more confusing. Do we show a disclaimer like this in about:addons in the themes section? (Do webextension themes show up there?)

Dynamic themes: they're in the "Extensions" section. This makes sense, because dynamic themes can do anything an extension can do, with the extra theming bit. Some extensions might request the theme permission, but don't actually change the theme unless you enable a setting in the add-on.

Static/Dark/Light/Default themes: they're in the "Themes" section. Note that Static webextension themes can't be uploaded to AMO at the moment, only dynamic themes are allowed on AMO.

> Is this already an issue on 59 or 60, or only on 61? If on release, it's pretty disappointing that we've let the theme stuff ship with primary UI being broken by it.

It was an issue ever since Firefox 55 when we started having the theme API.
Flags: needinfo?(ntim.bugs)
(In reply to Tim Nguyen :ntim from comment #4)
> > Seems to me we should do it for all windows, or it'll just be more confusing. Do we show a disclaimer like this in about:addons in the themes section? (Do webextension themes show up there?)
> 
> Dynamic themes: they're in the "Extensions" section. This makes sense,
> because dynamic themes can do anything an extension can do, with the extra
> theming bit. Some extensions might request the theme permission, but don't
> actually change the theme unless you enable a setting in the add-on.
> 
> Static/Dark/Light/Default themes: they're in the "Themes" section. Note that
> Static webextension themes can't be uploaded to AMO at the moment, only
> dynamic themes are allowed on AMO.

This doesn't answer my question - if you have a webextension with the theme permission installed, and you go to the "themes" section in about:addons (which won't show that webextension because it's under "Extensions"), is there some kind of messaging there saying that aspects of the theme might be controlled by the extension/dynamic-theme ?
Flags: needinfo?(ntim.bugs)
> is there some kind of messaging there saying that aspects of the theme might be controlled by the extension/dynamic-theme ?

No
Flags: needinfo?(ntim.bugs)
Blocks: themingapi-ux
No longer blocks: themingapi
Summary: When changing themes in customize, a theme from extensions overrides it on browser restart → Show when an extension has called browser.theme.update() in the customization mode
Priority: -- → P3
Tim, do you think you could work on this?
Flags: needinfo?(ntim.bugs)
I don't have time to do it in the coming month, but adding it to my list.
Flags: needinfo?(ntim.bugs)
Whiteboard: [ntim-backlog]
Duping this to 1373851 because we want to show this to the user no matter if it's in Customize or about:addons.
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.