Closed Bug 1417273 Opened 3 years ago Closed 3 years ago

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

Categories

(Web Compatibility :: Tooling & Investigations, enhancement)

enhancement
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: adw, Assigned: miketaylr, Mentored)

References

(Blocks 1 open bug)

Details

Attachments

(2 files)

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.
Thanks for reporting! (And for the suggested fix...). Will work on a patch tonight.
Assignee: nobody → miket
Flags: needinfo?(miket)
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 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+
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+
Status: NEW → ASSIGNED
Thanks for review!
Flags: needinfo?(miket)
(oops, had an extra space making eslint sad -- fixed now)
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
Closed: 3 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.