Open Bug 1963764 Opened 6 months ago Updated 1 month ago

"Report broken site" in the protections panel + hamburger menu should be hidden when the WebCompat Reporter is disabled and/or when the `DisableFeedbackCommands` policy is configured

Categories

(Web Compatibility :: Tooling & Investigations, defect, P1)

Firefox 138

Tracking

(firefox-esr128 unaffected, firefox-esr140 affected, firefox141 wontfix, firefox142- wontfix, firefox143- wontfix)

REOPENED
Tracking Status
firefox-esr128 --- unaffected
firefox-esr140 --- affected
firefox141 --- wontfix
firefox142 - wontfix
firefox143 - wontfix

People

(Reporter: celenity, Assigned: twisniewski)

References

(Regressed 1 open bug, Regression)

Details

(Keywords: regression)

Attachments

(3 files)

Steps to reproduce:

Set extensions.webcompat-reporter.enabled & ui.new-webcompat-reporter.enabled to false (via the about:config or some other means).

Actual results:

Observe that the Report broken site option is still visible at the top of the protections panel.

Expected results:

When the WebCompat Reporter is disabled, this option should also be hidden from the protections panel. At the very least, there needs to be some kind of preference to control this. This is very important for forks/custom configs/custom user.js files/etc. to prevent users from filing invalid reports and wasting Mozilla's time/resources.

It just occurred to me that this is also important to fix for enterprise/policies, as this option appears regardless of the DisableFeedbackCommands policy.

Flags: needinfo?(mozilla)

The Bugbug bot thinks this bug should belong to the 'Firefox::Protections UI' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: Untriaged → Protections UI

Yep, I agree. I didn't even know it was on the protections panel.

Flags: needinfo?(mozilla)

It looks like there's also a new Report broken site option in the hamburger menu as well (towards the bottom, above Help) - which also isn't covered by the existing preferences (extensions.webcompat-reporter.enabled & ui.new-webcompat-reporter.enabled) and/or the DisableFeedbackCommands policy.

Component: Protections UI → Menus
Summary: "Report broken site" in the protections panel should be hidden when the WebCompat Reporter is disabled → "Report broken site" in the protections panel + hamburger menu should be hidden when the WebCompat Reporter is disabled
Summary: "Report broken site" in the protections panel + hamburger menu should be hidden when the WebCompat Reporter is disabled → "Report broken site" in the protections panel + hamburger menu should be hidden when the WebCompat Reporter is disabled and/or when the `DisableFeedbackCommands` policy is configured
Component: Menus → Tooling & Investigations
Product: Firefox → Web Compatibility

This is a regression of the bug 1952334. The logic to hide the item in the hamburger menu is missing in the commit:
https://hg-edge.mozilla.org/mozilla-central/rev/f4fae47c5010ae1c3a26c55faa9cafbfd406b90b#l11.108

Keywords: regression
Regressed by: 1952334

:twisniewski, since you are the author of the regressor, bug 1952334, could you take a look? Also, could you set the severity field?

For more information, please visit BugBot documentation.

Flags: needinfo?(twisniewski)

Thank you, Piro. I'll re-add that code ASAP.

Severity: -- → S2
Flags: needinfo?(twisniewski)
Priority: -- → P1

Oh.. I had forgotten about this, but what we do when Report Broken Site is disabled right now is that we change the feature to instead send users to webcompat.com to submit their reports, rather than using the new reporter.

I will keep that for the case where the new reporter is preffed off, but will explore how to disable and hide it entirely when DisableFeedbackCommands is set.

Assignee: nobody → twisniewski
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true

Set release status flags based on info from the regressing bug 1952334

Pushed by twisniewski@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/d148785a48cc https://hg.mozilla.org/integration/autoland/rev/d3c2fae28af0 make sure Report Broken Site is still hidden appropriately when enterprise DisableFeedbackCommands policy is active (regressed by bug 1952334); r=Gijs
Status: ASSIGNED → RESOLVED
Closed: 3 months ago
Resolution: --- → FIXED
Target Milestone: --- → 143 Branch

The patch landed in nightly and beta is affected.
:twisniewski, is this bug important enough to require an uplift?

For more information, please visit BugBot documentation.

Flags: needinfo?(twisniewski)

Comment on attachment 9503074 [details]
Bug 1963764 - make sure Report Broken Site is still hidden appropriately when enterprise DisableFeedbackCommands policy is active (regressed by bug 1952334); r?gijs

Beta/Release Uplift Approval Request

  • User impact if declined/Reason for urgency: Users who have DisableFeedbackCommands enabled in their enterprise policy settings will erroneously still see Report Broken Site in the menus.
  • Is this code covered by automated tests?: Yes
  • Has the fix been verified in Nightly?: No
  • Needs manual test from QE?: Yes
  • If yes, steps to reproduce: Set DisableFeedbackCommands in enterprise policies, and see if Report Broken Site appears in the help menu and app menu (it should not appear at all with that policy set).
  • List of other uplifts needed: None
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): This is a regression, and the code's logic is the same as the working version used before, just checking for the DisableFeedbackCommands enterprise policy to be set, rather than a pref.
  • String changes made/needed:
  • Is Android affected?: No
Flags: needinfo?(twisniewski)
Attachment #9503074 - Flags: approval-mozilla-beta?
Flags: qe-verify+

Comment on attachment 9503074 [details]
Bug 1963764 - make sure Report Broken Site is still hidden appropriately when enterprise DisableFeedbackCommands policy is active (regressed by bug 1952334); r?gijs

Approved for 142.0b6

Attachment #9503074 - Flags: approval-mozilla-beta? → approval-mozilla-beta+

Comment on attachment 9503074 [details]
Bug 1963764 - make sure Report Broken Site is still hidden appropriately when enterprise DisableFeedbackCommands policy is active (regressed by bug 1952334); r?gijs

Beta/Release Uplift Approval Request

  • User impact if declined/Reason for urgency: Users who have DisableFeedbackCommands enabled in their enterprise policy settings will erroneously still see Report Broken Site in the menus.
  • Is this code covered by automated tests?: Yes
  • Has the fix been verified in Nightly?: No
  • Needs manual test from QE?: Yes
  • If yes, steps to reproduce: Set DisableFeedbackCommands in enterprise policies, and see if Report Broken Site appears in the help menu and app menu (it should not appear at all with that policy set).
  • List of other uplifts needed: None
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): This is a regression, and the code's logic is the same as the working version used before, just checking for the DisableFeedbackCommands enterprise policy to be set, rather than a pref.
  • String changes made/needed:
  • Is Android affected?: No
Attachment #9503074 - Flags: approval-mozilla-release?
QA Whiteboard: [uplift][qa-ver-needed-c143/b142]

Can we uplift this to ESR 140 as well?

Sure, it ought to apply cleanly on ESR 140 as well.

Comment on attachment 9503074 [details]
Bug 1963764 - make sure Report Broken Site is still hidden appropriately when enterprise DisableFeedbackCommands policy is active (regressed by bug 1952334); r?gijs

ESR Uplift Approval Request

  • If this is not a sec:{high,crit} bug, please state case for ESR consideration: Given that it affects enterprise policies, it seems appropriate to target ESR as well.
  • User impact if declined: Users who have DisableFeedbackCommands enabled in their enterprise policy settings will erroneously still see Report Broken Site in the menus.
  • Fix Landed on Version: 142 (uplifts to other branches also happening now)
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): The patch is very small and limited to only our report broken site feature.
Attachment #9503074 - Flags: approval-mozilla-esr140?

Comment on attachment 9503074 [details]
Bug 1963764 - make sure Report Broken Site is still hidden appropriately when enterprise DisableFeedbackCommands policy is active (regressed by bug 1952334); r?gijs

Approved for 140.2.0esr

Attachment #9503074 - Flags: approval-mozilla-esr140? → approval-mozilla-esr140+
Attached image recording

Celenity, I set up the policy as indicated but the "Report Broken Site" option in not gray out in none of the menus as in the recording attached. Is this expected? Thank you.

Flags: needinfo?(celenity)

Mike, can you please confirm if attached recording is expected behavior? Thank you.

Flags: needinfo?(mozilla)

Comment on attachment 9503074 [details]
Bug 1963764 - make sure Report Broken Site is still hidden appropriately when enterprise DisableFeedbackCommands policy is active (regressed by bug 1952334); r?gijs

QA wasn't able to verify that the fix actually works and we have shipped multiple releases with this regression.
Also, I think this is not an S2 ("Major functionality/product severely impaired or a high impact issue and a satisfactory workaround does not exist"), probably more an S3/S4 given that it involves non default configurations.

Attachment #9503074 - Flags: approval-mozilla-release? → approval-mozilla-release-

Maybe I'm remembering wrong, but this fix was to bring back the fact that it was showing in the Browser menus.

We'll need a separate fix for the protections panel

Flags: needinfo?(mozilla)

(In reply to Monica Chiorean from comment #23)

Created attachment 9504455 [details]
recording

Celenity, I set up the policy as indicated but the "Report Broken Site" option in not gray out in none of the menus as in the recording attached. Is this expected? Thank you.

Apologies for the late response here, thanks for taking a look at this. To answer your question: No, I don't think that's expected. I think that once the DisableFeedbackCommands policy is set, the option in the protections panel should also be hidden or grayed out.

Ideally, I think that these Report Broken Site UI options should also be hidden or grayed out when extensions.webcompat-reporter.enabled and/or ui.new-webcompat-reporter.enabled is set to false. It's currently somewhat confusing, since there's now those 2 separate preferences to control this functionality, and neither of them seem to work properly at the moment.

Flags: needinfo?(celenity)

Reopen issue based on comment #27, please update if otherwise. Thank you.

Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Flags: needinfo?(twisniewski)

Ah, I see what's happening. I should have been more thorough before landing the patch here, sorry. It turns out that the policies disable the new reporter by pref, so my code to hide the reporter were being skipped outright. I'll make a new patch to fix that.

(In reply to celenity from comment #27)

Ideally, I think that these Report Broken Site UI options should also be hidden or grayed out when extensions.webcompat-reporter.enabled and/or ui.new-webcompat-reporter.enabled is set to false. It's currently somewhat confusing, since there's now those 2 separate preferences to control this functionality, and neither of them seem to work properly at the moment.

I'm fine with dropping one of the prefs (I would prefer the old one, since we do have others in the new- branch for controlling the behavior of the new reporter). Did you or others have a preference?

Flags: needinfo?(twisniewski)

Actually no, it seems that despite about:policies showing me that DisableFeedbackCommands is true (or false), Services.policies.isAllowed("DisableFeedbackCommands") is always returning true to my code. Weird. I'm not sure what's up yet.

Oh my. I think I'm just being a bonehead, and the value I ought to be be checking is feedbackCommands, not DisableFeedbackCommands.

Pushed by twisniewski@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/adf2bb3c9288 https://hg.mozilla.org/integration/autoland/rev/f01d2c2f2791 read the correct enterprise policy when deciding whether to hide Report Broken Site (also improve the related tests); r=Gijs
Pushed by ctuns@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/f198fbbe796e https://hg.mozilla.org/integration/autoland/rev/3b91bc351cea Revert "Bug 1963764 - read the correct enterprise policy when deciding whether to hide Report Broken Site (also improve the related tests); r=Gijs" for causing mochitest failures in browser_parent_menuitems.js

Backed out for causing bc failures

  • Backout link
  • Push with failures
  • Failure Log
  • Failure line: TEST-UNEXPECTED-FAIL | browser/components/reportbrokensite/test/browser/browser_parent_menuitems.js | isMenuItemHidden(AppMenu) when disabled by DisableFeedbackCommands enterprise policy - menu item is hidden -
Flags: needinfo?(twisniewski)
Pushed by twisniewski@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/c5c06a5a32ee https://hg.mozilla.org/integration/autoland/rev/e25921a70361 read the correct enterprise policy when deciding whether to hide Report Broken Site (also improve the related tests); r=Gijs
Flags: needinfo?(twisniewski)
Pushed by sstanca@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/c97b6d9b7938 https://hg.mozilla.org/integration/autoland/rev/d308f45d9571 Revert "Bug 1963764 - read the correct enterprise policy when deciding whether to hide Report Broken Site (also improve the related tests); r=Gijs" for causing mochitests failures in browser_parent_menuitems.js.

Reverted this because it was causing mochitests failures in browser_parent_menuitems.js.

  • Revert link
  • Push with failures
  • Failure Log
  • Failure line: TEST-UNEXPECTED-FAIL | browser/components/reportbrokensite/test/browser/browser_parent_menuitems.js | isMenuItemHidden(AppMenu) when disabled by DisableFeedbackCommands enterprise policy - menu item is hidden -
Flags: needinfo?(twisniewski)
Regressions: 1981374

:twisniewski Since RC week is next week, do we need to roll back https://phabricator.services.mozilla.com/D258785 and give this more time in nightly?

Thankfully, what we've landed does no harm, so I don't think it's worth rolling it back (it effectively does nothing). I do still need to work on my patch, since I don't understand why it's intermittently failing on Linux yet, and I don't know if I'll have time to figure it out during this release cycle (but I'll try!)

Flags: needinfo?(twisniewski)

:twisniewski any update here on next steps?

Flags: needinfo?(twisniewski)

I (or someone else) needs to figure out what's causing my patch's tests to intermittently fail, and I don't have time to check into that right now.

One option is to ship the patch and live with it intermittently failing, but I suspect that we would not want to do that.

Flags: needinfo?(twisniewski)

Comment on attachment 9503074 [details]
Bug 1963764 - make sure Report Broken Site is still hidden appropriately when enterprise DisableFeedbackCommands policy is active (regressed by bug 1952334); r?gijs

Clearing the approval flag to get this off the needs-uplift radar for ESR140.

Attachment #9503074 - Flags: approval-mozilla-esr140+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: