olmokramer / atom-autohide-tree-view

Hides most of the tree view, reveal it on hover
MIT License
38 stars 7 forks source link

incompatible with tree-view-open-files #30

Closed bewam closed 9 years ago

bewam commented 9 years ago

The width does not adapt to tree-view-open-files content but what's in the folder's tree view.

gifrecord_2015-07-21_123945

olmokramer commented 9 years ago

Hey, thanks for reporting this issue. I'll see what I can do about this, but it should be fairly easy. I'll let you know when it's done :)

bewam commented 9 years ago

Thanks. What could be done pretty easily is a min and max values. Do I need to reopen an issue to ask for it?

olmokramer commented 9 years ago

What do you mean with min and max values? Right now it checks the width of the actual tree view element, but I can easily change that to use the max width of the tree view or its siblings. It's ok with me to just continue discussion in this issue :)

bewam commented 9 years ago

ok, min isn't a real usefull option, only visual comfort. The problem with actual max option is that the whole process is disabled. There should be an option to only limit the width of the tree view. Files with very long name are annoying, or dir trees with many depth. I'd be better to have like a hard max width and hide if it's too long.

olmokramer commented 9 years ago

Aha, I think I understand what you're saying. Should be very easy as well, and setting it to 0 could disable it, just like some of the other options. Thanks for the idea :) I think I might have some time this weekend to implement this.

bewam commented 9 years ago

yes put a 250 char file name in a folder and open your tree view. It's shorter to explain like that. :D

bewam commented 9 years ago

At the same time, the trick is to change the CSS: .tree-view-resizer { max-width: 550px !important; } As this, my width problem is over.

olmokramer commented 9 years ago

Hey, I just implemented both your requests: a maxWidth setting and support for other .list-tree elements in the tree view. I still want to test a little more before I release it (I'll try to release it tonight), but I've pushed the changes to this repository. If you want, you can try it by cloning the repo to your ~/.atom/packages directory (overwriting the current autohide-tree-view folder). Please let me know what you think :)

bewam commented 9 years ago

It seems to be ok. The hiding system respects whole content. Just for acknowledgment, it was complicated to find a way to install. Not just by cloning. :-) Steps are:

olmokramer commented 9 years ago

Oops :o That's right, I always forget about that npm install step :p Glad it works though!

I'm still working on being able to manually resize the tree view. With the new maxWidth setting I think that should be possible, because file names might be truncated... It's almost done so I'll try to publish this tomorrow :)

olmokramer commented 9 years ago

I published the new version. Please let me know if it's still working