In the last sprint a few weeks ago the topic of how to display the name and username of publishers and other accounts came up again. Right now we have a few different ways to do that, and we’d like to standardize on something that is reasonable and consistent across the several frontends.
Then, as a coincidence we’ve also landed a change just recently that went out in 2.31, modifying how usernames are presented in the terminal. The change looked simple and obviously correct, yet it wasn’t because of a historical detail in the API. So we’ll need to revert that in 2.31.1, while we discuss the right way we want that done.
So here is a proposal: we need to display the username almost always, whether in the terminal, on the web, or in a GUI, because that’s the unique aspect that in fact identifies the account. Then, when we do have more space, we should consistently present the name next to the username in a format we agree to. For the latter, I suggest the format Display Name (username).
There’s one case where we don’t need to present the display name and the username next to each other, though, and that’s when one matches the other exactly, or the display name is merely a casing change on the username. In other words, instead of Blender (blender), we present simply Blender.
- When space is tight (e.g. snap find), we display: blender
- When there is space (e.g. snap info, web), we display: Blender Foundation (blender)
- When there is space but username and display name match: Blender instead of Blender (blender)
As for snapd, note the following version differences:
- 2.30 and earlier would display option 1 only
- 2.31 displays simply Blender Foundation, which is a mistake
- 2.31.1 will display option 1 again
- 2.XX will eventually use 1, 2, and 3, depending on correct context