facelessuser / ColorHelper

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

ColorHelper popup issue - clicking doesn't work, broken look #168

Closed Draghmar closed 3 years ago

Draghmar commented 3 years ago

Description

Fresh ST4, without any additional packages (outside of package control and themes). And this is what I'm getting: obraz And clicking on anything inside doesn't work. The reason for fresh install was to check if my day to day copy was responsible for the same issue I have in it. And because this old copy was very old I thought I just start installation from scratch, to remove anything that was installed and I didn't even use it. ;)

And this is something that comes up in the console after trying to click inside the popup:

Traceback (most recent call last):
  File "G:\owncloud\Sublime Text\Data\Installed Packages\ColorHelper.sublime-package\color_helper.py", line 109, in on_navigate
  File "G:\owncloud\Sublime Text\Data\Installed Packages\ColorHelper.sublime-package\color_helper.py", line 712, in show_palettes
  File "G:\owncloud\Sublime Text\Data\Installed Packages\ColorHelper.sublime-package\color_helper.py", line 424, in format_palettes
  File "G:\owncloud\Sublime Text\Data\Packages\mdpopups\st3\mdpopups\__init__.py", line 461, in color_box
    border_size, check_size, max_colors, alpha, border_map
  File "G:\owncloud\Sublime Text\Data\Packages\mdpopups\st3\mdpopups\colorbox.py", line 249, in color_box
    base64.b64encode(color_box_raw(*args, **kwargs)).decode('ascii')
  File "G:\owncloud\Sublime Text\Data\Packages\mdpopups\st3\mdpopups\colorbox.py", line 125, in color_box_raw
    to_list(checkered_color(colors[c], CHECK_LIGHT)),
  File "G:\owncloud\Sublime Text\Data\Packages\mdpopups\st3\mdpopups\colorbox.py", line 54, in checkered_color
    checkered = Color(color)
  File "G:\owncloud\Sublime Text\Data\Packages\mdpopups\st3\mdpopups\coloraide\colors\__init__.py", line 63, in __init__
    self._attach(self._parse(color, data, alpha, filters=filters, **kwargs))
  File "G:\owncloud\Sublime Text\Data\Packages\mdpopups\st3\mdpopups\coloraide\colors\__init__.py", line 118, in _parse
    raise ValueError("'{}' is not a valid color".format(color))
ValueError: '#0000004C@1' is not a valid color

Support Info

Steps to Reproduce Issue

  1. Fresh ST4.
  2. Installed package control and themes.
  3. Installed CH.
  4. Without doing any changes to the config open any CSS file and try to click on the color box and then on the pallete for exmaple.
facelessuser commented 3 years ago

Are you using the 3.0 beta?

facelessuser commented 3 years ago

Beta of ColorHelper I mean

facelessuser commented 3 years ago

Ugh, there is some broken stuff. When I pushed the latest mdpopups, I was also testing the latest ColorHelper beta, but not the old ColorHelper...

facelessuser commented 3 years ago

So here is the story. I've been working on getting ColorHelper 3.0 out the door. It has been in beta as I finish things up. Large portions have been rewritten, and functionality has been overhauled. Color handling (conversions and such) work much better in the beta and is much easier for me to maintain than the current 2.7.0 version.

ColorHelper uses mdpopups. The underlying colorlib that I use in ColorHelper is now being used by mdpopups, and mdpopups has had a number of fixes as well...but all of my testing (in relation to ColorHelper) was done with the latest beta (https://github.com/facelessuser/ColorHelper/issues/159). I've tested other plugins that I use mdpopups with, and they've all worked fine, so I hadn't even considered that the old ColorHelper (which I am not actively using as I am always running the beta) would have issues.

This news may force my hand and cause me to release ColorHelper 3.0 beta publicly as I don't know if I have the time to debug the old ColorHelper. You can certainly try out the latest beta, you just have to enable prereleases for ColorHelper in your Package Control settings. Instructions are available in the docs.

Draghmar commented 3 years ago

Wait...I didn't notice that I didn't use the beta. I really thought I was installing it. I was creating this entry right before walking my dog so I didn't pay enough attention to the Support Info, where there's 2.7.0. Which means I screwed something up when using this as a way to install CH3beta "install_prereleases": ["ColorHelper"], I thought that if I put it there and then use Package Control to install CH it will pull beta version. ...few minutues later... Yeah...Stupid of me. I did put CH into prerelease...but in the main config and not the Package Control one. I forgot that PC it's not internal part of ST...lol

Sorry for bothering you. :( At least you know now what may happen with ST4 + CH2.7 combo ;) Not sure if you want this issue to stay open so close it if you don't need it.

facelessuser commented 3 years ago

Yeah, disaster, but I think I've figured out what was broken. I should have a release fixing the stable branch soon.

With that said, I hope you enjoy CH3beta. While some things are different, I think it is overall much better. I'm quickly moving towards a stable release of CH3, but not quite ready to pull to trigger on it. but it is very usable, it is more polishing and me trying to decide on whether I'm going to tweak interfaces and such.

facelessuser commented 3 years ago

Well, I have a fix out. It was easier to fix than I thought. If I didn't get them all, feel free to open a new issue, but since you are using the beta, you probably won't see them anyways 🙂.