Disable theme colors in forced-colors mode
Categories
(Toolkit :: Themes, enhancement, P1)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox146 | --- | fixed |
People
(Reporter: jhirsch, Assigned: jhirsch)
References
(Blocks 2 open bugs)
Details
(Whiteboard: [fidefe-profile-management])
Attachments
(1 file)
To disable theming in forced-colors mode, we will remove the theme colors from the list of colors generated by the LightweightThemeManager.
Based on the early WIP by :emilio (https://phabricator.services.mozilla.com/D260879), it looks like the spot to check for forced-colors mode and conditionally not insert theme colors will be LightweightThemeManager._setProperties, here: https://searchfox.org/firefox-main/source/toolkit/modules/LightweightThemeConsumer.sys.mjs#693
We'll want to also add a pref that wraps this change. The pref should be defaulted to true, and wrapped by a Nimbus Variable, so that we can remotely disable it if needed.
Suggested reviewers: emilio and rpl blocking, morgan non-blocking.
Updated•2 months ago
|
Updated•2 months ago
|
| Assignee | ||
Updated•26 days ago
|
| Assignee | ||
Comment 1•26 days ago
|
||
Comment 2•24 days ago
|
||
You should be able to add some basic tests for this. You did find browser_forced_colors.js which does the right thing.
I think a test that sets a theme, verifies that the lwtheme attribute is set and so on, then forcing forced-colors with:
await SpecialPowers.pushPrefEnv({
set: [["ui.useAccessibilityTheme", 1]],
});
And confirming that:
- The web extension state thinks there's a theme, but.
- The theme is not applied (there's no lwtheme attribute, etc).
Would be at least a decent basic test for this, wdyt?
| Assignee | ||
Comment 4•21 days ago
|
||
Hey emilio - Just a quick ni? ping to take a look at the test added to the patch. Feedback welcome 👍
Updated•5 days ago
|
Description
•