Context menu doesn't have icons for the extensions
Categories
(Thunderbird :: Add-Ons: Extensions API, defect)
Tracking
(thunderbird_esr78 unaffected, thunderbird89 fixed)
Tracking | Status | |
---|---|---|
thunderbird_esr78 | --- | unaffected |
thunderbird89 | --- | fixed |
People
(Reporter: juraj.masiar, Assigned: Paenglab)
References
(Regression)
Details
Attachments
(6 files, 1 obsolete file)
8.69 KB,
image/png
|
Details | |
1.38 KB,
patch
|
Paenglab
:
review+
wsmwk
:
approval-comm-beta+
|
Details | Diff | Splinter Review |
6.58 KB,
image/png
|
Details | |
49.75 KB,
image/png
|
Details | |
12.03 KB,
image/png
|
Details | |
19.82 KB,
image/png
|
Details |
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:89.0) Gecko/20100101 Firefox/89.0
Steps to reproduce:
- install Web Translate:
https://addons.thunderbird.net/en-US/thunderbird/addon/web_translate/ - open email
- select text
- right click
Actual results:
The extension item in the context menu doesn't have icon.
Expected results:
It should have an icon.
Also that double separator bar looks fishy.
Comment 1•4 years ago
|
||
mozgegression showed it was this changeset:
Probably the UI patch. Richard, could you have a look?
Updated•4 years ago
|
Assignee | ||
Comment 2•4 years ago
|
||
Yes, this was done because Proton don't show icons and this would make the menuitem text alignment odd. But they added a [needsgutter]
property that I can use now to show the icons when this property is set.
Assignee | ||
Comment 3•4 years ago
|
||
When the menupopup has the property [needsgutter] set then show the icon because there is enough space to show it. When it's not set, then we have no space and the text is still correctly aligned.
This is a Windows 10 only bug with browser.proton.contextmenus.enabled
on true, which is the default.
Comment 4•4 years ago
|
||
Comment on attachment 9217712 [details] [diff] [review]
1706895-menuitem-icon.patch
Confirmed this fixes the icon issue.
@juraj.masiar: I will fix the additional separator in a follow-up patch/bug.
Assignee | ||
Comment 5•4 years ago
|
||
Patch updated after landing of bug 1706978.
Assignee | ||
Comment 6•4 years ago
|
||
Comment on attachment 9217948 [details] [diff] [review]
1706895-menuitem-icon.patch
Changing to r+ as the previous patch was already reviewed.
Assignee | ||
Updated•4 years ago
|
Assignee | ||
Updated•4 years ago
|
Updated•4 years ago
|
Pushed by mkmelin@iki.fi:
https://hg.mozilla.org/comm-central/rev/81f8cf11da4b
[Windows 10] Show the menuitem icon when the menupopup has the needed space in front. r=TBSync
Assignee | ||
Comment 8•4 years ago
|
||
Comment on attachment 9217948 [details] [diff] [review]
1706895-menuitem-icon.patch
[Approval Request Comment]
Regression caused by (bug #): bug 1703988
User impact if declined: No extension icon in menu
Testing completed (on c-c, etc.): on c-c
Risk to taking this patch (and alternatives if risky): low
Comment 9•4 years ago
•
|
||
This bug confuses me. We switch off the icons in menupopups, if there is no needsgutter attribute. The needsgutter attribute cannot be enforced, it is auto-controlled by this:
So only if there is a radio or checkbox type menuitem in there, the needsgutter attribute is added. It does not care about icons. If I have menupopups without checkboxes or icons (in the menus WebExtension API) and the icons are consequently not shown (but we need them). And adding a needsgutter attribute does not help, as the linked code removes it again.
Can we have a new class like menupopup-iconic
, which I can apply to a menupopup, which overrides this behavior? So that needsgutter will not be used as a check to hide icons if the menupopup-iconic
class is present?
Or can we limit this needsgutter behavior to some areas of TB but not everywhere?
Assignee | ||
Comment 10•4 years ago
|
||
Proton seems to not like icons in menus. You need to ask someone from toolkit if this new class would be allowed.
Comment 11•4 years ago
|
||
Hm, if I am not missing something then I would say it is our own code, who is causing this, not toolkit.
Toolkit does not have any CSS rule which applies display:none
to elements who do not have needsgutter
, that is only in our code:
https://searchfox.org/comm-central/search?q=needsgutter&path=&case=false®exp=false
If I remove this, then I have my icons again.
Assignee | ||
Comment 12•4 years ago
|
||
The CSS code is our, yes. This to fix the alignment in the menus, see screenshot if the icon, or the space for the icon, isn't hidden. This looks bad or not?
Comment 13•4 years ago
|
||
How does that look on Linux?
What I think is strange, is that needsgutter is only added on Windows so Windows has no icons anymore, but Linux and Mac do. I wish we could do something about this.
For me it would be enough to change that CSS rule of ours so I can enforce icons in my WebExtension menus, but I hope we can find a different solution altogether.
Comment 14•4 years ago
|
||
This is how tip on linux looks for me.
Assignee | ||
Comment 15•4 years ago
|
||
TB itself doesn't use any icons in menus, except the chat staus icons, but in its own sub menu. Only extensions have icons.
Comment 16•4 years ago
|
||
And this is how it looks on Windows.
Comment 18•4 years ago
|
||
In Firefox nightly on Windows the menuitem-iconic icons are shown. Shifting them looks also strange but better than nothing at all. I have to check later how that looks on Linux.
Comment 19•4 years ago
|
||
Comment on attachment 9217948 [details] [diff] [review]
1706895-menuitem-icon.patch
[Triage Comment]
Approved for beta
Comment 20•4 years ago
|
||
bugherder uplift |
Thunderbird 89.0b2:
https://hg.mozilla.org/releases/comm-beta/rev/80299e59cb41
Comment 21•4 years ago
|
||
(In reply to Richard Marti (:Paenglab) from comment #12)
Created attachment 9218688 [details]
menuitem-iconic.pngThe CSS code is our, yes. This to fix the alignment in the menus, see screenshot if the icon, or the space for the icon, isn't hidden. This looks bad or not?
Yeah, this looks ugly.
I honestly don't know what might be the optimal solution here.
I personally don't mind menu items that have icons being indented compared to adjacent items, but I can see how that might be visually jarring.
Checkboxes and radio buttons are another thing, and I don't know if not having the gutter space for all the adjacent items in the same menu will look weird.
Nonetheless, having a whole menu with an empty gutter space to the left when we know nothing will be added to it it's very strange.
Updated•4 years ago
|
Comment 22•4 years ago
|
||
I can write a patch which will enforce gutter in all menupopups (on popupshowing) if a WebExtension has added a menu entry with an icon.
This will make windows and linux look the same and only add gutter if needed.
How does that sound?
Assignee | ||
Comment 23•4 years ago
|
||
(In reply to Alessandro Castellani [:aleca] from comment #21)
Nonetheless, having a whole menu with an empty gutter space to the left when we know nothing will be added to it it's very strange.
Attachment 9218702 [details] shows also on Linux an empty space to the left also without the extension installed.
I'm planning a follow-up bug that adds the left space to all menupopups like the default Windows 10 menus have.
Description
•