I love that you guys are experimenting with 2 sepa...
# compose-web
s
I love that you guys are experimenting with 2 separate APIs for compose web. Have you considered a canvas rendered API that can very accurately render the same widget across desktop, android and web? I’ve found I typically work on teams that create private websites behind an auth barrier, where SEO isn’t relevant. In a lot of these cases, I’d prefer a canvas rendering between Desktop, Mobile, and Web, where I had some level of confidence that there was consistency between the platforms. Have you guys considered providing a canvas solution?
👍 6
👍🏻 1
j
From the blog post, I thought all common widgets will be available some day
s
With multiplatform widgets, we are experimenting with creating a set of layout primitives, widgets, and APIs that mimic the features you already know from Jetpack Compose for Desktop and Android. These web implementations are currently self-contained in their own packages, and implement only a small subset of the interfaces found on the other targets.
They try to approximate the behavior of the canvas-based implementations used in the other Jetpack Compose targets. Under the hood, they recreate the look and feel of the components on top of the DOM, under the constraints of the browser layout engine.
o
Yes, we considered it, but it means rather beefy binaries, so it’s not something planned immediately. But considering OSS nature of this project, one could help by contribution in that direction.
☝️ 1
s
Makes sense
I just checked out flutters compilation - https://gallery.flutter.dev/#/ I see that canvaskit is only 2.5MB for their implementation. 2.5MB seems very acceptable, especially considering that it’s a cached dependency.
👀 4
👍 3
c
I'm not a web dev myself, but from what I've overheard 2.5MB is considered quite heavy?
l
It's all relative. If you make an app or target the few that have optical fiber, or a non congested and large 4G/5G data plan in a place with good signal, it might be okay, but that means you're targeting a minority of cases. Even people with fiber might reach your website over a slow 3G connection in less than ideal conditions, and 2.5MB wins anytime vs a still nice but sub-megabyte webpage.