Closed Bug 1989252 Opened 1 year ago Closed 2 months ago

Hidden actions are still visible in Quick Actions mode

Categories

(Firefox :: Address Bar, defect, P3)

Firefox 144
defect

Tracking

()

VERIFIED FIXED
155 Branch
Tracking Status
firefox144 --- wontfix
firefox145 --- wontfix
firefox155 --- verified
firefox156 --- verified

People

(Reporter: 6k64x4ma, Assigned: mkaply)

References

Details

Attachments

(1 file)

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:144.0) Gecko/20100101 Firefox/144.0

Steps to reproduce:

  1. Set "print.enabled" to false in about:config.
  2. Type "pdf" in the address bar.
    • "Save page as PDF" action is not shown. This is correct behavior.
  3. Press ESC key twice and type "> " to activate Quick Actions mode.

Actual results:

"Save page as PDF" and "Print page" are visible when activating Quick Actions mode.

Expected results:

These items should be hidden when print.enabled is false (see bug 1889569).

Component: Untriaged → Address Bar
Severity: -- → S3
Priority: -- → P3
See Also: → 1889569
Status: UNCONFIRMED → NEW
Ever confirmed: true

Hello, thank you for the bug report!
Managed to reproduce this issue on:

  • Firefox Nightly 145.0a1;
  • Firefox 144.0b3;

Tested on:

  • Windows 10;
  • Ubuntu 22;
  • macOS 15;

This seems like an overall bug in the hidden feature in Quickactions?

I came across this for the "translate" action being listed in the full actions list, despite it being disabled.

This seems like an overall bug in the hidden feature in Quickactions?

Yes, this is a general problem for all actions that are meant to be hidden. Only ProviderQuickActions.queryActions will filter with isVisible. But UrlbarProviderActionsSearchMode calls ActionsProviderQuickActions.getActions directly, which doesn't filter them out.

This is partly by design, the quickactions are not filtered in actions search mode because the search mode is specifically a way to list available actions for users to discover what is available even if they are not currently applicable. However there is a bug that actions that are not usable should be shown as disabled, currently they are marked as disabled but styled the same as the rest of the buttons

But actions that are explicitly not available (for instance via enterprise policy), shouldn't show at all.

Yeh seems reasonable if a feature can never be enabled then it shouldnt show. Instead of fiddling with filtering available actions, I dont think actions like these should be loaded at all (they are loaded @ https://searchfox.org/firefox-main/source/browser/components/urlbar/QuickActionsLoaderDefault.sys.mjs)

Assignee: nobody → mozilla
Status: NEW → ASSIGNED

Yeh seems reasonable if a feature can never be enabled then it shouldnt show. Instead of fiddling with filtering available actions, I dont think actions like these should be loaded at all (they are loaded @ https://searchfox.org/firefox-main/source/browser/components/urlbar/QuickActionsLoaderDefault.sys.mjs)

Does that loader get invoked everytime or just at runtime? Because the policy can be dynamic.

There was already a capability in Quickactions for isActive versus isVisible, it just wasn't being used.

Pushed by mozilla@kaply.com: https://github.com/mozilla-firefox/firefox/commit/dd6f2fcf8197 https://hg.mozilla.org/integration/autoland/rev/05ac32723be1 Don't show unavailable quickactions in action mode. r=daleharvey,urlbar-reviewers,mak
Pushed by agoloman@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/0372164bf317 https://hg.mozilla.org/integration/autoland/rev/9619a95c6d24 Revert "Bug 1989252 - Don't show unavailable quickactions in action mode. r=daleharvey,urlbar-reviewers,mak" for causing xpc failures @test_quickaction_telemetry.js.

Backed out for causing xpc failures @test_quickaction_telemetry.js.

Flags: needinfo?(mozilla)

Missed because it's a debug only assert. Added workaround.

Ran try build to verify fix.

Flags: needinfo?(mozilla)
Pushed by mozilla@kaply.com: https://github.com/mozilla-firefox/firefox/commit/22e2727ab23d https://hg.mozilla.org/integration/autoland/rev/e4bc554fdd09 Don't show unavailable quickactions in action mode. r=daleharvey,urlbar-reviewers,mak
Status: ASSIGNED → RESOLVED
Closed: 2 months ago
Resolution: --- → FIXED
Target Milestone: --- → 155 Branch
QA Whiteboard: [search][qa-triage-done-c155/b154][qa-ver-needed-c155/b154]

Managed to reproduce the issue using Fx 154.0RC.
The issue is verified fixed using Fx 155.0b1 and Fx 156.0a1 on Windows 11, macOS and Ubuntu 24. Print pdf is no longer available in quick actions if print is disabled in about:config.

Status: RESOLVED → VERIFIED
QA Whiteboard: [search][qa-triage-done-c155/b154][qa-ver-needed-c155/b154] → [search][qa-triage-done-c155/b154][qa-ver-done-c155/b154]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: