Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Overlayed minimaps #724

Closed
EricMaGo opened this issue Nov 25, 2020 · 28 comments · Fixed by #730
Closed

Overlayed minimaps #724

EricMaGo opened this issue Nov 25, 2020 · 28 comments · Fixed by #730

Comments

@EricMaGo
Copy link

With the last update two maps appear one on top of the other, but only one moves when scrolling

bug

@nemesisridiculii
Copy link

I have this same issue

image

@UziTech
Copy link
Collaborator

UziTech commented Nov 25, 2020

Can you provide versions for Atom and OS, and minimap settings? I am unable to reproduce this.

@UziTech
Copy link
Collaborator

UziTech commented Nov 25, 2020

Does it still appear after restarting Atom? It could be a case where the old one is not removed on deactivate.

@EricMaGo
Copy link
Author

Already tried that (first thing that I tried), keep happening. Also tried reinstalling the package
Os is Ubuntu Focal Fossa and I'm using Atom 1.53.0 with minimap 4.35.2

@nemesisridiculii
Copy link

I have also tried restarting atom, and tried toggling all of the options in settings. I also disabled the minimap-selection plugin, but none of this helped. I'm running Atom version 1.53.0 x64 on Ubuntu 20.10 (Groovy Gorilla) x64

@aminya
Copy link
Collaborator

aminya commented Nov 25, 2020

Could you give the list minimap plugins and screenshots of your minimap settings?

@TizianoGC
Copy link

TizianoGC commented Nov 26, 2020

I have the same problem with Minimap 4.35.2 after a fresh installation of Atom from the Ubuntu software centre, without adding the Atom official repositories. Restarting Atom and logging out from Ubuntu didn't solve this issue. Could you please fix it? Below you can find the OS and atom versions:
OS
Ubuntu 20.04
Atom
Atom 1.53.0 x64
Electron 6.1.12
Chrome 76.0.3809.146
Node v12.4.0

Minimap 4.35.2

Thank you!

@aminya
Copy link
Collaborator

aminya commented Nov 26, 2020

We can't fix the issue without being able to reproduce it. Could you give more information?
The best way to do so is to upload your ~/atom/config.cson

@aminya aminya changed the title Overlayed maps Overlayed minimaps Nov 26, 2020
@aminya aminya added the linux label Nov 26, 2020
@TizianoGC
Copy link

Yes, of course. Please see the attached file (I added the txt extension to upload it).
config.cson.txt

@aminya
Copy link
Collaborator

aminya commented Nov 27, 2020

@TizianoGC is this the situation that it happens? The config shows that you have disabled minimap! Please reproduce the error, and then close Atom, and finally upload the file.

@TizianoGC
Copy link

Sorry about that. Yes, the error is still present, here there is the config file with minimap enabled:
config.cson.txt

I just noticed a new version of Minimap (4.35.3), shall I try it now and check if the error is still occurring?

@aminya
Copy link
Collaborator

aminya commented Nov 27, 2020

Thanks!

I just noticed a new version of Minimap (4.35.3), shall I try it now and check if the error is still occurring?

Yes, please!

@TizianoGC
Copy link

TizianoGC commented Nov 27, 2020

Unfortunately it is still happening.
config.cson.txt

@aminya
Copy link
Collaborator

aminya commented Nov 27, 2020

@TizianoGC Are you familiar with dev tools? If so, execute the following command (CTRL+Shift+P and search for the command)

Window: Toggle Dev Tools

Then try to inspect the overlayed minimaps, then give a screenshot of the HTML (atom-text-editor-minimap).

image

You see the minimap element here:
image

You can for example delete it, and access the underlying minimap.

image

@TizianoGC
Copy link

TizianoGC commented Nov 27, 2020

Deleting the element as you suggested removes entirely the minimap from the editor and deleting the canvasses either removes the minimap or changes nothing.
I don't know if it is useful, but selecting the minimap in the editor highlights the 3rd canvas (where == $0 is) instead of the atom-text-editor-minimap as in your example: example1

@MetRonnie
Copy link

MetRonnie commented Nov 27, 2020

I can reproduce with

  • Red Hat Enterprise Linux 7
  • Atom 1.53.0 x64
  • minimap 4.35.3

If I put display: none; for the 2nd canvas (see Tizanio's screenshot above), both minimaps disappear (the 1st & 3rd don't make a difference)

@aminya
Copy link
Collaborator

aminya commented Nov 27, 2020

Deleting the element as you suggested removes entirely the minimap from the editor and deleting the canvasses either removes the minimap or changes nothing.
I don't know if it is useful, but selecting the minimap in the editor highlights the 3rd canvas (where == $0 is) instead of the atom-text-editor-minimap as in your example:

@TizianoGC I can see here that you only have one minimap element! Why does it show two then? Could you open a single file that reproduces the issue and send the screenshot of HTML?

@aminya
Copy link
Collaborator

aminya commented Nov 27, 2020

Could you try installing the previous versions one by one until the issue gets fixed? I want to know which version is causing this issue.

I know this is a lot, but you probably want to try a few of them until you find the one that is causing the issue. After installation of each, you need to restart Atom (CTRL+Shift+F5).

apm install minimap@4.35.2
apm install minimap@4.35.1
apm install minimap@4.35.0
apm install minimap@4.34.0
apm install minimap@4.33.0
apm install minimap@4.32.0
apm install minimap@4.31.1
apm install minimap@4.31.0
apm install minimap@4.30.2
apm install minimap@4.30.1
apm install minimap@4.30.0
apm install minimap@4.29.9  # This definitely works

https://github.com/atom-minimap/minimap/releases

@TizianoGC
Copy link

Deleting the element as you suggested removes entirely the minimap from the editor and deleting the canvasses either removes the minimap or changes nothing.
I don't know if it is useful, but selecting the minimap in the editor highlights the 3rd canvas (where == $0 is) instead of the atom-text-editor-minimap as in your example:

@TizianoGC I can see here that you only have one minimap element! Why does it show two then? Could you open a single file that reproduces the issue and send the screenshot of HTML?

Yes, here it is: minimap1

@TizianoGC
Copy link

Could you try installing the previous versions one by one until the issue gets fixed? I want to know which version is causing this issue.

I know this is a lot, but you probably want to try a few of them until you find the one that is causing the issue. After installation of each, you need to restart Atom (CTRL+Shift+F5).

apm install minimap@4.35.2
apm install minimap@4.35.1
apm install minimap@4.35.0
apm install minimap@4.34.0
apm install minimap@4.33.0
apm install minimap@4.32.0
apm install minimap@4.31.1
apm install minimap@4.31.0
apm install minimap@4.30.2
apm install minimap@4.30.1
apm install minimap@4.30.0
apm install minimap@4.29.9  # This definitely works

https://github.com/atom-minimap/minimap/releases

Minimap works fine from 4.29.9 until 4.32.0, then from version 4.33.0 doesn't work correctly any more.

@keithnewman
Copy link

I can confirm I have the same issue as @TizianoGC and @EricMaGo.

I'm running the same Ubuntu 20.04 LTS / Atom 1.53.0 x64 / Minimap v4.35.4 set-up.
Like @TizianoGC, I also found that v4.32.0 is the last working version and v4.33.0 doesn't work. Fortunately, there weren't many changes between these versions, so it's quick to diagnose that the problem is triggered by the change to line 17 of canvas-layer.js

If I set desynchronized to false on line 17 of canvas-layer.js in my installation of Minimap v4.35.4 and restart Atom, the issue no longer happens. i.e.

    /**
     * The onscreen canvas context.
     * @type {CanvasRenderingContext2D}
     */
-    this.context = this.canvas.getContext('2d', { desynchronized: true })
+    this.context = this.canvas.getContext('2d', { desynchronized: false })

But I don't know why this only seems to affect certain platforms/installations.

@aminya
Copy link
Collaborator

aminya commented Dec 1, 2020

This seems to be specific to Ubuntu. Desynchronized canvas are more performant than traditional canvas. I think we should fall back to the traditional canvas for the operating systems that do not support low-latency rendering. You should switch to other operating systems if you want to experience the better performance of minimap.

https://developers.google.com/web/updates/2019/05/desynchronized#feature_detection

Based on this image, it seems Ubuntu does not support it.
image
https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement/getContext

@aminya
Copy link
Collaborator

aminya commented Dec 1, 2020

I have disabled desynchronized for Linux. If you have Linux, please try the latest version once it is released.

If you are interested in contributing, please see if setting lowLatency to true also causes the same problem

@github-actions
Copy link

github-actions bot commented Dec 1, 2020

🎉 This issue has been resolved in version 4.35.5 🎉

The release is available on:

Your semantic-release bot 📦🚀

@keithnewman
Copy link

Setting lowLatency: true in place of desynchronized: true in Minimap v4.35.4 does not cause the original problem with overlayed minimaps. However, I don't have a benchmark/test case to see if lowLatency is actually providing the low-latency benefits that are supposed to be given by the desynchronized canvas, or if the setting is simply being ignored. It feels a tiny bit more responsive when scrolling rapidly, but that could be a placebo effect.

@kdashg
Copy link

kdashg commented Dec 1, 2020

Chromium does not currently recognize "lowLatency" as a key: https://source.chromium.org/chromium/chromium/src/+/master:out/win-Debug/gen/third_party/blink/renderer/bindings/modules/v8/v8_canvas_context_creation_attributes_module.cc;drc=d81c5852498699fe3cd812e78d31c77c28e29281;bpv=1;bpt=1;l=22?q=preserveDrawingBuffer&ss=chromium

You can check if an attribute is recognized by checking for its presence as a key in the object returned from getContextAttributes().

@aminya
Copy link
Collaborator

aminya commented Dec 1, 2020

You should feel the difference when you set redrawDelay to 0. When you type in a large file, minimap updates should not slow down your typing.

Originally, I wanted to decrease redrawDelay, but I avoided that as I did not know if low latency canvas are supported on all operating systems. Minimap updates are not anything critical IMO, and so I prefer it not to be hard real time. The text editor itself is much more important, and that's where it should feel fast and smooth.

image

@TizianoGC
Copy link

Many thanks for the support and for fixing this issue :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants