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!
Here's a screenshot to give context:
11/13/2023, 1:33 PM
that's really cool
11/13/2023, 2:59 PM
11/13/2023, 3:39 PM
Is it possible to have previews in common code?
11/13/2023, 3:50 PM
@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