Closed Bug 1712104 Opened 3 years ago Closed 2 years ago

Add a preference 'print.prefer_system_dialog' to allow printing directly via the system print dialog

Categories

(Toolkit :: Printing, enhancement, P3)

enhancement

Tracking

()

VERIFIED FIXED
102 Branch
Tracking Status
firefox101 - verified
firefox102 --- verified

People

(Reporter: mkaply, Assigned: jwatt)

References

(Blocks 1 open bug)

Details

(Whiteboard: [print2020])

Attachments

(4 files)

Chrome and Edge provide a policy that goes directly to the system print dialog when set (avoiding print preview).

https://chromeenterprise.google/policies/#DisablePrintPreview

With our new print preview functionality, we should consider implementing this.

Severity: S3 → N/A

(Adding Emma, for visibility…)

Whiteboard: [print2020]
Blocks: 1702501

How do you actually set DisablePrintPreview on macOS? It's not clear from the document linked above.

on macOS Chrome? I'll see if I can find you an easy way. Policies on mac Chrome are a little painful.

Save this file as com.google.Chrome.mobileconfig

When you double click on it, mac will add it as an enterprise policy.

This file only has the DisablePrintPreview policy in it.

When you want to remove, you can search on "Profiles" in spotlight and it will bring up the UI to remove it.

Having the called-back-for-new-static-doc logic mixed in with the
start-new-print logic was confusing. The new structure, function names
and comments should hopefully make it easier for people unfamiliar with the
various printing code flows to understand and reason about this code.

Assignee: nobody → jwatt
Status: NEW → ASSIGNED

Because the print modal can still trigger migraines, if users scroll or accidentally scroll, I think an accessible alternative is still an accessibility issue. (And an accessible option should be enabled by default, with the current version requiring user consent.)

See Also: → 1755156
See Also: 1755156
Blocks: 1667950
See Also: → 1748846

This still seems like something we should do to me. Has there been any progress on this?

No longer blocks: 1702501
See Also: → 1702501
Attached image switch off preview.jpg

In Thunderbird :
Setting: 'print.tab_modal.enabled' = 'True',
Click on 'Print' - opens 'Print Preview' screen.

Setting 'print.tab_modal.enabled' = 'false'
Right on email and choose 'Print',
now offered the printer 'Print' screen - see image as example.
It by passes the Thunderbird Print Preview screen.

Can this be added to Firefox?

(In reply to Anje from comment #21)

Setting 'print.tab_modal.enabled' = 'false'
Right on email and choose 'Print',
now offered the printer 'Print' screen - see image as example.
It by passes the Thunderbird Print Preview screen.

Can this be added to Firefox?

That is essentially what this bug is about, yes.

(Not necessarily via that particular about:config preference, since that preference was guarding some obsolete code, which was removed along with the pref in bug 1702501. This bug here is about adding back a pref/configuration to explicitly let you skip the tab-modal dialog in a more targeted way without also enabling all that obsolete code.)

What is wrong with a checkbox in the "preferences" section ?

As i understand it, skipping the built-in print dialogue and instead using the systems print dialogue seems to be what many users want.

Using "about:config + some variable to set" seems very ad-hoc and obscure, a proper checkbox under "preferences"
fits sane user interface and might even have a description for the user.

Attachment #9258216 - Attachment description: Bug 1712104 p2 - Add a pref to print via the system print dialog. r=emilio → Bug 1712104 p2 - Support printing directly via the system print dialog. r=emilio
Pushed by jwatt@jwatt.org:
https://hg.mozilla.org/integration/autoland/rev/d3fc3c28488e
p1 - Refactor PrintUtils.startPrintWindow for easier reasoning. r=emilio,webdriver-reviewers
https://hg.mozilla.org/integration/autoland/rev/27f08073cac6
p2 - Support printing directly via the system print dialog. r=emilio

[Tracking Requested - why for this release]:
Just a heads-up that I plan or requesting uplift.

(In reply to peter håkanson from comment #24)

What is wrong with a checkbox in the "preferences" section ?

That would require a decision by the User Experience team. I've filed bug 1768210 to consider that.

Component: Enterprise Policies → Printing
Product: Firefox → Toolkit
Summary: Implement the DisablePrintPreview policy from Chrome and Edge → Add a preference 'print.prefer_system_dialog' to allow printing directly via the system print dialog
Version: unspecified → Trunk
Blocks: 1768210

Not something I'm going to track for the release, but I'm open to considering an uplift request when the time comes.

Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 102 Branch

Comment on attachment 9258215 [details]
Bug 1712104 p1 - Refactor PrintUtils.startPrintWindow for easier reasoning. r=emilio

Beta/Release Uplift Approval Request

  • User impact if declined: A number of users would prefer to be able to print directly using the system dialog without going through the preview. I'd also like to have this in 101 so we have some chance of getting user feedback before ESR 102.
  • Is this code covered by automated tests?: No
  • Has the fix been verified in Nightly?: Yes
  • Needs manual test from QE?: No
  • If yes, steps to reproduce:
  • List of other uplifts needed: None
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): Behind a pref.
  • String changes made/needed: none
  • Is Android affected?: No
Attachment #9258215 - Flags: approval-mozilla-beta?
Attachment #9258216 - Flags: approval-mozilla-beta?

Comment on attachment 9258215 [details]
Bug 1712104 p1 - Refactor PrintUtils.startPrintWindow for easier reasoning. r=emilio

Adds an option behind a pref for a commonly-requested ability. Approved for 101.0b4.

Attachment #9258215 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
Attachment #9258216 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
Flags: qe-verify+
QA Whiteboard: [qa-triaged]

This is verified fixed using Firefox 102.0a1 (BuildId:20220511094252) and Firefox 101.0b5 (BuildId:20220510144626) on Windows 10 64bit, macOS 11 and Ubuntu 20.04

Verified that:

  • The "print.prefer_system_dialog" preference set to true opens the system print dialog instead of the print preview (tested using different trigger mechanisms: ctrl+p, window.print(), Print using via app menu and via menu bar option).
  • The "print.prefer_system_dialog" preference set to false opens the print preview instead of the system print dialog.
  • The preference can be enforced using a policies.json file successfully
Status: RESOLVED → VERIFIED
Flags: qe-verify+
Blocks: 1769132

Hello! We encountered the following regression for talos on mozilla-beta. Would it be possible for this push to have triggered that regression ?

Flags: needinfo?(jwatt)

None of the commits listed over in that bug could have affected the perf of those tests IMO.

Flags: needinfo?(jwatt)

Mike, I guess I co-opted this bug for the platform side of things. Do you need a separate bug for the policy side of things?

Flags: needinfo?(mozilla)

Mike, I guess I co-opted this bug for the platform side of things. Do you need a separate bug for the policy side of things?

I'll get one opened and done. It's on my list :).

Thanks for doing this!

Flags: needinfo?(mozilla)

I think it would be helpful if tabs.printPreview() could cause Firefox to ignore this preference so an add-on could call up the standard print experience on demand. Otherwise, it's difficult for users of this setting to change print job parameters such as scaling and printing headers/footers.

I filed a new bug for that over here: https://bugzilla.mozilla.org/show_bug.cgi?id=1770862

I opened bug 1770960 for the policy. Thanks for doing this work!

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: