Retain column order after hiding a column when showing it again

ck05 4 years ago updated 4 years ago 1

I'd like to suggest that SmartGit retains the position (and also the size) of a column, after it has been hidden, when it is selected again.

E.g. if I hide the 'relative path column' positioned after the name field and then show it again, it is added at the end of the columns. It would be more useful if it would stay where I put it. That way it would be easy to quickly hide columns that are not useful for the current task and are just taking space, and enable them later when they become useful again.


Concerning the implementation: How about that columns that are hidden keep their place (are treated like zero width). Internally, all columns have a position and the user can arrange them once the column is visible.

If I move another column to a position where an invisible column is, it can be arbitrarily (but consistently) placed either behind or before the invisible column.

Let's assume we have a total of 6 columns, and Column3, Column2 and Column6 have just been hidden. Let me show an example of the internal state of the columns:


The user would see this


If the user now drags Column5 between Column1 and Column4, what he expects to see would be


SmartGit would now have the internal ordering in either of the two ways. I think it doesn't matter too much, which one is chosen, as long as it's always handled that way.

Implementation1: moved before hidden columns:


Implementation1: moved after hidden columns:


Let's assume Implementation 1 is chosen, because it is easier. When the user now enables Column3, the internal state would change to


And the user would see


for case 2 the user would see the following after re-enabling Column3:


I think both cases are better and less surprising than the current way it is handled:

The user didn't move Column3, therefore he/she expects it to appear somewhere close to where he has last seen it.

The most important fact should be, that without any moving around, a column re-appears exactly at the position where it has been hidden.

Other programs that make heavy use of columns handle it the same way (I can think of Thunderbird and Outlook for example). In fact, I don't know any example where the column order is not retained (except for SmartGit).

Sorry for the wall of text, but you I find it hard to explain it more concisely, without leaving important detail out.