The "Report Site Issue" page action can be disabled in the page action menu but enabled in the urlbar

RESOLVED FIXED

Status

enhancement
RESOLVED FIXED
a year ago
a year ago

People

(Reporter: adw, Assigned: miketaylr, Mentored)

Tracking

(Blocks 1 bug)

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments)

(Reporter)

Description

a year ago
If you open a page that's not compatible with the webcompat reporter (about:about for example), the Report Site Issue menu item in the page action menu will be disabled.  But if you also add that action to the urlbar, its button there will not be disabled.  The menu item is disabled here: https://dxr.mozilla.org/mozilla-central/rev/fc194660762d1b92e1679d860a8bf41116d0f54f/browser/extensions/webcompat-reporter/content/WebCompatReporter.jsm#47

Only the node in the menu is disabled, not the one in the urlbar (if present).  What should actually happen now (probably) is to call PageActions.actionForID("webcompat-reporter-button").setDisabled(window), now that we have that ability.  That will automatically disable both nodes for that window.
(Assignee)

Comment 1

a year ago
Thanks for reporting! (And for the suggested fix...). Will work on a patch tonight.
Assignee: nobody → miket
(Assignee)

Updated

a year ago
Flags: needinfo?(miket)
(Reporter)

Comment 2

a year ago
Thanks Mike.  The patch here should probably be similar to the patch in bug 1417272:  Replace the onShowingInPanel handler with an onLocationChange handler, and then make the call to setDisabled() in that handler.
Comment hidden (mozreview-request)
(Assignee)

Comment 5

a year ago
mozreview-review
Comment on attachment 8929165 [details]
Bug 1417273. Remove obsolete assertion from Report Site Issue test. , a=testonly

https://reviewboard.mozilla.org/r/200454/#review205570
Attachment #8929165 - Flags: review?(miket) → review+
(Reporter)

Comment 6

a year ago
mozreview-review
Comment on attachment 8929164 [details]
Bug 1417273. Use PageAction.setDisabled to enable/disable  Report Site Issue button.

https://reviewboard.mozilla.org/r/200452/#review205600

Looks good, thanks!
Attachment #8929164 - Flags: review?(adw) → review+
(Reporter)

Updated

a year ago
Status: NEW → ASSIGNED
(Assignee)

Comment 7

a year ago
Thanks for review!
Flags: needinfo?(miket)
Comment hidden (mozreview-request)
Comment hidden (mozreview-request)
(Assignee)

Comment 11

a year ago
(oops, had an extra space making eslint sad -- fixed now)

Comment 12

a year ago
Pushed by mitaylor@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/2ca73dc22a1f
Use PageAction.setDisabled to enable/disable  Report Site Issue button. r=adw
https://hg.mozilla.org/integration/autoland/rev/16c55e718c19
Remove obsolete assertion from Report Site Issue test. r=miketaylr, a=testonly
https://hg.mozilla.org/mozilla-central/rev/2ca73dc22a1f
https://hg.mozilla.org/mozilla-central/rev/16c55e718c19
Status: ASSIGNED → RESOLVED
Last Resolved: a year ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.