Open bitspittle opened 10 months ago
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 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: https://github.com/varabyte/kobweb-intellij-plugin/commit/7319e84ffc3bb5d16c686d6eece60280734b9255
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!"
For example, if you have something like this:
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