kobweb icon indicating copy to clipboard operation
kobweb copied to clipboard

Support Compose Resources?

Open bitspittle opened this issue 1 year ago • 5 comments

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?

bitspittle avatar Mar 16 '24 06:03 bitspittle

Take a look at this image

Compose HTML is different from Compose Web

image

EchoEllet avatar Mar 17 '24 01:03 EchoEllet

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 avatar Mar 21 '24 20:03 bitspittle

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.

bitspittle avatar Mar 22 '24 03:03 bitspittle

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.

EchoEllet avatar May 24 '24 13:05 EchoEllet

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:

  • https://github.com/JetBrains/compose-multiplatform/issues/4822
  • https://github.com/JetBrains/compose-multiplatform/issues/4823
  • https://github.com/varabyte/kobweb/blob/feature/k2/docs/k2-migration.md

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.

bitspittle avatar May 24 '24 17:05 bitspittle