As I have a few hours of downtime on the train, I'm working on one of my favourite KiCad features again: the pin table.

This silently appeared in the last KiCad release -- when you have a schematic component open in the editor, there is a new icon, currently on the right of the toolbar, that brings up a table of all pins.

Currently, I have the pin number, name and type in the table (as well as the coordinates on the grid, but that's probably not that useful).

For the release, this table is read-only, but can at least be useful for proofreading: left mouse click on a column header sorts (as would be expected), and right mouse click on a column header creates a grouping (i.e. all pins that have the same value in this column are collapsed into a single row).

The latter is entirely unintuitive, but I have no idea how to show the user that this option exists at all.

The good old DirectoryOpus on Amiga had a convention that buttons that had right-click functionality had an earmark to indicate that a "backside" exists, but that is a fairly obscure UI pattern, and would be hard to reproduce across all platforms.

I could make the right click drop down a menu instead of immediately selecting this column for grouping -- at least this way it would be explained what is happening, but advanced users may get annoyed at the extra step.

I could add a status bar with a hint, but that will always cost me screen space, and this only papers over the issue.

I could add a menu with sorting/grouping options, which would allow novice and intermediate users to find the function, but that still does not hint at the shortcut, and the functions to set the sorting would have to be disabled on Linux because wxGTK cannot set the sort column from a program.

For editing, another problem turns up in the collapsed rows: what should editing do when we are basically editing multiple pins at once. The most useful mapping would be:

  • Editing the pin numbers adds and removes pins. The column is displayed and interpreted as a comma-separated list of pins, so going to edit mode and adding ",5" at the end is an obvious way to quickly create a pin with the number 5.
  • Editing the pin name would ask for confirmation if not all the pins had the same name before, and then set the same name for all.
  • Editing the pin type would do the same -- set the same type for all, possibly after confirmation.

However, I'd like to later on introduce multiple-function pins, which would add multiple (partially) exclusive pin names per pin number, which would change the semantics:

  • As before, editing the pin number adds and removes pins.
  • Editing the pin name adds and removes functions
  • Having commas in both the pin name and pin number is legal if e.g. we've collapsed on pin type (so all the outputs are in one line), but editing either of them now will create a broken state.

At the moment, I'm mostly inclined to have separate modes for "grouped by pin number" and "grouped by pin name" -- these modes could be switched by the current grouping column, but that is neither intuitive, nor does it provide a full solution (because grouping by pin type is also supported).

Time to look at the use cases:

  • I want to quickly enter pins from tables. There are two major cases here:
    1. I have pins with the same function, e.g. Vcc or GND. I'd like to enter these as "1,5,17GNDp".
    2. I have pins with multiple configurations. I'd like to enter these via "3IO3,DIFFIO4+,CONF_DONEb,b,o".
  • When I'm done entering data, I want a quick overview whether the data entered is complete.
  • For existing components, I want to quickly check and correct data.

At 32C3, I've implemented a quick completeness check, consisting of a summary line that collapses the pin number column into a comma-separated list of ranges (where a range is defined as consecutive numbers in the last group of digits).

I wonder if there is a group of developers with an UI focus who are happy about solving problems like these...