facelessuser / ColorHelper

Sublime plugin that provides helpful color previews and tooltips
https://facelessuser.github.io/ColorHelper/
MIT License
254 stars 30 forks source link

Feature Request: Color Previews in Gutter, not inline #197

Closed adaminfinitum closed 2 years ago

adaminfinitum commented 2 years ago

Feature Request

I prefer the icons/previews to be in the gutter, rather than in the area where I'm writing code (just a personal preference, I don't like the way the inline previews move my code around to make room for the color preview).

I thought this would be simple, that I could just fork this repo, copy some code from other color plugins that render the preview in the gutter and that would be it...but it wasn't as obvious how to do that as I had hoped it would be.

I really like the utilities for working with color in ColorHelper, I just wish it didn't insert the previews inline.

3 other Sublime Text color packages that implement icons/previews in the gutter (left of the line numbers) are:

packagecontrol.io/packages/Gutter Color

With the relevant code seeming to be from github.com/ggordan/GutterColor in gutter_color.py and in line.py

packagecontrol.io/packages/Color Highlight

github.com/Kronuz/ColorHighlight in ColorHighlight.py Lines 300-360 and ColorHighlight.py Lines 913-923

Color Highlight (above) says it was originally a fork of Color Highlighter (below)

packagecontrol.io/packages/Color Highlighter

github.com/Monnoroch/ColorHighlighter in gutter_icons_color_highlighter.py

facelessuser commented 2 years ago

I can understand the desire of having things one way or another - everyone is different and have different preferences. There are a number of things that I don't like about the mentioned color plugins. These are personal dislikes which is why I maintain my own color plugin. Yes, I could minimize the things I don't like, but the reality is that if I implemented gutter colors, I would never use them.

With that said, inline color previews were a design choice. You can minimize inline colors if this is troublesome while you work. One way is to show them on selection only: https://facelessuser.github.io/ColorHelper/settings/previews/#preview_on_select.

If anything, I am more willing to alter inline previews to work in a way that better suits people than I am building in more preview methods. If it is more agreeable, we could have a mode that shows no previews but allows you to turn them on by demand. We have a way already to forcibly turn them off on demand, maybe we can have a mode that defaults them off requiring manual toggling if desired.

Currently, I just don't have an interest in providing gutter colors. I'd rather spend the time maintaining the current infrastructure and making the underlying color library even better: https://github.com/facelessuser/coloraide. There is enough work there with the ever-changing CSS spec related to colors.

facelessuser commented 2 years ago

Updated statement: gutters can only show 1 color on a line (not page).

facelessuser commented 2 years ago

Closing for housekeeping.