Hopefully this is helpful to somebody, I have created a library to workaround the fact the Desktop previews in IntelliJ are half-baked and in general very limited respect to the Android ones.
In future, I might think of writing a wrapper of the IntelliJ Preview plugin to use it via an annotation.
Here's the library, hope somebody will enjoy and please leave feedback via issues!
https://github.com/alexfacciorusso/compose-previewer
🙌 2
👏 2
Here's a screenshot to give context:
c
czuckie
11/13/2023, 1:33 PM
that's really cool
k
kv
11/13/2023, 2:59 PM
Nice work!
m
Mikolaj
11/13/2023, 3:39 PM
Is it possible to have previews in common code?
a
alexfacciorusso
11/13/2023, 3:50 PM
Thanks!
@Mikolaj Unfortunately it is not possible to have previews in the common code as the engine wouldn't know how to generate the preview itself. This library is only for desktop as the Android preview engine is quite good and complete.
You can have preview for the common code if you create the preview in one of the platforms. E.g. the UI composable in the common module, and the