-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reduce variety of Preview annotations #4869
Comments
Sub-issue: project created by kmp.jetbrains.com doesn't support Preview in IDEA/Android Studio #4839 |
I agree that we have to either use the Android one for compability or the one from Jetbrains compose multiplatform as it's more future proof. |
Preview an UI in |
+1 Getting multiplatform compose previews to work in different places is currently a hassle. |
A report in Kotlin IDEA plugin tracker: https://youtrack.jetbrains.com/issue/KTIJ-30072 |
For anyone else who finds this, I've found a solution that fits my needs while waiting for better preview support in Compose Multiplatform and Android Studio. I was able to use the new Compose Preview Screenshot Testing library inside fully KMP / Compose multiplatform modules. Previews work inside Android Studio under the proper package, and this (mostly) solves my screenshot testing needs as well. Obviously there are some requirements like putting previews in the Here's the Gradle convention plugin I'm using to apply to the relevant modules: |
Let's move this into a separate task: #5078 |
Parent task: #2045 |
Please check the following ticket on YouTrack for follow-ups to this issue. GitHub issues will be closed in the coming weeks. |
We have 3 Previews:
androidx.compose.ui.tooling.preview.Preview
build.gradle
should haveimplementation(compose.preview)
androidx.compose.desktop.ui.tooling.preview.Preview
build.gradle
org.jetbrains.compose.ui.tooling.preview.Preview
build.gradle
should haveimplementation(compose.components.uiToolingPreview)
We should reduce the count, and make consistent guidelines/templates.
The text was updated successfully, but these errors were encountered: