[Fix] Same colors but different digits should be grouped together
- Toggle View to Palette View
#ccc&#ccccccis in 2 different groups

All 4 colors are the same:
#fff#ffff#ffffff#ffffffff
EDIT(@ryanraposo):
Considerations
- For individual items, its important that CodeUI shows the hex value as it would appear in the theme file/settings.json.
- We might need to change group titles. An example: use the shortest, or most 'reduced' hex code possible for the group's color.
New here? Welcome.
If you want to get started on this Issue but need some help, leave a comment and we'll work through it together!
I 'm new and i want to progress, so i could try to resolve this issue if you want ;)
I 'm new and i want to progress, so i could try to resolve this issue if you want ;)
Hell yeah! Go for it!
Did you have any questions/want any help??
First time on a vscode extension. I'll start by searching by myself and if I have any questions I'll come back and ask them here.
@Judikaelle 👍
@Judikaelle remember to trust your instincts on non-extension-specific code: if it looks wonky, it probably is. There is definitely sub-optimal code here and there, particularly in the TreeView providers (elements.ts & info.ts). Most common is drawn-out, wordy code that made it easier to debug.
@Judikaelle my first thought for this issue: a solution based on converting away from hex and then back. Thats before checking into it at all, but I figure that way we can just let the color library determine equivalency for us. What were your first impressions?
Thx @ryanraposo for your messages. My first impressions were to convert all color values to hex as you said
I'm going to try something tomorrow and post my solution here
I didn't take much time to solve this problem but I'm still looking for it. I have made progress on the problem anyway. I think that converting the value of the colors in Hex (6 characters) or HexA will allow not to duplicate them.
Usefull link : https://css-tricks.com/converting-color-spaces-in-javascript/
I think creating "utils" folder is a good thing
Usefull link : https://css-tricks.com/converting-color-spaces-in-javascript/
Really nice link! I had no idea the conversions were so simple. I actually know very little about color spaces and that boost in understanding was a big deal for me, so thank you!
I think creating "utils" folder is a good thing
First of all, I agree, I know you're right. There are some obvious candidates (functions) I can think of, some that should exist and don't yet, but honestly I'm not always sure what would qualify.
Would you say that utils are generally loose functions that serve more than one module? I guess they also wouldn't depend on non-utils? Does that sound about right?
Sometimes I feel like the utils file/folder in my projects just becomes a landfill for reject functions that didn't quite make it into the class structure.
I'm not sure as a junior but in my opinion, the utils folder is a grouping of general functions that can/will be called several times.
Sometimes I feel like the utils file/folder in my projects just becomes a landfill for reject functions that didn't quite make it into the class structure.
I've heard something like that too. I'm just going to focus on the problem for now. We can refactor later.
Would a BDD/TDD process be a possibility eventually?
I'm not sure as a junior but in my opinion, the utils folder is a grouping of general functions that can/will be called several times.
@Judikaelle I hear you. I'd have to do some research on it also.
I've heard something like that too. I'm just going to focus on the problem for now. We can refactor later.
Yeah of course.
Would a BDD/TDD process be a possibility eventually?
I'll look into that!
@Judikaelle right, so tests.
We had a setup (see: https://github.com/ryanraposo/codeui/commit/03749dfc505644ea84b3731bbaa4481ba74dea0a) but I didn't take a serious look into writing any so eventually got rid of it. I know enough to know that I underestimate their impact, though.
I'm guessing the VS Code extension-specifics don't change too much about the process so that might be great if you're familiar. Here's the link for that:
https://code.visualstudio.com/api/working-with-extensions/testing-extension
Otherwise, I believe you have control over framework choices and the rest. If you do have any questions/need a review, you can ask, I'm more diligent about learning in those scenarios so I might be of some use. We could use a decent Issue for it, also.