varabyte / kobweb

A modern framework for full stack web apps in Kotlin, built upon Compose HTML
https://kobweb.varabyte.com
Apache License 2.0
1.53k stars 68 forks source link

Support Compose Resources? #486

Open bitspittle opened 6 months ago

bitspittle commented 6 months ago

Compose 1.6.0 introduces common resources for Compose Multiplatform.

https://blog.jetbrains.com/kotlin/2024/02/compose-multiplatform-1-6-0-release/

Does this include Compose HTML? If so, what do we need to do to make sure it's supported in Kobweb?

EchoEllet commented 6 months ago

Take a look at this image

Compose HTML is different from Compose Web

image

bitspittle commented 6 months ago

Here's a discussion from the Kotlin slack:

https://slack-chats.kotlinlang.org/t/16672173/are-compose-multiplatform-resources-part-of-the-1-6-0-releas

Compose Resources are supported but using them adds a heavy dependency to your project, from what it sounds like.

bitspittle commented 6 months ago

Sure, although I suspect a valid use case for Kobweb for some users will be to share common code between their site and mobile applications. It would be nice to get confirmation from users, since at the moment I'm just guessing.

Also, eventually Kobweb should make an official stance on how localization is recommended. So far I've been avoiding it because I just don't know enough yet.

EchoEllet commented 4 months ago

Compose Multiplatform 1.6.10 is out, the Compose resources are stable now but still no sign if it will be officially supported for Compose for HTML too.

bitspittle commented 4 months ago

Note that with K2 we're going to be migrating away from the Compose Plugin and to the Compose Compiler plugin instead (it is clear the Compose plugin is more and more being treated as a plugin for CMP, which means they keep introducing stuff that don't reallly apply to the Kobweb / Compose HTML experience).

See also:

In light of this new direction, it will be worth revisiting this issue to see if it even still makes sense to do post K2.