Closed
Bug 1441708
Opened 7 years ago
Closed 6 years ago
theme_icons is applied incorrectly when frame is dark and toolbar is light
Categories
(WebExtensions :: Frontend, defect, P1)
WebExtensions
Frontend
Tracking
(firefox63 verified)
VERIFIED
FIXED
mozilla63
Tracking | Status | |
---|---|---|
firefox63 | --- | verified |
People
(Reporter: ntim, Assigned: ntim)
References
Details
(Keywords: good-first-bug, Whiteboard: [ntim-intern-project])
Attachments
(5 files, 1 obsolete file)
STR:
- Install Tree Style Tab
- Install a theme where the frame is dark and the toolbar is light
The dark theme_icon (white) gets applied on the light toolbar
Assignee | ||
Comment 1•7 years ago
|
||
https://dxr.mozilla.org/mozilla-central/rev/580d833df9c44acec686a9fb88b5f27e9d29f68d/browser/base/content/browser.css#379-400
Seems like this should be using `toolbar[brighttext]` rather than :-moz-lwtheme-brighttext
Updated•7 years ago
|
Priority: -- → P1
Updated•7 years ago
|
Flags: needinfo?(mconca)
Comment 2•7 years ago
|
||
Tim, it seems like you have a good handle on the issue as well as a potential solution. Would you be open to landing a patch to fix this?
Flags: needinfo?(mconca) → needinfo?(ntim.bugs)
Assignee | ||
Comment 3•7 years ago
|
||
I don't have a lot of time atm to provide a full fix (one with complete automated tests). Also, a proper fix for the overflow panel needs the work from bug 1417883, so it seems like a good fit the "Dark Theme Darkening" work.
Depends on: 1417883
Flags: needinfo?(ntim.bugs)
Comment 4•7 years ago
|
||
(In reply to Tim Nguyen :ntim from comment #3)
> I don't have a lot of time atm to provide a full fix (one with complete
> automated tests).
Thanks, :ntim. I appreciate the consideration.
> Also, a proper fix for the overflow panel needs the work
> from bug 1417883, so it seems like a good fit the "Dark Theme Darkening"
> work.
:mconley How do you feel about adding this to Bug 1432172?
Flags: needinfo?(mconley)
Comment 5•7 years ago
|
||
Makes sense - adding. Thanks for the heads up.
Blocks: dark-theme-darkening
Flags: needinfo?(mconley)
Assignee | ||
Updated•7 years ago
|
Mentor: ntim.bugs
Keywords: good-first-bug
Updated•7 years ago
|
Assignee: nobody → mixedpuppy
Comment 6•7 years ago
|
||
Hey mixedpuppy, we have a set of students working in this area, and one is about to free up for more work. Have you already started this? If not, can we assign it to one of our students?
If you've already started it, don't worry, we can find other stuff.
Flags: needinfo?(mixedpuppy)
Updated•7 years ago
|
Assignee: mixedpuppy → masinico
Status: NEW → ASSIGNED
Flags: needinfo?(mixedpuppy)
Comment 7•7 years ago
|
||
Comment 8•7 years ago
|
||
Screenshot of attached manifest.json on local build using 0528a414c2a8.
I can't reproduce this bug using the attached manifest.json. I'll close this bug now as worksforme as this was likely fixed in the interim.
Updated•7 years ago
|
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → WORKSFORME
Comment 9•7 years ago
|
||
Testing with the Nightly build on Windows from the day that this bug was filed, I'm unable to reproduce this bug. Using the attached manifest I still get the same outcome as the attached screenshot.
Flags: needinfo?(ntim.bugs)
Comment 10•7 years ago
|
||
I do see the wrong theme_icons used when using dynamic themes like VivaldiFox or Themr. It seems the theme_icon is not changed dynamically together with the toolbar font. I don't think this is directly related to the contrast between tab and toolbar.
ntim refereed me to this issue when a user reported such an issue occurring with the icon of my extension in combination with VivaldiFox.
Assignee | ||
Comment 11•7 years ago
|
||
I can still reproduce.
Tree style tab uses the wrong icon in this case.
Flags: needinfo?(ntim.bugs)
Assignee | ||
Updated•7 years ago
|
Status: RESOLVED → REOPENED
Resolution: WORKSFORME → ---
Assignee | ||
Comment 12•7 years ago
|
||
(In reply to Jared Wein [:jaws] (please needinfo? me) from comment #9)
> Testing with the Nightly build on Windows from the day that this bug was
> filed, I'm unable to reproduce this bug. Using the attached manifest I still
> get the same outcome as the attached screenshot.
Probably doesn't happen in the screenshot because "blue" computes as dark text, which means it will choose the black icon (which is correct in this case). Try changing the textcolor to white for example.
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Assignee | ||
Comment 15•7 years ago
|
||
mozreview-review |
Comment on attachment 8969767 [details]
Bug 1441708 - theme_icons is applied incorrectly when frame is dark and toolbar is light
https://reviewboard.mozilla.org/r/238584/#review244326
::: browser/base/content/browser.css:376
(Diff revision 2)
> @media not all and (min-resolution: 1.1dppx) {
> .webextension-browser-action {
> list-style-image: var(--webextension-toolbar-image, inherit);
> }
>
> - .webextension-browser-action:-moz-lwtheme-brighttext {
> + .webextension-browser-action > toolbar[brighttext] {
This selector is backwards. The toolbarbutton (.webextension-browser-action) is inside the toolbar:
```
toolbar[brighttext] .webextension-browser-action
```
would be the correct one.
::: browser/base/content/browser.css:380
(Diff revision 2)
>
> - .webextension-browser-action:-moz-lwtheme-brighttext {
> + .webextension-browser-action > toolbar[brighttext] {
> list-style-image: var(--webextension-toolbar-image-light, inherit);
> }
>
> - .webextension-browser-action:-moz-lwtheme-darktext {
> + .webextension-browser-action > toolbar[brighttext] {
This should be:
toolbar:not([brighttext]) .webextension-browser-action
Since you want to target the non-brighttext case here.
Comment hidden (mozreview-request) |
Comment 17•7 years ago
|
||
mozreview-review |
Comment on attachment 8969767 [details]
Bug 1441708 - theme_icons is applied incorrectly when frame is dark and toolbar is light
https://reviewboard.mozilla.org/r/238584/#review246472
::: browser/base/content/browser.css:376
(Diff revision 3)
> - .webextension-browser-action:-moz-lwtheme-brighttext {
> + toolbar[brighttext] .webextension-browser-action {
> list-style-image: var(--webextension-toolbar-image-light, inherit);
> }
>
> - .webextension-browser-action:-moz-lwtheme-darktext {
> + toolbar:not([brighttext]) .webextension-browser-action{
> list-style-image: var(--webextension-toolbar-image-dark, inherit);
> }
Please swap the order of these rules, so the :not() rule is first. Then you can remove the :not() selector.
For example,
toolbar .webextension-browser-action {
list-style-image: ...
}
toolbar[brighttext] .webextension-browser-action {
list-style-image: ...
}
Note, please also make sure that there is a space before the curly bracket.
::: browser/base/content/browser.css:389
(Diff revision 3)
> - toolbarpaletteitem[place="palette"] > .webextension-browser-action:-moz-lwtheme-brighttext {
> + toolbarpaletteitem[place="palette"] > .webextension-browser-action > toolbar[brighttext] {
> list-style-image: var(--webextension-menupanel-image-light, inherit);
> }
>
> - .webextension-browser-action[cui-areatype="menu-panel"]:-moz-lwtheme-darktext,
> + .webextension-browser-action[cui-areatype="menu-panel"] > toolbar[brighttext],
I don't see how a toolbar could be a child of a .webextension-browser-action.
::: browser/components/tests/browser/browser.ini:1
(Diff revision 3)
> [DEFAULT]
Please revert your changes to this file since they're only whitespace changes and appear to be unrelated to this bug.
Attachment #8969767 -
Flags: review-
Updated•6 years ago
|
Product: Toolkit → WebExtensions
Comment 18•6 years ago
|
||
Hey Connor, just checking in on this bug since it's been marked as a P1 and hasn't been updated in 2 months. Are you still working on it? (And :jaws, is this still a P1?)
Flags: needinfo?(masinico)
Flags: needinfo?(jaws)
Assignee | ||
Updated•6 years ago
|
No longer blocks: dark-theme-darkening
Comment 19•6 years ago
|
||
Yeah, this is still P1. Since Connor still hasn't replied let's see if Tim can take this.
Assignee: masinico → nobody
Status: REOPENED → NEW
Flags: needinfo?(ntim.bugs)
Flags: needinfo?(masinico)
Flags: needinfo?(jaws)
Assignee | ||
Updated•6 years ago
|
Assignee: nobody → ntim.bugs
Flags: needinfo?(ntim.bugs)
Comment hidden (mozreview-request) |
Comment 21•6 years ago
|
||
mozreview-review |
Comment on attachment 8993450 [details]
Bug 1441708 - Fix theme_icons in different configurations.
https://reviewboard.mozilla.org/r/258200/#review265200
Code analysis found 3 defects in this patch:
- 3 defects found by mozlint
You can run this analysis locally with:
- `./mach lint path/to/file` (JS/Python)
If you see a problem in this automated review, please report it here: http://bit.ly/2y9N9Vx
::: browser/components/extensions/test/browser/browser_ext_browserAction_theme_icons.js:35
(Diff revision 1)
> - let {themeType, themeIcons, withDefaultIcon} = options;
> + let {
> + themeData,
> + themeIcons,
> + withDefaultIcon,
> + expectedIcon,
> + defaultArea = "navbar"
Error: Missing trailing comma. [eslint: comma-dangle]
::: browser/components/extensions/test/browser/browser_ext_browserAction_theme_icons.js:143
(Diff revision 1)
> +add_task(async function browseraction_theme_icons_different_toolbars() {
> + let themeData = {
> + "accentcolor": "#000",
> + "textcolor": "#fff",
> + "toolbar": "#fff",
> + "toolbar_text": "#000"
Error: Missing trailing comma. [eslint: comma-dangle]
::: browser/components/extensions/test/browser/browser_ext_browserAction_theme_icons.js:198
(Diff revision 1)
> +});
> +
> +add_task(async function browseraction_theme_icons_overflow_panel() {
> + let themeData = {
> + "popup": "#000",
> + "popup_text": "#fff"
Error: Missing trailing comma. [eslint: comma-dangle]
Comment hidden (mozreview-request) |
Assignee | ||
Updated•6 years ago
|
Attachment #8969767 -
Attachment is obsolete: true
Comment 23•6 years ago
|
||
mozreview-review |
Comment on attachment 8993450 [details]
Bug 1441708 - Fix theme_icons in different configurations.
https://reviewboard.mozilla.org/r/258200/#review266476
Attachment #8993450 -
Flags: review?(jaws) → review+
Comment 24•6 years ago
|
||
Pushed by ntim.bugs@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/fedcc832ac7c
Fix theme_icons in different configurations. r=jaws
Assignee | ||
Updated•6 years ago
|
Mentor: ntim.bugs
Comment 25•6 years ago
|
||
bugherder |
Status: NEW → RESOLVED
Closed: 7 years ago → 6 years ago
status-firefox63:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla63
Comment 26•6 years ago
|
||
Verified on Nightly 63.0a1 using Windows 10 x64 bit and MacOS 10.13.2 with multiple dark themes, icons appear correctly using this version of firefox, the problem appears to be solved.
Updated•6 years ago
|
Status: RESOLVED → VERIFIED
Comment 27•6 years ago
|
||
Assignee | ||
Updated•6 years ago
|
Whiteboard: [ntim-intern-project]
You need to log in
before you can comment on or make changes to this bug.
Description
•