Good morning! (at least where I am ha). Does anyon...
# compose-web
a
Good morning! (at least where I am ha). Does anyone have thoughts on this by chance?
o
Hey! Do you use Compose Multiplatform? If I understood correctly, you want something like this - https://youtrack.jetbrains.com/issue/CMP-6858 ? (Compose wouldn't care if it's plain html or a react component) while there is no out of a box solution yet, you might give another solution a try - https://github.com/Hamamas/Kotlin-Wasm-Html-Interop
a
Ahh, that is exactly what I was looking for! Doesn’t seem like it will be coming soon though? Does that mean that I could technically use “custom renders” for android and ios in KMP now?
o
not sure what you mean by "custom". If you are interested in embedding a "native" view on android: https://developer.android.com/develop/ui/compose/migrate/interoperability-apis/views-in-compose And for iOS: https://www.jetbrains.com/help/kotlin-multiplatform-dev/compose-uikit-integration.html#use-uikit-inside-compose-multiplatform
Doesn’t seem like it will be coming soon though?
It's something being in progress. But no promises yet 🙂
a
>> Doesn’t seem like it will be coming soon though? > It’s something being in progress. But no promises yet 🙂 Thank you. Appreciate the web is beta alpha at the moment. This is a kind of a blocker for us at the moment as we have libraries that render server-driven UI for all our platforms (ios, android, web). Thanks for those other examples. I believe that’s what we’re looking for (we’ll still be evaluating KMP/compose/kmp + compose though)
👍 1
o
> the web is beta at the moment to be precise, it's in Alpha. I mean Compose Multiplatform for Web is in Alpha Compose Multiplatform for iOS is in Beta
a
Yes, excuse me, you’re right. web = alpha, ios = beta. Still a bit early here 😅
👌 1
@Oleksandr Karpovich [JB] Is there a public roadmap for web somewhere that people can have a look at?
o
No, not yet. We're considering it.
a
Awesome, thanks. I know that it would be highly beneficial for teams like mine. We operate across three platforms, web being a requirement, for our main application. We are in the midst of building fresh (🫢 never happens I know haha) and something like KMP/KMP + Compose Multiplatform is very intriguing to us. If there was a roadmap for web, we’d be able to more effectively make trade-off decisions for tech used as a whole and potentially better tailor our roadmap/release schedule to an incremental delivery schedule that aligns with the web roadmap (i.e. doing android + ios first). Appreciate it’s a difficult one and people are working on it. Just wanted to provide an example of how it would help! Thanks!
thank you color 1
1
p
@Oleksandr Karpovich [JB] if you are going to provide a similar implementation for Html interop in compose mp as https://github.com/Hamamas/Kotlin-Wasm-Html-Interop take into account this issue https://github.com/Hamamas/Kotlin-Wasm-Html-Interop/issues/3. I made a workaround by changing this https://github.com/Hamamas/Kotlin-Wasm-Html-Interop/blob/0cb17af93dcbd732758ce636c[…]b1/composeApp/src/wasmJsMain/kotlin/com/hamama/kwhi/HtmlView.kt for this
Copy code
val density = window.devicePixelRatio.toFloat()
though if device changes scale during runtime, devicePixelRatio is not updated until reload
🙏 1