Page MenuHome GnuPG

Kleopatra: Separate smartcard window with simplified layout
Closed, ResolvedPublic

Description

  • The Smartcard screen should open in a new, non modal window.
  • The layout for different card type are harmonized.
  • The button clutter is removed in favor of popup and context menus.

more details:

  • Slots of an application are arranged as a table, because there are Smartcard applications with several slots.
  • If the slots themself have no information about their capabilities, the gpg default is used.
  • For each slots keygrip the number of matching keygrips is shown, as well as the primary UID of the most recent certificate.
  • A "refresh" button to re-scan for smartcards.
  • The lower left corner of the screen shows a spinner while scanning for smartcards. this changes to the number of found smartcards.
  • Each slot has an popup menu button with possible actions, and an equivalent context menu.
  • The header are shows information from the smartcard, if available for the application type.
  • In the upper right corner is a popup menu button with general actions for the cards application.

Revisions and Commits

rLIBKLEO Libkleo
rKLEOPATRA Kleopatra

Event Timeline

There are a very large number of changes, so older changes are hidden. Show Older Changes

Screenshot of the "placeholder" screen while loading smart cards:

Open:

  • The lower left corner of the screen shows a spinner while scanning for smartcards. this changes to the number of found smartcards.
  • We show the text "Loading smart cards...", but no spinner/progress bar while scanning for cards.
  • We don't show any text when loading is finished.

We could show something like "Connected smart cards: 2", but I'm wondering how useful this information is. The users see how many tabs there are. Moreover, I'm wondering what number we want to show if there are multiple apps on a smart card. If we show the number of tabs (i.e. smart card apps) then the users may be confused if the number is higher than the number of physical cards. If we show the number of physical cards then the number may not match the number of tabs. I think both is potentially confusing. I'd keep it as it is now, i.e. nothing is shown when loading is finished.

  • In the upper right corner is a popup menu button with general actions for the cards application.

I forgot what we discussed. I think we identified two or three groups of general actions.

  1. The "Create OpenPGP Key" button
  2. User actions like "Change PIN", "Unblock Card", ...
  3. Admin actions like "Change Admin PIN", "Set PUK", ...

I think we wanted to keep buttons for the user actions (including 1?) and move the admin actions into a menu button.

First: we should do something about the placeholder text, too. It is a bit misleading ("But it says Netkey cards work, why doesn't mine?"…)

I'm not sure how noticeable the "Loading smart cards..." is but together with the greyed out "Reload" I think it probably will be seen alright.
I'm OK with not showing anything when loading is finished, the result speaks for itself. Is it possible to get an error for one card and the other(s) are shown anyway? In that case a message there like "Card XXX could not be read" or similar would be helpful.

My opinion, I don't remember the discussion in that detail, either:
I'm not against the idea of keeping the most commonly used user action buttons around and only move all the "Admin options" to a menu button. But I'm also OK with all actions in the burger menu (like in the task description), where they are ordered into groups (options for users, option where admin PIN is needed). This probably looks better and all the actions are not used very often, anyway. This includes the "Create OpenPGP Key" action for creating a key on card.

And the "Create OpenPGP Certificate" button should be an option only available for not-OpenPGP cards/apps and be in the burger menu. It will only be used once and otherwise clutter up the space and tempt users to use it…

Furthermore we probably should start to use something else than OpenPGP, now that the new RFC is out. Werner suggested "*PGP".

Suggestion for the "placeholder" screen:
Only show "Please insert a compatible smartcard." And then below: "Known supported smartcards are listed at https://gnupg.com/kb/smartcards.html".

In T7018#190062, @ebo wrote:

Suggestion for the "placeholder" screen:
Only show "Please insert a compatible smartcard." And then below: "Known supported smartcards are listed at https://gnupg.com/kb/smartcards.html".

I like the phrasing of "Please insert a compatible smartcard." And then providing a list of known supported smartcards but I think having the list of known supported cards in the Application and not just on the web is also helpful, even if we just have a handful. The link could then be placed as a: More information... Link. Remember that we also have the option to disable links completely and websites are often times blocked in restricted enviornments.

Since the screen was originally put into place we have gained more experience what common problems are: 1: The wrong reader is selected for GnuPG 2.2 which only supports one reader. 2: The card is locked by the system or a different software. If we could make this dynamic, e.g. only show 1 when there are multiple readers to choose from. and 2. If we know there is a card but there is still an error. (Or is there a distinct error like sharing violation?) that would be best. But otherwise just a static: "Common problems could be:

  • another Application is accessing the card, try to enable the setting: PC/SC shared in the GnuPG System Settings.
  • the wrong reader is selected, please select a different reader.

As I think that will be a common cause where users will end up seeing only the placholder screen if they wanted to check why their smartcards don't work and started Kleopatra to try to analyze this.

In T7018#190030, @ebo wrote:

I'm not sure how noticeable the "Loading smart cards..." is but together with the greyed out "Reload" I think it probably will be seen alright.
I'm OK with not showing anything when loading is finished, the result speaks for itself. Is it possible to get an error for one card and the other(s) are shown anyway? In that case a message there like "Card XXX could not be read" or similar would be helpful.

I would agree with that. If we have any error we should of course try to make as much information about this available because that will likely end up either with support questions. "Like backend reports: XY"

I'm not against the idea of keeping the most commonly used user action buttons around and only move all the "Admin options" to a menu button.

I think the user actions:

  • User actions like "Change PIN", "Unblock Card", ...

Should always be shown. To make it clear that there are actions and that will make it clear that the burger menu has additional actions. The burger menu IMO should then contain the other options:

  • The "Create OpenPGP Key" button
  • Admin actions like "Change Admin PIN", "Set PUK", ...

Since as ebo writes "Create OpenPGP Certificate" (pleace notice the different word, since we are creating a cert for the keys on the card) is a more exotic option it should go into the burger menu, so that there is at least one action there that is not only for Admins.

Furthermore we probably should start to use something else than OpenPGP, now that the new RFC is out. Werner suggested "*PGP".

Let us not discuss this here, and if we discuss this and want to change the word do this globally and not "start to use it". I would say that is out of scope.

This is way too much text, people. And changing the placeholder widget wasn't part of the original description. Please create a new ticket for this.

As in Alex's mock-up I'm using a button in the upper right with a text label. (I chose "Card Actions" as button label because many users probably don't know the technical detail that a smart card can have different applications.)

I don't think that putting some actions behind a button in the upper right and some common actions below the certificate list is good UX. Moreover, I doubt the notion of "commonly used user actions". I haven't changed the PIN of my smart cards in ages and I never had to unblock my cards so from my experience none of those actions is common. I would rather show "Unblock Card" in a prominent location if we detect that the card is blocked (PIN counter is 0) similar to how "Set NKS PIN" is shown if a NetKey card still has the NullPIN. (But this latter idea is material for another day/ticket.)

My proposal is to put all card actions behind the Card Actions button. And then, as follow-up figure out situations when the user likely needs a certain action and then offer this action in a nice message widget similar to the "Set Owner Trust" button we show in the Certify window if the user selected a certification certificate without ultimate trust. Examples for such situations are the already mentioned "card is blocked" situation and the "user inserted a factory-fresh card" situation (in which case we'd offer the "Create Key/Keys/Certificate" action). "Simple by default, powerful when needed" (KDE).

NetKey card widget with Card Actions button (because pictures say more than words)

I like it. BTW, even the unblocking should not be easy to access because users will anyway enter the wrong PUK and then the card is bricked (ready for a factory reset).

I went for the placeholder text because you asked what should be shown on error. And I would rather not follow your suggestion and show an empty widget but keep the placeholder text then.

Regarding the actions. As I understood it the ux for this was "commonality ", Users would go to the Smartcard widget because they are used to that from other software or so I understood the request.
In that case they will expect the actions they are used to, which we then called "commonly used user actions"... regardless of how common these actions are they are more intended to give the User a known surrounding in that the user will find the actions she expects?

That entering the PUK wrong after entering the PIN wrong bricks the card is intended I guess :) Still we have to allow users to enter the PUK somehow and I think if this should be offered then it should be offered here and be immediately visible. Since if the reason for this widget is commonality then that one is especially. "Ah so when I entered the PIN wrong three times this is where I enter the PUK" Since many users might never start Kleopatra for fun, but one of their colleagues might have looked at the smartcard view before and can tell them where the button to unblock the smartcard can be found. Or they are starting Kleopatra for the first time because someone in Support tells them where the button to unblock the PUK can be found. Smae thing goes for changeing their PIN then they would search for this in this view or if support tells them to change their PIN.

But yes! Offering the actions when the user needs them is also good, even better could be that if we detect a blocked PIN to go the smartcard view and highlight the unblock PIN button and explain that they need a PUK for that and if they enter the PUK wrong for the number of tries allowed, that then their card is bricked.

As for the proposal to put the common actions into distinct buttons and the more actions into a burger button, of course they would have to be grouped together and not in the top right and bottom left. But I am also fine with all actions hidden but I do think with above reasoning that having the "common tasks" visible is a bit better.

ikloecker changed the task status from Open to Testing.Aug 26 2024, 4:29 PM

I consider this done. I suggest to open follow-up tickets for further changes.

  • Slots of an application are arranged as a table, because there are Smartcard applications with several slots.

Done.

  • If the slots themself have no information about their capabilities, the gpg default is used.

Done.

  • For each slots keygrip the number of matching keygrips is shown, as well as the primary UID of the most recent certificate.

Not done. Instead multiple rows are shown if there are multiple certificates for a card key. (see T7018#188874)

  • A "refresh" button to re-scan for smartcards.

Done.

  • The lower left corner of the screen shows a spinner while scanning for smartcards. this changes to the number of found smartcards.

The status bar only shows a text (without spinner) while the smartcards are read.

  • Each slot has an popup menu button with possible actions, and an equivalent context menu.

Done.

  • The header are shows information from the smartcard, if available for the application type.

Done.

  • In the upper right corner is a popup menu button with general actions for the cards application.

Done.

Everything has been backported for VSD 3.3

ebo moved this task from Restricted Project Column to Restricted Project Column on the Restricted Project board.Oct 1 2024, 3:55 PM
ebo moved this task from Restricted Project Column to Restricted Project Column on the Restricted Project board.

I agree, this is done, follow up Tasks will get new tickets