Closed Bug 1337870 Opened 4 years ago Closed 4 years ago

Stop truncating add-on names in sideload/update menu items


(Toolkit :: Add-ons Manager, defect)

Not set



Tracking Status
firefox54 --- verified


(Reporter: aswan, Assigned: aswan)


(Blocks 1 open bug)


(Whiteboard: triaged)


(4 files)

+++ This bug was initially created as a clone of Bug #1336085 +++

Copy/paste from (referring to truncated add-on names in ExtensionsUI.jsm)

Concatenating in this case shouldn't be an issue, even for RTL (I also expect the name of an add-on to use Latin alphabet most of the time). 

Using intl.ellipsis instead of hard-coding the … would be even better. I'm only aware of Japanese using ... instead …, so 3 letters instead of 1, but given that Japanese is a lot denser that English, it shouldn't really create problems with the layout.
Assignee: nobody → aswan
No longer depends on: 1336085
I pushed a patch but in trying to test this, it seems like the whole idea of truncating the name is kind of pointless.  The name comes in the midst of a much longer string (i.e., "<name> was added to Firefox") that typically gets truncated well before the name reaches 50 characters.  Using css to make the truncation happen in the middle of the string is beyond my abilities.
I think in practice it doesn't matter that much, when you click on the menu entry, you go to about:addons and you get a permission notification, both of which display the full name.
Markus, I don't remember how we got here originally, should we just leave out the truncation code altogether?
Blocks: 1342142
Attachment #8835173 - Flags: review?(florian)
Whoops forgot to needinfo Markus on that previous comment.  However, I don't think truncation here is practical so the attached patch just takes it out which addresses the ellipsis issue.  If there's some css hackery that would make truncation work, I propose we handle it in a follow-up.
Andrew, I don't understand the context here.
Where would we not truncate? How long can extensions names become in general?
If they really can be any length, or very long in general, a limit on how many characters we display might make a lot of sense.
Flags: needinfo?(aswan)
This is in the menu item for sideloaded or updated extensions.  The extension name is embedded in a string like "NAME added to Firefox" or "NAME requires new permissions".  And of course, that strings is localized so we can't make any assumptions about where NAME comes within the full string.  The code currently in Nightly truncates the name to 50 characters but in practice, the entire menu entry is truncated when the name is over something like 20 characters.
Like I said above, I think figuring out a better solution for this would be a fine thing to do but I'd like to defer that to a follow-up and just remove the problematic hard-coded ellipsis right now in this bug.
Flags: needinfo?(aswan)
Attachment #8835173 - Flags: review?(florian) → review?(dtownsend)
Why not truncate the name to 20char then? Or 15 to make sure longer locals have more room to work with.
How many characters can be visible? 
How can I see what this will look like for an extension like:
To me this sounds like we will not see anything of the message if the extension name is too long... That is not a good solution.
(In reply to Markus Jaritz [:designakt prev :maritz] (UX) from comment #7)
> How many characters can be visible? 

Well that's the essence of the problem, there's no fixed answer to that question.

> How can I see what this will look like for an extension like:

It won't look any different, I'll attach a screenshot.
So we can only do one line? And about 30char... So it is very likely that for many extensions the copy will not be readable?
If that is the case we should change the copy we use to always mention the action upfront and possibly in one word. (and require that order for all locales) See attachment.

(With that we would not need to truncate the extension name as this is a relic of limiting extension name to one line from when I thought we could make this message use 2 lines if needed.)
I'm not sure if its practical to do multiple lines or not.
Note that we discussed this previously, for instance
I'm going to fork this bug, leaving this one for just removing the ellipsis and a new bug to nail down the design and do the implementation of a better solution.
Summary: Fix ellipsis on truncated add-on names → Stop truncating add-on names in sideload/update menu items
Blocks: 1342506
Comment on attachment 8835173 [details]
Bug 1337870 Skip truncation of addon names
Attachment #8835173 - Flags: review?(dtownsend) → review+
Pushed by
Skip truncation of addon names r=mossop
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla54
Based on comment 9, comment 10, comment 12 this issue is verified as fixed on Firefox 54.0a1 (2017-03-27) under Wind 7 64-bit,  Ubuntu 16.04 32-bit and Mac OS X 10.12.1.
Attached file
I attached a zip file with screenshots for every OS.
You need to log in before you can comment on or make changes to this bug.