Skip to content

Interactive previews of composable functions

Mikolai Gütschow requested to merge interactive-preview into main

As the preview embedded into IntelliJ is not working yet very stable, I tried to adapt @sebkur's approach of having additional entrypoints to specific screens for UI testing to the Compose world.

With this, adding a preview for a (set of) composable(s) is as easy as

fun main() = preview {
    ComposableComponent()
}

Also adding interactive elements to change the data model turned out to be very simple and convenient due to the declarative nature of Compose.

image

Merge request reports