Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Web Interface: No feedback why printer does not get added #86

Closed
tillkamppeter opened this issue Nov 23, 2020 · 12 comments
Closed

Web Interface: No feedback why printer does not get added #86

tillkamppeter opened this issue Nov 23, 2020 · 12 comments
Assignees
Labels
bug Something isn't working priority-medium
Milestone

Comments

@tillkamppeter
Copy link
Contributor

Describe the bug
On the "Add Printer" page the user selects a discovered printer and a driver for it. Then the driver callback (in the PostScript Printer Application this is ps_callback() is called to initialize the driver (populate driver_data) for this printer.

In some cases (for the PostScript Printer Application selecting "Automatic Selection" for the model and the printer not supporting PostScript) the driver callback fails and returns false. Assuming nothing is broken with the Printer Application this should happen when the discovered printer selected is not supported by this Printer Application.

The web interface in such a case resets the user input (queue name, device, and driver selection) in the web form and shows the web form again, without any message what was wrong. This is not a very user-friendly behavior.

To Reproduce
Start the PostScript Printer Application. Under the discovered printers choose one which does not support PostScript and as driver choose "Automatic Selection". Submit the form. Instead of any message telling that the printer is not supported the form will show again, empty, with a delay due to the fact that the printer discovery in the network gets repeated.

Expected behavior
When submitting the form with the unsupported printer, the form should immediately re-appear with the user's input conserved (so that he can easily correct, like choosing another discovered printer) and at the top an error message, telling that the printer is not supported.

michaelrsweet added a commit that referenced this issue Nov 23, 2020
…eady

exists (Issue #86)

Make sure all of the form controls retain their prior values (except printer
name when it already exists...)

Increase the size of the device_uri string buffer to hold device ID values
(Issue #73)
@michaelrsweet
Copy link
Owner

[master cc4c979] Add a status message for when we can't add the printer because it already exists (Issue #86)

@michaelrsweet michaelrsweet self-assigned this Nov 23, 2020
@michaelrsweet michaelrsweet added bug Something isn't working priority-medium labels Nov 23, 2020
@michaelrsweet michaelrsweet added this to the v1.0 milestone Nov 23, 2020
@tillkamppeter
Copy link
Contributor Author

Thanks, for the case of entering a duplicate queue name this is OK, but for me the message that the queue name is duplicate also appears when the driver callback exited with "false" (printer not supported by driver). In this case an appropriate status message should appear and also the queue name should stay in the input field.

In addition, on a failure to add the new print queue and therefore re-display of the "Add Printer" page the discovery should not get repeated but the discovered printer list from the previous dispaly of the page being used, to avoid the delay.

@michaelrsweet
Copy link
Owner

@tillkamppeter WRT the delay, this is a simple POST form and not a web service with a JavaScript front-end. The device re-discovery delay cannot be avoided.

I will see what I can do to propagate the printer creation error (also useful for the IPP interface).

@michaelrsweet michaelrsweet reopened this Nov 23, 2020
michaelrsweet added a commit that referenced this issue Nov 23, 2020
- Have papplPrinterCreate set errno on failure, document that it can fail.
- Have the web interface convert errno codes to human-readable error messages.
- Have the IPP interface convert errno codes to human-readable error messages.
michaelrsweet added a commit that referenced this issue Nov 23, 2020
…rror to

client-error-attributes-or-values-not-supported (Issue #86)
@michaelrsweet
Copy link
Owner

[master 0ded5dc] Provide more information about printer creation failures (Issue #86)
[master 6ea9357] Include unsupported attributes on Create-Printer errors, map driver error to client-error-attributes-or-values-not-supported (Issue #86)

@michaelrsweet
Copy link
Owner

@tillkamppeter Let me know if there is anything else I need to address for this issue.

@tillkamppeter
Copy link
Contributor Author

Much better now, but another little UX improvement:

Please do not remove the offending input when re-displaying the "printing Defaults" page, most probably it is an "off by one", for example you have "My Great Printer 1" and want to create "My Great Printer 2" but mis-type the number in the end. Would be nice if you only need to edit the number instead of typing "My Great Printer" again.
Also for the driver selection, if you have chosen the wrong of the ~4000 entries, the right being the one before or after the one you have accidentally chose, it is much easier having the list on the wrong entry and you only need to correct one up or down instead of weeding through the list again. And you get remembered what was the wrong one so that you choose another now and not accidentally the wrong one again (user falls into infinite loop)..

@michaelrsweet
Copy link
Owner

@tillkamppeter Fair enough:

[master 41eaf36] Don't clear selection/entry on error (Issue #86)

@tillkamppeter
Copy link
Contributor Author

Another point: Do not let the error messages fade out (on all pages), if the user does not read quck enough, especially turns away from the screen when the re-display takes some time due to the re-discovery.

@michaelrsweet
Copy link
Owner

@tillkamppeter I still want to fade the errors a little (so that you know it isn't a new error), but I can change the transition so that they are still visible.

@tillkamppeter
Copy link
Contributor Author

OK, let us go this way.

@michaelrsweet
Copy link
Owner

[master acdfbb7] Change the banner animation to go from the colored background to gray - that way the errors are still visible but you know they aren't new (Issue #86)

michaelrsweet added a commit that referenced this issue Nov 23, 2020
… - that

way the errors are still visible but you know they aren't new (Issue #86)
@tillkamppeter
Copy link
Contributor Author

Works great now, thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working priority-medium
Projects
None yet
Development

No branches or pull requests

2 participants