atom-autohide-tree-view icon indicating copy to clipboard operation
atom-autohide-tree-view copied to clipboard

Use 'Hide Delay' when focusing the editor

Open ProLoser opened this issue 10 years ago • 1 comments

So I know I previously asked you to hide the tree when you focus the editor (for example when using fuzzy searching). However, when you are perusing the tree, sometimes you want to keep opening files and previewing them until you find the right one. Instead of instantly focusing the file (which I'm not sure you have control over) it would be nice if you used the Hide Delay setting. So if you have a 1 second delay before hiding the tree, and you open a file from the tree, you have 1 second to continue moving.

Alternatively, would be kinda interesting if you knew if the file was opened via fuzzy find or via mouse click on the tree. Chances are you don't want to hide the tree while you're still interacting with it, but you want to hide the tree when you start interacting with something else.

So perhaps my proposal to use the focusing of the editor as a means to hide the tree was premature. Perhaps it should be when you start interacting with the editor. Like if you click on the editor or move the cursor, or maybe (probably best) when the 'preview' pane becomes a 'live' pane. This means you have concluded that yes, this IS the file you want to interact with, you can now discard the file tree.

ProLoser avatar Oct 27 '15 19:10 ProLoser

Hmm interesting... I don't get a focus event on the editors when I open a file by clicking it in the tree view, except when I double click. I do get them when I open a file from fuzzy finder or when I click on an editor. So here's how it works for me:

  • When I click on a file in the tree view the tree view doesn't hide
  • When I use a tree-view:open-selected-entry command (either from the command palette or with a keybinding) to open a file the tree view hides (maybe the tree shouldn't hide in this case?)
  • When I open a file any other way the tree hides

Which sounds much like what you're expecting. I've changed some things since the latest release, though. I'll push that to master so you can check if it works for you.

olmokramer avatar Nov 03 '15 16:11 olmokramer