Closed Bug 847244 Opened 8 years ago Closed 7 years ago
New click-to-play state should influence how plugins are sorted in the Add-ons Manager UI
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.
Vaguely remember some agreement over this.
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.
Assignee: nobody → abardas
Status: NEW → ASSIGNED
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
Attachment #8464346 - Flags: review?(bmcbride)
Attachment #8464346 - Flags: review?(bmcbride) → review+
Use .endsWith instead of .substring in test files, based on :Unfocused suggestion.
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
Try looks OK so far.
Whiteboard: [lang=js] → [lang=js][fixed-in-fx-team]
Status: ASSIGNED → RESOLVED
Closed: 7 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.