Closed Bug 590347 Opened 15 years ago Closed 12 years ago

Expose the softblock notification in preference to the incompatible notification when compatibility checking is disabled

Categories

(Toolkit :: Add-ons Manager, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla24
Tracking Status
blocking2.0 --- -

People

(Reporter: mossop, Assigned: sachin)

Details

(Whiteboard: [good first bug])

Attachments

(2 files, 1 obsolete file)

We want to only show one of these messages at a time. When compatibility checking is enabled the incompatible message is more important since it blocks the user from using the add-on. When compatibility checking is disabled the softblock message is probably more important since we have information that the add-on may be dangerous to use.
This is true for the details and list views
blocking2.0: --- → betaN+
Whiteboard: [good first bug]
Doesn't affect mainstream users so we shouldn't block the release on it.
blocking2.0: betaN+ → -
Assignee: dtownsend → nobody
What are the softblock and incompatible notifications? How can I reproduce them? I was able to find where the compatibility check preference listener lies, but I don't understand what these notifications are. Thanks
Flags: needinfo?(dtownsend+bugmail)
(In reply to Sachin Hosmani from comment #3) > What are the softblock and incompatible notifications? > How can I reproduce them? > > I was able to find where the compatibility check preference listener lies, > but I don't understand what these notifications are. This is an example of the incompatible notification, it appears in the list or detail view of add-ons. The softblock notification looks similar though with different text/colours. You can simulate softblocking an add-on with a custom blocklist file (see https://wiki.mozilla.org/Extension_Blocklisting:Testing). An incompatible add-on can be created with just an install.rdf with an incompatible min/maxVersion range in it.
Flags: needinfo?(dtownsend+bugmail)
Assignee: nobody → sachinhosmani2
Status: NEW → ASSIGNED
Attachment #742704 - Flags: review?(dtownsend+bugmail)
Comment on attachment 742704 [details] [diff] [review] Exposes the softblock notification in preference to the incompatible notification when compatibility checking is disabled Review of attachment 742704 [details] [diff] [review]: ----------------------------------------------------------------- What files are you patching here, the line numbers don't match up to mozilla-central. This looks good but I'd really like to see a test for it. browser_list.js and browser_details.js should show examples of testing these things. You may find it easier to write a separate test file to just test this case rather than squeeze it into those though as you have to manipulate compatibility checking. ::: toolkit/mozapps/extensions/content/extensions.js @@ +2783,5 @@ > errorLink.value = gStrings.ext.GetStringFromName("details.notification.blocked.link"); > errorLink.href = this._addon.blocklistURL; > errorLink.hidden = false; > + } else if (!this._addon.isCompatible && (AddonManager.checkCompatibility || > + !(this._addon.blocklistState == Ci.nsIBlocklistService.STATE_SOFTBLOCKED))) { Just change the == to != and drop the leading ! ::: toolkit/mozapps/extensions/content/extensions.xml @@ +1186,5 @@ > this._errorLink.value = gStrings.ext.GetStringFromName("notification.blocked.link"); > this._errorLink.href = this.mAddon.blocklistURL; > this._errorLink.hidden = false; > + } else if ((!isUpgrade && !this.mAddon.isCompatible) && (AddonManager.checkCompatibility || > + !(this.mAddon.blocklistState == Ci.nsIBlocklistService.STATE_SOFTBLOCKED))) { Ditto
Attachment #742704 - Flags: review?(dtownsend+bugmail) → review+
> What files are you patching here, the line numbers don't match up to > mozilla-central. I should have pulled before creating the patch. And yes, I'm working on the rest.
Attached patch Includes a testSplinter Review
Attachment #742704 - Attachment is obsolete: true
Attachment #747529 - Flags: review?(dtownsend+bugmail)
Comment on attachment 747529 [details] [diff] [review] Includes a test Review of attachment 747529 [details] [diff] [review]: ----------------------------------------------------------------- Looks great, thanks!
Attachment #747529 - Flags: review?(dtownsend+bugmail) → review+
Dave, are there any issues left? Can it be pushed?
Ah yes sorry I didn't realise you couldn't checkin. Flagging it for someone to grab or I'll take care of it later on today.
Keywords: checkin-needed
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla24
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: