0

Retain column order after hiding a column when showing it again

ck05 7 years ago updated 7 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.

+1


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:

Column1(visible)|Column2(hidden)|Column3(hidden)|Column4(visible)|Column5(visible)|Column6(hidden)

The user would see this

Column1|Column4|Column5


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

Column1|Column5|Column4

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:

Column1(visible)|Column5(visible)|Column2(hidden)|Column3(hidden)|Column4(visible)|Column6(hidden)|

Implementation1: moved after hidden columns:

Column1(visible)|Column2(hidden)|Column3(hidden)|Column5(visible)|Column4(visible)|Column6(hidden)|


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

Column1(visible)|Column5(visible)|Column2(hidden)|Column3(visible)|Column4(visible)|Column6(hidden)|

And the user would see

Column1|Column5|Column3|Column4|


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

Column1|Column3|Column5|Column4|


I think both cases are better and less surprising than the current way it is handled:
Column1|Column5|Column4|Column3|


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.