vscode icon indicating copy to clipboard operation
vscode copied to clipboard

Add Opacity & Variable Height to Minimap

Open IMBurbank opened this issue 8 years ago • 18 comments
trafficstars

I'm looking for a way to change my VSCode Editor Minimap to behave more like the Atom Minimap.

Specifically, to have container opacity and variable height as the file grows in length. The opacity is what is most important to me, but the variable container length would help a lot as well.

Currently, my Atom minimap allows opacity and only grows in length as needed.
capture

While my VSCode minimap covers my code and maintains full pane height no matter how many lines are in the file. capture1

I tried asking a question about this on stackoverflow and looking through these issues. So far the closest I've found to this question is issue #21255, which points to issue #21229 and then to issue #21359, which lead to the implementation of a box shadow to make the minimap separation more prominent.

Unfortunately, the box shadow doesn't allow me to recover that text editor width while keeping my minimap enabled. This makes the difference between being able to see all my code using 2 panes and having my code cut off by the minimap.

I'm sure a lot of people transitioning from Atom to VSCode would appreciate being able to maintain this editor workspace, particularly when working with a lot of smaller files.

EDIT:

Adding what information I can in case you consider feature implementation:

Atom uses a gear icon that appears over the minimap on mouseover allows for 'absolute-mode' to be toggled on and off. This option toggles between a VSCode-like minimap and the one I showed above. capture3

From what I understand of the VSCode design paradigm so far, I think a similar feature could be toggled as a User Setting such as "editor.minimap.absolutePosition": true,

IMBurbank avatar Aug 15 '17 17:08 IMBurbank

I know this is a big project and don't want to bug you guys - I'm not sure how long is standard for a response and don't want to jump the gun - but as it's been a week I have to ask: is there anything I can do to aid in a decision or implementation? Or help this along generally?

Unfortunately, I have no experience contributing to open-source projects. But I am an engineer, and I've been teaching myself to code for the last year. I'm just starting to approach a low level of usefulness in my coding endeavors.

IMBurbank avatar Aug 22 '17 20:08 IMBurbank

Variable height might be related to https://github.com/Microsoft/vscode/issues/21773.

I find Atom's minimap actually useful as it clearly outlines the structure of a file, whereas in vscode the minimap needs me to strain my eyes to view the same content.

While everything else is scalable, you can't modify the size of the minimap at all. That means people who suffer from poor eyesight or those who have hdpi screens just have to accept poor accessibility.

ghost avatar Sep 25 '18 06:09 ghost

I've started doing a bit of work on this issue. When the minimap's background is transparent, I think the variable height could take care of itself, as in this screenshot:

image

The minimap height in this short file seems short, because only the editor is visible where the minimap has no code. (In this example, I've also set the scrollbar.shadow option in settings.json to transparent.)

So far, I'm looking at adding settings.json options for minimap.backgroundAlpha and minimap.textAlpha, so that the text/block's transparency can be controlled as well the background's. Definitely open to ideas on what would be most useful in controlling the settings!

Edit: Just opened PR #61021 for this feature.

naclonts avatar Oct 15 '18 02:10 naclonts

Hi @kokopelli314 ! I semi-recently PR'd this feature as well (with a more limited customization, as I was following the previous changes that were committed for tooltip opacity) in #58324, and the discussion has died off there with the UI clash being dismissed outright. This is a feature that I'd really like to see, whether it's my personal contribution or not, and I'm commenting here mostly in the hopes that it helps this feature to not get overlooked :)

I added some additional comments in that original PR, but I'll reiterate here that this is a feature available in other editors already, specifically with Atom's minimap opacity options and Sublime Text's ability to override the class names and their opacity values.

ghost avatar Oct 27 '18 08:10 ghost

@gloss-water Thanks for sharing! The option enabled in your PR looks good to me as well.

I agree this would be highly useful, and other editors I've used (especially Atom) already have this as a setting.

naclonts avatar Oct 27 '18 18:10 naclonts

@alexandrudima When is this going to be merged? Looks like the PR is just waiting. This would be an awesome feature that I would use right away!

RJSonnenberg avatar Dec 18 '18 18:12 RJSonnenberg

Also waiting for this one, please merge if PR is done :)

tommyalatalo avatar May 23 '19 12:05 tommyalatalo

Any news on this? The minimap blocking my lines is really bugging me, I'd love some opacity settings to be available :)

dmmello1989 avatar Oct 24 '19 19:10 dmmello1989

Hate to be one of those 'me too' guys, but I'm also waiting for this to be merged. Minimap is prety useful WHEN yo need it, but with the current implementation it always ends up eating precious screen space, setting the opacity level would be great, on mouse over it could come back without opacity...

opensas avatar Dec 03 '19 16:12 opensas

@opensas at this point the feature has been PR'd multiple times over the last couple years, with varying methods of implementing it. the PRs got ignored each time, the only real response i've seen so far isn't particularly promising or helpful for moving forward either

ghost avatar Dec 03 '19 17:12 ghost

This feature is just as important today as it was 2.5 years ago.

It's quite disappointing that this feature request has never been directly addressed, even in response to PRs, particularly since it's an opt-in feature - minimap opacity would only change if set to less than 100%.

If there's a reason this feature request won't be accepted, I think a lot of people would appreciate knowing that so they can act accordingly. If this feature would be accepted in some form, I would be more than happy to submit a new PR for it.

IMBurbank avatar Dec 03 '19 23:12 IMBurbank

up 💃

jgburet avatar Jan 22 '20 12:01 jgburet

Any solution?

LucasBonafe avatar Jan 31 '20 18:01 LucasBonafe

Yes. See: https://github.com/Microsoft/vscode/pull/61021#issuecomment-582520247 and https://github.com/microsoft/vscode/pull/58324 .

jdr-face avatar Feb 20 '20 15:02 jdr-face

To save a click-through for anyone landing here, CMD-SHIFT-P -> Open Settings (JSON), and paste the following into the top level of the JSON:

"workbench.colorCustomizations": {
    "minimap.background": "#ffffff33"
}

This fixes the opacity (I use #000000 instead of white). I can live without the variable height.

robinmacharg avatar Jan 08 '21 16:01 robinmacharg

Try "#1e1e1e33" which is the exact color of vscode's default theme background (at least on my mac) which makes it look a lot nicer.

For those who don't know, this is a hexadecimal format for red, green, blue, and opacity. Last two digits controls the opacity.

jaquinocode avatar Feb 21 '21 01:02 jaquinocode

"#4b384d5e" with SynthWave '84 and GlassIt-VSC

hlizard avatar Jul 02 '21 08:07 hlizard

Really don't like clicking in from another window and being taken to the bottom of the file unexpectedly, because the minimap extends invisibly to the bottom of the editor. This is not expected nor intuitive.

dailytabs avatar Jun 30 '24 03:06 dailytabs