View->Show/Hide Trees option/behavior unexpected after manual show/hide

Issue #152 closed
Robert Leach created an issue

I noted that if you manually show/hide a tree or both trees, the option in the view menu doesn't seem to keep up, nor does the operation do what you would expect if it was displaying correctly. If both trees have been manually shown, the View menu option still says "Show Trees". Or if they're been manually hidden, the view menu still says "Hide Trees". Additionally, if you have the left tree hidden & the top one shown, the menu option works on just the top tree.

I think that if one tree is shown and the other hidden, what the menu option is doesn't matter so much, just as long as it operates on the tree whose visibility is the opposite of what the menu option says.

I had a screen shot, but my connection to work has become to unstable to be usable.

Comments (10)

  1. Robert Leach reporter
    • changed status to open

    Chris & I cleared up the intended behavior:

    Case 1:

    1. Select "View->Show Trees" when both trees are hidden

    2. Both trees are shown & menu option toggles to hide

    Case 2:

    1. Select "View->Show Trees" when left tree is hidden & top tree is visible

    2. Left tree is shown (& top tree remains visible) & menu option toggles to hide

    Case 3:

    1. Select "View->Show Trees" when left tree is visible & top tree is hidden

    2. Top tree is shown (& top left remains visible) & menu option toggles to hide

    Case 4:

    1. Select "View->Show Trees" when both trees are visible (i.e. the menu status is not up to date)

    2. Tree visibility does not change & menu option toggles to hide

    Case 5:

    1. Select "View->Hide Trees" when both trees are hidden (i.e. the menu status is not up to date)

    2. Tree visibility does not change & menu option toggles to show

    Case 6:

    1. Select "View-> Hide Trees" when left tree is hidden & top tree is visible

    2. Top tree is hidden (& left tree remains hidden) & menu option toggles to show

    Case 7:

    1. Select "View-> Hide Trees" when left tree is visible & top tree is hidden

    2. Left tree is hidden (& top tree remains hidden) & menu option toggles to show

    Case 8:

    1. Select "View-> Hide Trees" when both trees are visible

    2. Both trees are hidden & menu option toggles to show

  2. Christopher Keil repo owner

    If we have a toggling menu button, then I can only do either case 2&3 or case 6&7. The button can only have one state at a time (Show vs. Hide). I implemented the functionality of case 2&3 now.

    We can also only implement one of the two for toggling. When I press CMD + T to toggle the trees while the row trees are shown and the column trees are hidden, should row trees hide so that both are hidden or should column tree show so that both are shown?

  3. Robert Leach reporter

    I'm not sure I understand why you can have either 2&3 or 6&7, but not both together. The menu either displays an option to show (cases 2&3) or hide (cases 6&7) the trees.

    Cases 2&3: If 1 tree is currently visible and show is selected, the result should be both are visible and the menu option changes to now display the phrase "hide trees".

    Cases 6&7: If 1 tree is currently visible and hide is selected, the result should be both are hidden and the menu option changes to now display the phrase "show trees".

  4. Christopher Keil repo owner

    I understood what was supposed to happen. But you want to be able to make a choice between show and hide when only one tree is visible. That would require two menu items instead of one. I was just wondering if that's how it should be implemented.

  5. Robert Leach reporter

    I don't think it should require 2 menu items, though you're more familiar with the code than I am. But without respect to what currently exists in the code, all that's needed is to know what state the menu item is in (whether it's displaying show or hide). If it's "show", then all trees should be shown when it's selected. If it's hide, then all trees should be hidden. - regardless of how many trees are shown/hidden. And the menu option should always toggle to the opposite state. Does that make sense?

    I know that ⌘-t toggles as well. I think that ideally it would control what the menu item is displaying and the two methods would be in sync.

  6. Christopher Keil repo owner

    This is actually what is implemented right now. Looks like I misread what you previously wrote since I totally agree that this is how it should work. Sorry about the misunderstanding. I believe this is exactly what it is doing now. Issue #147 will cause both trees to be shown on resize and therefore the menu button also adapts -- even if it's only a few pixels.

  7. Log in to comment