abe33 / atom-tree-view-breadcrumb

Display a breadcrumb on tree view scroll
MIT License
10 stars 3 forks source link

current selection can be invisible in marginal case #7

Closed cognominal closed 9 years ago

cognominal commented 9 years ago

When descending a large treeview with the down arrow, the selection eventually becomes invisible. I suppose that the treeview is unaware of your package and acts like you breadcrumb was not active and get a wrong visible height. Indeed the visible height is diminshed by the breadcrumbs.

abe33 commented 9 years ago

Thanks for the report, but I'm not sure I understand correctly the problem here. Can you post an animated gif of the problem?

cognominal commented 9 years ago

The first gif is with tree-view-breadcrumb disabled. The selection in blue is always on screen when I scroll down using the down key. without-crumbs

The second gif is with tree-view-breadcrumb enabled. Eventually the selection is left out of the screen. This is the (admittedly small) problem with-crumbs

Also it seems that disabling does not work in an existing window. Don't know if this is specific to your package.

abe33 commented 9 years ago

Thanks for the insight, I'll make sure to properly handle that case. Also, I'll take a look at the disabling routine. Actually, this package was written in an evening as a proof of concept so it lacked of tests at first. I'm trying to fix that gradually.

kankaristo commented 9 years ago

I'm not sure if this is a proper way to fix this, but it works for me. :)

I added this to my styles.less:

ol.tree-view li.directory.project-root:last-child {
  padding-bottom: 20px;
}

Edit: This doesn't seem to fix it for keyboard navigation, but does fix it for mouse scrolling.

abe33 commented 9 years ago

Wow, sorry guys, I had completely forgotten about that issue. I'll try to see if I can find some time for that.