Closed
Bug 847244
Opened 12 years ago
Closed 10 years ago
New click-to-play state should influence how plugins are sorted in the Add-ons Manager UI
Categories
(Toolkit :: Add-ons Manager, defect)
Toolkit
Add-ons Manager
Tracking
()
RESOLVED
FIXED
mozilla34
People
(Reporter: Unfocused, Assigned: alexbardas, Mentored)
References
Details
(Whiteboard: [lang=js])
Attachments
(1 file, 1 obsolete file)
6.70 KB,
patch
|
alexbardas
:
review+
|
Details | Diff | Splinter Review |
Not 100% sure we want this, but...
When add-ons are shown in a list, we sort the enabled ones first and the disabled ones last. With bug 549697, we have a new intermediate state of "ask me". It may make sense to take that into account when sorting plugins - and sort the "ask me" state in between the equivalents of enabled and disabled. With the current patch in bug 549697, they're sorted the same as enabled plugins.
Reporter | ||
Comment 2•10 years ago
|
||
Vaguely remember some agreement over this.
Flags: needinfo?(jboriss)
Reporter | ||
Comment 3•10 years ago
|
||
Will need to update sortElements() in toolkit/mozapps/extensions/content/extensions.js
Add-ons are of a type, as determined by their 'type' property. Add-on types also have a set of properties, that define how that specific type should behave - you can look this up via AddonManager.addonTypes - which is a hash mapping the type ID (a string) to a AddonType object. An AddonType object has a 'flags' property, which is a bitfield. If it includes TYPE_SUPPORTS_ASK_TO_ACTIVATE, then such an add-on's 'userDisabled' property can have the value STATE_ASK_TO_ACTIVATE.
We want add-ons in the ask-to-activate state to be sorted so they come directly after enabled add-ons.
Mentor: bmcbride
Whiteboard: [lang=js]
Assignee | ||
Updated•10 years ago
|
Assignee: nobody → abardas
Status: NEW → ASSIGNED
Assignee | ||
Comment 4•10 years ago
|
||
Assignee | ||
Updated•10 years ago
|
Attachment #8464346 -
Attachment description: bug847244_sort_plugins_from_addons_manager.diff → Take into account askToActivate state for plugin Addon objects and add new browser tests
Assignee | ||
Updated•10 years ago
|
Attachment #8464346 -
Flags: review?(bmcbride)
Reporter | ||
Comment 5•10 years ago
|
||
Comment on attachment 8464346 [details] [diff] [review]
Take into account askToActivate state for plugin Addon objects and add new browser tests
Review of attachment 8464346 [details] [diff] [review]:
-----------------------------------------------------------------
Awesome, thanks :)
::: toolkit/mozapps/extensions/test/browser/browser_sorting_plugins.js
@@ +72,5 @@
> + var node = list.firstChild;
> + var baseId = "@tests.mozilla.org";
> + while (node) {
> + var id = node.getAttribute("value");
> + if (id && id.substring(id.length - baseId.length) == baseId)
Nit: Now days we can use .endsWith(), which makes this a lot cleaner - see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/endsWith
Attachment #8464346 -
Flags: review?(bmcbride) → review+
Assignee | ||
Comment 6•10 years ago
|
||
Use .endsWith instead of .substring in test files, based on :Unfocused suggestion.
Attachment #8464346 -
Attachment is obsolete: true
Attachment #8465615 -
Flags: review+
Comment 7•10 years ago
|
||
Comment on attachment 8465615 [details] [diff] [review]
Take into account askToActivate state for plugin Addon objects and add new browser tests
I pushed this to try: https://tbpl.mozilla.org/?tree=Try&rev=3063670d0ae7
Comment 9•10 years ago
|
||
Comment 10•10 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Whiteboard: [lang=js][fixed-in-fx-team] → [lang=js]
Target Milestone: --- → mozilla34
You need to log in
before you can comment on or make changes to this bug.
Description
•