Note: There are a few cases of duplicates in user autocompletion which are being worked on.

Badge-Text should not be truncated with an ellipsis - hides more than necessary

RESOLVED FIXED in Firefox 47

Status

()

Toolkit
WebExtensions: Untriaged
RESOLVED FIXED
2 years ago
a year ago

People

(Reporter: designakt, Assigned: kmag)

Tracking

unspecified
mozilla47
Points:
---
Bug Flags:
blocking-webextensions -

Firefox Tracking Flags

(firefox47 fixed)

Details

(Whiteboard: [webextension-polish]triaged)

MozReview Requests

()

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

Attachments

(3 attachments)

(Reporter)

Description

2 years ago
With Bug 1207225 we limited the with of a badge to the width of its button. We also limit to 4 characters, but 4 wide characters might still require the badge text to be truncated. 
Currently we use an ellipsis, which is not ideal for this, as it hides 2 of the max. 4 characters.
Instead of "WWWW" one would only see "WW…" whereas with a hard cut one can see more, or most of the characters.
(Cc-ing Enn, cause he's looking into why the obvious change didn't work… 

Updated

2 years ago
Blocks: 1214433

Updated

2 years ago
Flags: blocking-webextensions+

Updated

2 years ago
Whiteboard: [webextension-polish] → [webextension-polish]triaged

Updated

2 years ago
Flags: blocking-webextensions+ → blocking-webextensions-
(Assignee)

Updated

2 years ago
Assignee: nobody → kmaglione+bmo
(Assignee)

Comment 2

2 years ago
Created attachment 8716589 [details]
MozReview Request: Bug 1213895: Part 1 - Correctly support crop="none" in XUL labels. r?neil

Review commit: https://reviewboard.mozilla.org/r/33877/diff/#index_header
See other reviews: https://reviewboard.mozilla.org/r/33877/
Attachment #8716589 - Flags: review?(enndeakin)
(Assignee)

Comment 3

2 years ago
Created attachment 8716590 [details]
MozReview Request: Bug 1213895: Part 2 - Do not use ellipsis in cropped toolbarbutton badge text. r=bwinton

Review commit: https://reviewboard.mozilla.org/r/33879/diff/#index_header
See other reviews: https://reviewboard.mozilla.org/r/33879/
Attachment #8716590 - Flags: review?(bwinton)
Attachment #8716590 - Flags: review?(bwinton) → review+
Comment on attachment 8716590 [details]
MozReview Request: Bug 1213895: Part 2 - Do not use ellipsis in cropped toolbarbutton badge text. r=bwinton

https://reviewboard.mozilla.org/r/33879/#review30533

Looks good to me.

(I think we might want a larger badge when the button is in the menu panel, but that can be a separate bug.  :)
Comment on attachment 8716589 [details]
MozReview Request: Bug 1213895: Part 1 - Correctly support crop="none" in XUL labels. r?neil

This part looks ok, but it changes the default crop value to 'none'. I think you want to make sure that 'end/right' is used as the default in nsTextBoxFrame::UpdateAttributes.
Attachment #8716589 - Flags: review?(enndeakin) → review-
(Assignee)

Comment 6

2 years ago
(In reply to Neil Deakin from comment #5)
> Comment on attachment 8716589 [details]
> MozReview Request: Bug 1213895: Part 1 - Correctly support crop="none" in
> XUL labels. r?neil
> 
> This part looks ok, but it changes the default crop value to 'none'. I think
> you want to make sure that 'end/right' is used as the default in
> nsTextBoxFrame::UpdateAttributes.

Hm. You're right. I thought it only defaulted to none for an attribute with an unknown value, but it defaults to it for a missing attribute too.
(Assignee)

Comment 7

2 years ago
Comment on attachment 8716589 [details]
MozReview Request: Bug 1213895: Part 1 - Correctly support crop="none" in XUL labels. r?neil

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/33877/diff/1-2/
Attachment #8716589 - Flags: review- → review?(enndeakin)
(Assignee)

Comment 8

2 years ago
Comment on attachment 8716590 [details]
MozReview Request: Bug 1213895: Part 2 - Do not use ellipsis in cropped toolbarbutton badge text. r=bwinton

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/33879/diff/1-2/
Attachment #8716590 - Attachment description: MozReview Request: Bug 1213895: Part 2 - Do not use ellipsis in cropped toolbarbutton badge text. r?bwinton → MozReview Request: Bug 1213895: Part 2 - Do not use ellipsis in cropped toolbarbutton badge text. r=bwinton
Attachment #8716589 - Flags: review?(enndeakin) → review+
(Assignee)

Comment 9

2 years ago
https://hg.mozilla.org/integration/fx-team/rev/d61da023339cd16d65aa60c93ce463617f10a5c8
Bug 1213895: Part 1 - Correctly support crop="none" in XUL labels. r=neil

https://hg.mozilla.org/integration/fx-team/rev/c5e7457caf709a38b23d41a9e2dd499edd97459e
Bug 1213895: Part 2 - Do not use ellipsis in cropped toolbarbutton badge text. r=bwinton
(Assignee)

Comment 10

2 years ago
https://hg.mozilla.org/integration/fx-team/rev/1b7bbed6b080ed5dedc8247a162b3269040d245f
Backout one changeset from bug 1213895 for M-oth bustage. r=bustage
(Assignee)

Comment 11

2 years ago
Created attachment 8718223 [details] [diff] [review]
Part 1 - Correctly support crop="none" in XUL labels

Apparently we have code that relies on crop="none" being the default crop
type, and being almost, but not quite, the same as crop="right". In
particular, it does add an ellipsis when when the text is too long, but it
also sets the minimum width of the element to the width of the text.

Since we need the actual documented behavior of crop="none", and we can't
change the current behavior without breaking a lot of existing code, I added a
new crop="auto" type to handle the former behavior, and made it the default.
Attachment #8718223 - Flags: review?(enndeakin)
(Assignee)

Updated

2 years ago
Keywords: leave-open

Comment 12

2 years ago
Part 2 landed on M-C 8 hours ago: https://hg.mozilla.org/mozilla-central/rev/c5e7457caf70
Comment on attachment 8718223 [details] [diff] [review]
Part 1 - Correctly support crop="none" in XUL labels

OK, looks good.
Attachment #8718223 - Flags: review?(enndeakin) → review+
(Assignee)

Comment 14

a year ago
https://hg.mozilla.org/integration/fx-team/rev/62cc4b503870cf7be4ae0c530a3d7ab99c8585b9
Bug 1213895: Part 1 - Correctly support crop="none" in XUL labels. r=neil
(Assignee)

Updated

a year ago
Keywords: leave-open
https://hg.mozilla.org/mozilla-central/rev/62cc4b503870
Status: NEW → RESOLVED
Last Resolved: a year ago
status-firefox47: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla47
You need to log in before you can comment on or make changes to this bug.