Skip to content

Instantly share code, notes, and snippets.

@ancorgs
Last active September 18, 2018 15:13
Show Gist options
  • Save ancorgs/bf81a230e2a4634df7a05b90a1241116 to your computer and use it in GitHub Desktop.
Save ancorgs/bf81a230e2a4634df7a05b90a1241116 to your computer and use it in GitHub Desktop.
Partitioner: making buttons fit

About this gist

We already had a couple of conversations about how to make the new Partitioner features fit. The result is reflected in this document.

Now we have adapted the RAID section to the interface described there and we would like to fine-tune that prototype because it still looks like the buttons don't fit as well as they should in ncurses 80x24.

How the prototype looks like

As described in the document, now the set of buttons at the bottom of the table adapts dynamically to the selected row. The "Add RAID" button is always there and the rest change to display only options that make sense for RAID devices or for partitions.

Dynamic buttons in the table

Pressing on a RAID takes the user directly to the "Overview" tab. That will be an important change as soon as we apply the same philosophy to the "Hard Disks" section, since users are used to jump to the list of partitions.

New buttons in partitions table

And talking about the list of partitions, the "Expert" menu-button is not longer there. The corresponding options were moved to the "Overview" tab of the RAID/disk. On the other hand, we initally added a "Delete All" button because in the past clicking on "Delete" for a full disk did exactly that (which was something weird and inconsistent, but we guess some users would miss).

It's pretty obvious that we have run out of space for buttons in the list of partitions, which can only become worst with other languages that are less concise than English. As a temporary solution, we omitted the "Delete All" button in the version we submitted to Tumbleweed. Since partitioning RAIDs is a new feature, likely nobody will complain. But we need a better solution for the moment in which we apply the new UI to the "Hard Disks" section.

For comparison, this is how the old/current screen looks like. Also pretty busy, but for some reason LibYUI does a better job at making things fit.

Old buttons in partitions table

So let's discuss what we can do to improve the current prototype. Some solutions can be combined, others don't.

Possible improvements 1: removing the dots

This is the most obvious thing to do. Do we really need to stick to the three dots on every action? In the old/current UI, every single button contains the three dots because it tried to follow the (outdated) YaST style guide.

Note that in the prototype, we are not longer using the dots for the "Delete" and "Delete All" buttons. They display a confirmation pop-up like "This will delete the following devices, are you sure?". But we don't think a confirmation pop-up is enough to deserve the three dots. Other buttons lead to actions with interactive "forms" in which the user has to provide some information (not just confirming). According to the style guide the dots make sense there but...

Can we go one step further and remove the dots in all Partitioner buttons? Right now the dots are literally in all buttons (except "Delete" and "Delete All" in the prototype). Do they still make sense when they are all around?

Possible improvements 2: menu buttons for "Add" and "Delete"

Another possibility for saving space is described the subsection of the original document titled "Posible variant for the selected solution".

Possible improvements 3: menu buttons for everything

If we decide to implement the improvement number 2 (always use menu buttons for "Add" and "Delete") we could extend the idea one or two steps further.

We could group all other actions like "Move", "Resize", "Edit" and so on a third menu-button called "Modify" or simply "Edit".

Moreover, we could even have a fourth "Show" menu-button. As mentioned before, we agreed that selecting a RAID or disk in the table should now take the user to the "Overview" section for that device. That's good and consistent, but some users could complain that jumping directly to the "Partitions" tab (as done historically) is more useful and straightforward. So what about adding also a menu-button allowing to jump directly to any of the tabs of the selected device?

So grouping all the RAID actions in menu-buttons would look like this (the first level are the labels of the menu-buttons when a RAID is selected and the second level are the options inside each menu-button):

  • Show
    • Overview
    • Used Devices
    • Partitions
  • Edit
    • RAID (this used to be called "Edit")
    • Used Devices (this used to be called "Resize")
  • Delete
    • RAID
    • Partitions in RAID
  • Add
    • Partition
    • New RAID

In a similar way, the list of partitions could show the following menu-buttons:

  • Show (could be a plain button, there are no tabs for a partition)
  • Edit
    • Partition
    • Size (this used to be called "Resize")
    • Position (this used to be called "Move")
  • Delete
    • Partition
    • All Partitions
  • Add (could be a plain button)

Possible improvements 4: two lines of buttons

Another option would be to always divide the buttons in two lines. One with the actions strictly affecting only the currently selected device in the table and another one with general actions that affect the whole list, like adding a new entry.

With that, the partitions list would look like this.

Two lines of buttons in partitions table

And the list of RAIDs would look like this.

Two lines of dynamic buttons in the table

In addition, if we remove the dots from all buttons, that would mean quite some space to introduce the additional "Delete Partitions" button without needing a menu-button. Just like this.

Two extended lines of dynamic buttons in the table

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment