turigeza / fold-navigator

Fold navigator helps you navigate through your code folding points in Atom.
MIT License
7 stars 7 forks source link

Big blank space #2

Closed tnrich closed 8 years ago

tnrich commented 8 years ago

I'm not sure what is causing it to happen, but it definitely seems linked to using the fold-navigator.

image

turigeza commented 8 years ago

: ) That would be fairly odd if it was ... can you give me some clues ? What makes you think that it's related to the plugin ?

  1. Do you find that if you disable the plugin this problem goes away?
  2. Did it just happen or was it always like this?
  3. When does this happen ? When you open file, when you change tab, when you open atom, when you press a shortcut etc ...

Because it never happens to me I would somehow need to reproduce it otherwise I have very little to go by.

Thank you for reporting ...

tnrich commented 8 years ago

Hey Geza, it is totally possible that the issue is unrelated to your module, but I hadn't seen it until activating/deactivating fold-navigator. That said I'll try to reproduce it more systematically.

koelnconcert commented 8 years ago

I'm experiencing the same issue. It's not just a big space at the bottom, but rather the whole editor frame has moved upwards inside the window. You see in the screenshot that even the tab bar has moved out of sight.

This seems to happen if the fold-navigator sidebar is visible and the cursor in the editor is located near the end. The more you move the cursor down, the worse it gets. Scrolling will not help.

When opening e.g. the Command Palette the problem disappears - until you move the cursor again.

This does not happen if the navigator side is closed.

I'm running Linux and Atom 1.8.0.

koelnconcert commented 8 years ago

Seems to be related to the "Auto scroll fold navigator panel" option. Disabling it solves the problem for me.

turigeza commented 8 years ago

@koelnconcert Thank you for describing it so well ... @tnrich Sorry for my scepticism : ) Are you on Linux as well ?

I am going to try and reproduce it ...

tnrich commented 8 years ago

@turigeza , no problem! I'm on mac

turigeza commented 8 years ago

The only way I managed to reproduce this issue if I remove the overflow:scroll from .fold-navigator

.fold-navigator {
    background-color: @tree-view-background-color;
    overflow: scroll; // this gets overiden by some other styles ?
    font-size: 12px;
}

A, what is the theme you are using ? B, If you are feeling in a helpful mood would you do me the following

View>Developer>Toggle Developer Tools for dev tools

screen shot 2016-06-30 at 21 01 34

turigeza commented 8 years ago

Ok so so far I think that something a plugin or theme ( you both use ) seem to override the style on the .fold-navigator div and make the whole window scroll.

If my assumptions are right that means that when this happens you are not able to scroll fold navigator panel.

I have uploaded a feeble attempt to sort this problem just by adding overflow: scroll !IMPORTANT;

.fold-navigator { background-color: @tree-view-background-color; overflow: scroll !IMPORTANT; font-size: 12px; }

to the stylesheet.

You could try and download and see if that helps ? I would still be interested the above option B screenshot if you have a sec to do it.

Thank you both

tnrich commented 8 years ago

image

tnrich commented 8 years ago

I haven't been able to reproduce this exact error anymore unfortunately, so my screenshot doesn't mean much..

turigeza commented 8 years ago

@tnrich No worries. :) If it's gone it's gone :) When you have the error I suspect that "overflow-y" is different to "scroll".

tnrich commented 8 years ago

@turigeza I'll let you know if I see it again :)

tnrich commented 8 years ago

It's back! It doesn't look like the scroll is the culprit... image

tnrich commented 8 years ago

It appears to change in size depending on how far down I am in the document: image

koelnconcert commented 8 years ago

Ok so so far I think that something a plugin or theme ( you both use ) seem to override the style on the .fold-navigator div and make the whole window scroll.

overflow:scroll is not overriden here.

If my assumptions are right that means that when this happens you are not able to scroll fold navigator panel.

Nope. I can scroll the navigator panel just fine.

If I disable overflow:scroll I cannot scroll anymore, but the bug is still there.

koelnconcert commented 8 years ago

I can narrow down when the bug appears to me:

If I scroll down the navigator and select and fold-item at the bottom, the editor scrolls to the line just fine. Everything looks good. I can even move the editor cursor around just fine - until the cursor enters a new fold-item: The fold-navigator-item-selected changes and the whole workspace scrolls up.

turigeza commented 8 years ago

So my idea is wrong than : )

I still can not reproduce the issue which is a pain.

I know this is the code which is causing the problem:

if ((line) && !this.wasItOnClick && this.settings.autoScrollFoldNavigatorPanel) {
            line.scrollIntoView();

That is why if you disable "autoScrollFoldNavigatorPanel" this problem goes away.

Just as a wild stab in the dark I have changed that line to : line.scrollIntoView(false);

According to the docs it might help https://developer.mozilla.org/en/docs/Web/API/Element/scrollIntoView

If not maybe I have to think of using some javascript to scroll .fold-navigator div instead of line.scrollIntoView().

Update to latest please and see if it help.

koelnconcert commented 8 years ago

It turns out that the "big blank space" is always there, but normally not visible, because of

atom-workspace: { overflow:hidden;  }

setting it to scroll reveals the space at the bottom:

atom-colorpicker

For me it is caused by the color-picker package (version 2.1.1), whose popup seems to sit hidden at the bottom until first used. Before I used fold-navigator this hasn't caused any issues for me.

Disable the color-picker package solves the problem for me.

There might be still a bug in fold-navigator, because in the described scenario only the navigator panel should scroll and not the whole workspace-axis, right?

koelnconcert commented 8 years ago

v0.0.617 solves the problem for me. Thx :)

turigeza commented 8 years ago

@koelnconcert Hey thank you for literally solving this for me :)

When I used scrollIntoView() I thought it only scrolled the nearest parent which is scrollable. But it's not the case ... and yes as soon as you do what color-picker package did this will become obvious.

line.scrollIntoView(false) in some way should solve this issue if not (for the long run) just report back ...

I will install color-picker package just to see. Thanks again : )

tnrich commented 8 years ago

Yay nice work everyone!

On Fri, Jul 1, 2016, 1:58 AM Geza notifications@github.com wrote:

@koelnconcert https://github.com/koelnconcert Hey thank you for literally solving this for me :)

When I used scrollIntoView() I thought it only scrolled the nearest parent which is scrollable. But it's not the case ... and yes as soon as you do what color-picker package did this will become obvious.

line.scrollIntoView(false) in some way should solve this issue if not (for the long run) just report back ...

I will install color-picker package just to see. Thanks again : )

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/turigeza/fold-navigator/issues/2#issuecomment-229894766, or mute the thread https://github.com/notifications/unsubscribe/ACmqcfwsvLIi5k2YrOL7aiExTqkwa3uBks5qRNa1gaJpZM4I-Ms4 .