Print Preview should handle no printers case gracefully. |
||||
Issue descriptionCurrently Print Preview spins forever if no printers are found and the PDF printer is disabled (e.g. in a kiosk app). Print Preview should detect that no printers are available and the PDF printer does not exist and handle this gracefully somehow.
,
Nov 15
See attached screenshot for proposed solution, following the suggestion in comment 1 to allow a preview but not print, and to indicate to the user that there are no print destinations using an existing "no destinations found" string. +namratakannan@ - WDYT? Any suggestions for the icon/string/etc? This case should be pretty rare but it would be nice to handle it better than we do currently (i.e. print preview spinning/loading forever).
,
Nov 15
Does this happen on load of print preview? Can the user still select destination by clicking "Change"? If not, maybe we only show the "No destinations found" string and don't offer the ability to change?
,
Nov 15
Yes, this happens on load - Print Preview runs through a sequence of defaults/fallback printers at startup, but sometimes there just are no printers at all, if PDF printing is disabled. In the build that I generated the screenshot with, the user can click "Change", which opens the destinations dialog, and the dialog also shows no printers found to select from. We can certainly disable the "Change" button for this case. Was not sure if it would be good for users to be able to click the button and see that there are no printers in the dialog. If you think the string in the main panel is adequate to indicate the issue, disabling "Change" SGTM.
,
Nov 15
Updated screenshot attached.
,
Nov 15
Just realized you may have meant to hide the Change button, instead of disabling it. See attached screenshot for that option. The downside to this is the elements below the button shift on load, because the button is visible but disabled at first while we are still trying to load printers and then disappears when the "No destinations found" loads in. Which do you think is preferable?
,
Nov 16
Lets's keep it disabled then (avoiding moving things around). However, I notice there is no way for them to switch to system dialog? Why is that?
,
Nov 16
Screenshots are from Chrome OS (VM), so no system dialog available.
,
Nov 21
namratakannan@ - One additional option. In this case we do not show the preview or allow the user to change the controls, but instead just display the error message (LMK if you think the error messages in the destination settings and preview area should be different). Note that this screenshot is on Linux, so "Print with system dialog" is available.
,
Nov 21
Ah got it..I think its ok to show the preview, if we are disabling the remaining controls that are not applicable (as in the example above). This indicates that while the preview works, the user can't print cause no destinations are available (vs we are unable to generate a preview)
,
Nov 21
It is a bit easier to implement this (and disable the extra controls) if we treat it as an error case similar to what would happen if we have issues communicating with the printer driver for the user's selected printer. This is the approach in comment 9's screenshot. We can also generate a fake printer in JS, which is what we have to do to get the preview to work (like in comment 5), but this doesn't disable the controls because the Print Preview thinks it has a valid printer. We would need to add extra logic to get it to look mostly like an error state while having the preview displayed. We can do that if you strongly prefer that approach, but I think it would be preferable not to add too much additional logic for what should be a pretty unusual edge case - this should only happen for kiosk users where the device owner/administrator hasn't configured any printers.
,
Nov 21
Makes sense. Then lets go ahead with the approach in comment 9.
,
Nov 28
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/ae42d1168e763a3a302b2bb395d5c3da7b4c13c1 commit ae42d1168e763a3a302b2bb395d5c3da7b4c13c1 Author: rbpotter <rbpotter@chromium.org> Date: Wed Nov 28 02:40:52 2018 Print Preview: Show an error when there are no printers In kiosk app mode with no printers configured the preview spins forever because in kiosk mode we cannot fall back to Save as PDF. This currently only occurs on Chrome OS, as other platforms do not have app kiosk mode. Handle this case gracefully by notifying the user that there are no printers available. Also update the change button to the old behavior of disabled during load, since there should now be no case where the preview and destinations settings show spinners indefinitely. See the linked bug comment 9 for screenshot. Bug: 903680 Change-Id: I2c3e9a5b41520176cd8fe170886d97e317df05d3 Reviewed-on: https://chromium-review.googlesource.com/c/1344836 Commit-Queue: Rebekah Potter <rbpotter@chromium.org> Reviewed-by: Demetrios Papadopoulos <dpapad@chromium.org> Cr-Commit-Position: refs/heads/master@{#611528} [modify] https://crrev.com/ae42d1168e763a3a302b2bb395d5c3da7b4c13c1/chrome/browser/resources/print_preview/data/destination_store.js [modify] https://crrev.com/ae42d1168e763a3a302b2bb395d5c3da7b4c13c1/chrome/browser/resources/print_preview/new/app.js [modify] https://crrev.com/ae42d1168e763a3a302b2bb395d5c3da7b4c13c1/chrome/browser/resources/print_preview/new/destination_settings.html [modify] https://crrev.com/ae42d1168e763a3a302b2bb395d5c3da7b4c13c1/chrome/browser/resources/print_preview/new/destination_settings.js [modify] https://crrev.com/ae42d1168e763a3a302b2bb395d5c3da7b4c13c1/chrome/browser/resources/print_preview/new/preview_area.js [modify] https://crrev.com/ae42d1168e763a3a302b2bb395d5c3da7b4c13c1/chrome/test/data/webui/print_preview/destination_select_test.js [modify] https://crrev.com/ae42d1168e763a3a302b2bb395d5c3da7b4c13c1/chrome/test/data/webui/print_preview/destination_settings_test.js [modify] https://crrev.com/ae42d1168e763a3a302b2bb395d5c3da7b4c13c1/chrome/test/data/webui/print_preview/native_layer_stub.js [modify] https://crrev.com/ae42d1168e763a3a302b2bb395d5c3da7b4c13c1/chrome/test/data/webui/print_preview/new_print_preview_ui_browsertest.js
,
Dec 7
|
||||
►
Sign in to add a comment |
||||
Comment 1 by thestig@chromium.org
, Nov 9