Bold text in permission notifications is breaking lines unnecessarily

VERIFIED FIXED in Firefox 54

Status

()

Toolkit
Add-ons Manager
P1
normal
VERIFIED FIXED
a year ago
a year ago

People

(Reporter: aswan, Assigned: aswan)

Tracking

51 Branch
mozilla54
Points:
---

Firefox Tracking Flags

(firefox54 verified)

Details

(Whiteboard: [permissions] triaged)

MozReview Requests

()

Submitter Diff Changes Open Issues Last Updated
Loading...
Error loading review requests:

Attachments

(2 attachments)

(Assignee)

Description

a year ago
Created attachment 8829564 [details]
Screen Shot 2017-01-23 at 11.50.10 AM.png

See the attached screenshot.  There are meant to be two lines of text, each with a mix of normal and bold text.  But the bold text is causing line breaks.
The mixed text is implemented as a <description> with an embedded <label>, the <label> has a class that just sets font-weight.  I tried adding display: inline to the label but that doesn't seem to make any difference.  I suspect there's some simple CSS tweak here but I don't know what it is...
Flags: needinfo?(florian)
(Assignee)

Updated

a year ago
Duplicate of this bug: 1333790
The problem happens only when the add-on name is too long to fit on a single line.

To fix it, change the "label" to a "span", and add "display: inline" in its CSS.
(Assignee)

Comment 3

a year ago
I could swear I started out this way and was told not to mix html and xul.  But I'll give it a shot.
(In reply to Andrew Swan [:aswan] from comment #3)
> I could swear I started out this way and was told not to mix html and xul.

Yes, I told you to not mix html and xul unless there was a reason to do it. This bug is the reason. Sorry :-(.
Flags: needinfo?(florian)
(Assignee)

Updated

a year ago
Component: WebExtensions: Frontend → Add-ons Manager
Priority: -- → P1
Whiteboard: [permissions] → [permissions] triaged
(Assignee)

Updated

a year ago
Blocks: 1308292
Comment hidden (mozreview-request)
(Assignee)

Updated

a year ago
Attachment #8832756 - Flags: review?(florian)

Comment 6

a year ago
mozreview-review
Comment on attachment 8832756 [details]
Bug 1333168 Use <span> for addon name in permission dialog

https://reviewboard.mozilla.org/r/108978/#review110290

::: browser/modules/ExtensionsUI.jsm:177
(Diff revision 1)
>      if (name.length > 50) {
>        name = name.slice(0, 49) + "…";
>      }
>      name = this._sanitizeName(name);
>  
> -    let addonLabel = `<label class="addon-webext-name">${name}</label>`;
> +    let addonLabel = `<span class="addon-webext-name">${name}</span>`;

You need to make this change in showInstallNotification too, right?

Now that it's no longer a label, should we rename this variable to eg. addonName?
Attachment #8832756 - Flags: review?(florian) → review-
Comment hidden (mozreview-request)
(Assignee)

Comment 8

a year ago
mozreview-review-reply
Comment on attachment 8832756 [details]
Bug 1333168 Use <span> for addon name in permission dialog

https://reviewboard.mozilla.org/r/108978/#review110290

> You need to make this change in showInstallNotification too, right?
> 
> Now that it's no longer a label, should we rename this variable to eg. addonName?

Whoops, thanks, that's what I get for pushing late at night...

Comment 9

a year ago
mozreview-review
Comment on attachment 8832756 [details]
Bug 1333168 Use <span> for addon name in permission dialog

https://reviewboard.mozilla.org/r/108978/#review110378

Looks good (note: I haven't tested the patch locally, but I had tested with devtools the suggestion I proposed in comment 2, so I'm reasonably confident).
Attachment #8832756 - Flags: review?(florian) → review+

Comment 10

a year ago
Pushed by aswan@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/c1fed3356757
Use <span> for addon name in permission dialog r=florian

Comment 11

a year ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/c1fed3356757
Status: NEW → RESOLVED
Last Resolved: a year ago
status-firefox54: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla54
Verified fixed on Firefox 54.0a1 (2017-02-20/21) under Windows 10 64-bit, Mac OS X 10.12.1 and Ubuntu 16.04 32-bit. Add-ons name are correctly displayed and there are no longer unnecessary line breaks.
Status: RESOLVED → VERIFIED
status-firefox54: fixed → verified
You need to log in before you can comment on or make changes to this bug.