abe33 / atom-tree-view-breadcrumb

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

Causes jumping when scrolling #18

Open ProLoser opened 9 years ago

ProLoser commented 9 years ago

It keeps jumping around as the bar appears and disappears or is it just explicitly scrolling on some event? It should only scroll to a folder if I click on the button.

ProLoser commented 9 years ago

I think the problem is when the bar isn't there and it gets added that causes a re-render which causes a scroll to the top. You should have an invisible (or empty) placeholder container for the bar that exists even if there are no breadcrumbs present.

abe33 commented 9 years ago

You should have an invisible (or empty) placeholder container for the bar that exists even if there are no breadcrumbs present.

Just enable the Keep Breadcrumb Visible setting ;).

FWIW, initially the breadcrumb wasn't using a flex display (which force a repaint when inserted) but was using an absolute positioning, and the issue at that time was that the tree-view wouldn't update its height and some items at the bottom couldn't be reached by scroll due to that. Hence the switch to a flex display, but now it can trigger a jump in the scrolling.

ProLoser commented 9 years ago

Still seems like it could easily be fixed by merely toggling visibility instead of DOM structure

abe33 commented 9 years ago

Not sure that it'll change anything, but it's sure worth giving it a try.

simurai commented 9 years ago

After enabling flexbox https://github.com/atom/tree-view/pull/579 maybe the absolute positioning could be tried again?

But there would still be the problem that it might cover other packages. Keep Breadcrumb Visible only?

abe33 commented 9 years ago

@simurai I'll try with my local fix and see what's the better solution for that configuration.

abe33 commented 9 years ago

Here's what I get with both atom/tree-view#578 and atom/tree-view#579 applied and still using a flex display for the breadcrumb:

tree-view-breadcrumb-scroll

I don't see any scrolling occuring in the tree-view except for the one I'm doing with the mouse. @ProLoser let me know if this is what you expect.

lacostenycoder commented 7 years ago

The whole visibility feature and when it decides a appear and/or update is very buggy. I really wished this worked.