vermamohit13 / GSOC_2022_Summary

0 stars 0 forks source link

Needs final design for GUI tool #1

Open vermamohit13 opened 1 year ago

vermamohit13 commented 1 year ago

GUI for Printer Application

Modern printers usually are driverless IPP printers, and those get discovered and set up fully automatically with CUPS, no Printer Application is required for them, so it is easy for users to get up and running with them.

Printers which do not do driverless IPP are either legacy printers, the many older printers which got developed before driverless IPP printing existed, and specialty printers. These need Printer Applications. As there will be several different Printer Applications and each one supporting another set of printers it is not trivial for the user to discover available non-IPP-driverless printers and find out which is the Printer Application to use and whether it is already installed.

So we need some guide for the user. The idea is a GUI tool which lists available, non-IPP-driverless printers, local (USB) and network devices. If the user selects one of them, all installed Printer Applications which support this printer are shown, and for each a button to open the Printer Application's web interface and also a quick auto-add-this-printer button. In addition to the list of suitable Printer Applications there should also be a button which does a fuzzy search for the printer make and model on the Snap Store/the OpenPrinting web site to find Printer Applications which are not installed on the local system. There is already a concept to implement an appropriate search index on OpenPrinting which will be used by this GUI.

In order to get this GUI implemented the organization had created a new request on the GNOME Settings Gitlab Page. (https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/1878)

After a series of discussion about the new method for the discovery of printer devices, @vermamohit13 initiated the discussion on the design for the GUI.He wrote - “I also want to discuss the new design of the GUI for the Printer Applications. I have thought that in the new-printer-dialog when the user clicks on a discovered device which is in need of an Application, the new GUI should popup and the already installed & supported printer application should be visible ( similar to the printers listing in the new printer dialog ). Each listed printer application should have a button to open the Printer Application's web interface and also a quick auto-add-this-printer button.The new GUI will also have a button for fuzzy search for the printer make and model on the Snap Store/the OpenPrinting web site to find Printer Applications which are not installed on the local system.”

To this Marek responded - “I would prefer to have the UI as simple as possible as it is now. So it would mean that user opens the new printer dialog, selects a printer he wants to enable, pushes the button and then it will be automatically decided whether an already installed Printer Application will be used or a new one is needed. If the user wants to change it, he/she can do it via printer details dialog as it is now with PPDs. Regarding the installing of the Printer Application. This has to be done via gnome-software's DBus API which is able to install packages from the usual places (Snap, RPM repos, ...). The search for the needed Printer Application is the part which needs some thinking yet. For Fedora I would prefer to have it done as it was for RPMs before which means that each RPM containing Printer Application lists all supported make-and-models in its Provides section (e.g. "postscriptdriver(brother;mfc-8840d;)"). @zdohnal, would it be possible? Of course we need to have this agreed with designers. @jimmac what do you think?”

After this response from @jimmac hadn’t come till now. So, I and Till decided to make a temporary GUI which will have all the functionalities that are needed in the GUI. The Glade design of the temporary UI is shown below -

GUI

The functionality required for the mentioned button -

Search - This button will query Openprinting Web Server ( see https://openprinting.github.io/OpenPrinting-News-November-2021/#printer-querying-on-the-openprinting-web-server ) via a cul_easy API call provided by libcurl about the selected printer. This query will return the list of supported Printer Application along with the internal driver name of the Printer Application for the printer, a human-readable description (the one which you also see in the web interface of the Printer Application), and the device ID as it is registered for this printer in the Printer Application. This is already implemented and is working well in the temporary UI (see https://drive.google.com/file/d/1eSJinN_NxyimeTPr_ZQDc0omeI-0lZwH/view?usp=sharing) . It will also have a Recommended tag along with the name of the most appropriate Printer Application.

Web Interface Button - It is supposed to open the web interface of the Printer Application for the selected Printer after it is installed. As per Marek , this button should be in the Printer Details Dialog. This button will work similar to the link to Address : ‘localhost’ in the Printer Details Dialog.

Install - This button will become sensitive when a supported Printer Application (which is not Installed otherwise it should be insensitive) is selected in the window where supported Printer Application is displayed. This button will allow the user for an automatic Installation of the Printer Application locally.

Auto-Add - This button is supposed to add a printer to the selected Printer Application. I have to write a callback for this button but I need some clarity. To add a printer either we make an IPP request to the Printer Application for which we need it's port or the path of the binary of Printer App. Both of these are there in cups-pk-helper. This problem still needs to be solved from cups-pk-helper.

Screenshot of the GUI tool that I have created - image

Here (https://drive.google.com/file/d/1eSJinN_NxyimeTPr_ZQDc0omeI-0lZwH/view) is a small screencast of the working of the window. (Note - Here the button of Auto-add and Web Interface is not working in the demonstration because these methods are needed to be implemented in cups-pk-helper with appropriate discussion with Marek Kasik. I and @tillkamppeter will be having a short Meet with Marek to address this issue.)

tillkamppeter commented 1 year ago

@elioqoshi @kenvandine @seb128 This is the write-up for the design requirements of the changes related to the New Architecture of printing in GNOME Control Center. We can discuss it here.

tillkamppeter commented 1 year ago

@vermamohit13 could you please add screenshots and screencasts of the actual G-C-C with your changes applied? For the typical workflows of adding a non-driverless printer.

vermamohit13 commented 1 year ago

I have added the screenshot and screencast.

tillkamppeter commented 1 year ago

@tim-hm, here we will have our common discussion platform for Canonical and upstream/community participants of the project ...

tillkamppeter commented 1 year ago

@tim-hm @elioqoshi please subscribe to notifications of this issue by the button on the right, so we can easily discuss here. Thanks.

vermamohit13 commented 1 year ago

Hi @tillkamppeter, here is the diagram link of new G-C-C workflow you requested (https://drive.google.com/file/d/1hPpdW0icnZIE1nJhw6jRFj9YfmsO70pB/view?usp=sharing) here is the diagram link for Printer Application Dialog (https://drive.google.com/file/d/1wg1xxPqM2C2K0H__MTAvzRiWDj8fIJgo/view?usp=sharing)

tillkamppeter commented 1 year ago

Thanks for the links, @vermamohit13 , GitHub has messed up the links in your message, but I was able to recover them:

tillkamppeter commented 1 year ago

@vermamohit13 , some remarks to your drawings:

Main view

  1. If a new driverless IPP device appears, its entry in the main view DOES NOT appear due to an automatic setup by CUPS as you write in your drawing. It appears because the printer gets discovered via DNS-SD. Even if you use CUPS APIs in your implementation of the main view, the library functions of CUPS do nothing else then picking up the DNS-SD records of these printers. So better write "Discovery via DNS-SD/Avahi" instead of "Automatic setup via CUPS".
  2. Your first chart shows the workflow how a new printer entry in the main view appears. It does not show how the entries are distinguished (IPP print destination, Lead entry for IPP print destinations (Printer Application, MF device, IPP print destination with manual CUPS queue), Manual CUPS queue (with classic driver). The 2 function menu/button group types: "Web inteface" for IPP print destinations and lead entries, "Set options", ..., "Remove queue" for manual CUPS queue.
  3. It does not express that we plan to organize entrires in visible groups, with a lead entry and the included Print destinations indented after the lead entry. This is not yet nicely visible in the actual software, it could be sketched with the "Table" function of the drawing program.

Add printer

  1. You show only the part to handle Printer Applications. When clicking on "Add Printer" in the main view you should first receive a window showing the lsit of discovered printers. from here you must be somehow able to access BOTH classic drivers AND Printer Applications. As normal users do not know the difference there must be a way to fully automatically set up and this with Printer Applications preferred.
  2. In your workflow example for the Printer Applications, the PostScript and HPLIP Printer Applications are already installed, the HPLIP one more desirable for the discovered printer (and both support it). Click on "Search" shows 5 Printer Applications available in the package repo (for example Snap Store, you would see all these 5 if you have some PostScript+PCL HP laser printer as the discovered printer). Now you mark the 2 already installed Printer Applications with green arrows, considering the HPLIP one "available" and the PostScript one "not available".That is wrong, both HPLIP and PostScript Printer Applications are available, as they are installed on your system. You should marg the Gutenprint Printer Application in the upper list with a grean rectangle and draw from there a green arraow to the line marked "Printer App not available" and then mark in the lowermost screenshot the Gutenprint Printer Application and the "Install" butten with green rectangles, not the PostScript Printer Application.
  3. Design suggestion: Have the buttons "Search" and "Install" at the right of the upper list and "Auto-add" and "Web Interface" at the right of the lower list.
tillkamppeter commented 1 year ago

@vermamohit13 has updated the drawings following my previous message now.

elioqoshi commented 1 year ago

@vermamohit13 Thanks for the diagrams. I have a hard time understanding the flows however. Do you have a screen recording of the interactions I could review as well?

tillkamppeter commented 1 year ago

Screencasts from @vermamohit13:

elioqoshi commented 1 year ago

@tillkamppeter Thanks, that is helpful already. will get back with some feedback today

elioqoshi commented 1 year ago

@tillkamppeter @vermamohit13 What is the state of the list of installed applications? Why is this not in the implementation yet? I am confused by the meaning of the diagram and don't understand it yet.

image
tillkamppeter commented 1 year ago

@vermamohit13 could you re-add the "Add Printer" part with the "printer Appplications" part to your G-C-C repo? It is no problem if it is not fully functional, for example still missing the part to determone the process which provides a discovered service. This way @elioqoshi and everyone else could try it out, at list the UI.

tillkamppeter commented 1 year ago

@elioqoshi the window which you are showing works as follows:

tillkamppeter commented 1 year ago

Some improvement suggestions:

vermamohit13 commented 1 year ago

@tillkamppeter @elioqoshi Here is the "Add Printer" with "Printer Application" Dialog. Note that in this version, selecting any entry in the "Add Printer" Window will pop up "Printer Application" Dialog. Clicking on search will return the list of supported Printer Applications for device-id = "MFG:HP;MDL:LaserJet%204050".

tillkamppeter commented 1 year ago

Thank you very much, @vermamohit13, could you put this into a separate branch, as this one renders a part of the Printers module non-functional and if someone installs that, or I would update the PPA to that, they end up not being able to set up their non-driverless printer. I will put this into the PPA under a separate name then.

vermamohit13 commented 1 year ago

@tillkamppeter This is already in different branch "cupsdev-UI-present". Earlier, we were working on "cupsdev-main" branch.

elioqoshi commented 1 year ago

@elioqoshi the window which you are showing works as follows:

Sorry but I don't understand this. The UI is not important here. I need to understand the user flow better. Can you walk me through that please?

I am not understanding the underlying UX of what you are trying to achieve this UI, so need a bit more support explaining in a very detailed way what your hope is for this UI to achieve.

tillkamppeter commented 1 year ago

@elioqoshi The "Printers" module, the printer setup tool in the G-C-C has two parts:

Main View

After starting gnome-control-center and choosing "Printers" in the left column, the main area in the right shows the main view of the "Printers" module.

It shows one entry for each available print destination (printer, fax, ... where one can send a print job to) with properties, like name, location, toner levels, out-of-paper, ... and each of these entries has a button which opens a pop-up menu with functions to configure this print destination.

There are two types of print destinations:

1. Classic CUPS queues: These are configured in the local CUPS environment, and G-C-C provides a UI to configure them, like setting option defaults, properties like description, location info, ..., and also removing the print queue. Therefore clicking on the "Configure" button of such a print destination gives a menu with all operations of configuring the loacl print queue. On the currently released G-C-C all print destinations listed are of this type.

2. IPP print services: If there is a an IPP (Internet Printing Protocol) service advertising itself via DNS-SD in the local network, typically network printers, but also shared CUPS queues on other machines, and Printer Applications (software emulations of network printers), CUPS automatically considers them as an available print destination, without need of a locally configured print queue. Therefore we want G-C-C also list these destinations. As there is no local CUPS queue which one could configure, it does not make sense to add a menu of configuration actions to such an entry. But, by the IPP standard, IPP print services all have a web administration interface, accessible with a web browser, to configure the service itself, on the server. This is the only way the user can configure such a service. Therefore for such a print destination entry in the main view of the "Printers" module we let the "Configure" button only allow to fire up the service's web admin interface in a browser, and not offer any actions like "Set option defaults" or "Remove queue". This type of print destination is not yet available in released G-C-C.

Most modern printers are driverless IPP printers and this already for several years. therefore they appear as IPP services as described under (2), without need of creating a local CUPS queue for them.

Older printers (or specialty printers, like many label printers) have to get set up the classic way. A local CUPS queue with a printer driver has to get created or a Printer Application (software emulation of IPP printer) which controls the printer has to get installed. For this the user has to click the "Add Printer" button at the top of the main view.

Additional UI feature: A single Printer Application and also a multi-function device can have more than one print destinations (like print and fax), so in such cases the destinations should be grouped together and a head entry for the Printer Application or multi-function printer added.

Add Printer

Clicking the "Add Printer" button in the main view opens the "Add Printer" dialog. It lists all auto-discovered printers (USB, network, ...) as before. Clicking a printer should automatically set it up, if possible find a locally installed Printer Application for it and if so, auto-add the printer to the Printer Application (create a queue for it inside the Printer Application), so that the Printer Application emulates an IPP printer (which will show up in the main view). Only if no Printer Application is available, the automatic setup tries to resort to search for a locally installed classic driver, and tries to setup a classic local CUPS queue (which will also appear in the main view). Failing also with this, UI for manual setup should open.

elioqoshi commented 1 year ago

Thanks @tillkamppeter

I am not sure I understood the context fully in terms of usability and information architecture, but I did an attempt on how I envision this:

image

I annotated the changes in the design, let me know if I missed any details. I think the actions should be better split into a logical mental model however, so this would be the first step towards that

elioqoshi commented 1 year ago

Another more complete proposal after some back and forth with @tillkamppeter. Annotated in the designs for better context. Splitting the selections into radio buttons make this work more as a wizard and is a flow users are more used to (and more native to OS UX patterns).

image

Alternatively, you can also comment via Figma: https://www.figma.com/file/A69jSJYLlqEinmdn6LHvna/Printing-Settings-Dialogue?type=design&node-id=939%3A919&t=gre0iTMKjUdTCtxi-1

elioqoshi commented 1 year ago

Here is also a clickable prototype to have a better feel for it: https://www.figma.com/proto/A69jSJYLlqEinmdn6LHvna/Printing-Settings-Dialogue?page-id=939%3A1460&type=design&node-id=939-1490&viewport=-423%2C207%2C0.42&scaling=min-zoom&starting-point-node-id=939%3A1490

tillkamppeter commented 1 year ago

@elioqoshi thank you very much for your UI proposal. Looks very nice. Only for the explaining text of the selection for the classic driver better say

Set up the printer with a classic CUPS driver

Do not say "manufacturer's driver interface" as many classic drivers are not from the manufacturer and also in the future manufacturers could start to supply Printer Applications instead of classic drivers.

elioqoshi commented 1 year ago

@tillkamppeter got it. Updated it on Figma!

tillkamppeter commented 1 year ago

@vermamohit13 could you integrate this new dialog as follows:

In the window which pops up when clicking "Add Printer" in the main view, have the list of discovered printers and 2 buttons, one for auto-setup (this is the default, also triggered by pressing Enter or by double-clicking an entry in the list) and one for manual setup. The latter immediately opens the Printer Applications/drivers dialog which @elioqoshi has suggested, listing the Printer Application which the selected printer supports. The former tries to set up the printer automatically, first finding a suitable, already installed Printer Application and if found one, doing an auto-addition of the printer in this Printer Application. On failure try to set up with a classic driver and when still failing open @elioqoshi's dialog.

tillkamppeter commented 1 year ago

@tillkamppeter got it. Updated it on Figma!

Thank you very much @elioqoshi !