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

Support setting the gutter color of a Kobweb color for Color.rgb / Color.hsl calls #30

Open
bitspittle opened this issue Jan 23, 2024 · 2 comments
Labels
enhancement New feature or request maybe? Not sure we'll do this, but thinking about it, and open for input.

Comments

@bitspittle
Copy link
Contributor

For example, if you have something like this:

Kobweb color gutter

and you click on the red square, it brings up a color picker. Right now, we're ignoring the request to update the color if the user picks one.

The code to handle this would go in KobwebColorProvider::setColorTo, which is currently stubbed.

We're not always in a situation where we can change the color, but we might try to update things when we can. It could be pretty cool to write val x = Color.rgb(0, 0, 0) and then use the color picker to figure out the correct value we want.

We should support all the Kobweb color functions, specifically here: https://github.com/varabyte/kobweb/blob/14e9ccffb889907cb3ee9d94a0c3e90c3d33db74/frontend/kobweb-compose/src/jsMain/kotlin/com/varabyte/kobweb/compose/ui/graphics/Color.kt#L221

See also: https://github.com/JetBrains/intellij-community/blob/master/java/java-impl/src/com/intellij/codeInsight/daemon/impl/JavaColorProvider.java

@bitspittle bitspittle added the enhancement New feature or request label Jan 23, 2024
@Nxllpointer
Copy link
Collaborator

I guess this would be nice, however it seems like a pain to implement and I don't really see a huge benefit in this

@bitspittle
Copy link
Contributor Author

I guess this would be nice, however it seems like a pain to implement and I don't really see a huge benefit in this

I'm certainly not intending to prioritize it. But it's a relatively isolated feature, so I'm not against putting a placeholder issue with more information here.

Maybe in the future, someone will want to offer help to this project while at the same time getting familiar with IntelliJ APIs. This isn't a horrible place to start.

Also, I prefer having a bug issue for collecting useful information in so I can put a nice short comment tag on unfinished code, like here: 7319e84

If a dev comes by in the future and sees that comment, they can ignore it or come here for way more detail if curious. In the prior version of the commit, a dev might wonder -- "Was this intentionally skipped? Or were they hoping to get time to come back to it later? Just what is setColorTo anyway, because JB sure as heck didn't document it!"

@bitspittle bitspittle added the maybe? Not sure we'll do this, but thinking about it, and open for input. label Jan 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request maybe? Not sure we'll do this, but thinking about it, and open for input.
Projects
None yet
Development

No branches or pull requests

2 participants