Comments (6)
Preview an UI in commonMain
on IntelliJ IDEA that is what I want.
from compose-multiplatform.
Sub-issue: project created by kmp.jetbrains.com doesn't support Preview in IDEA/Android Studio #4839
from compose-multiplatform.
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 screenshotTesting
source directory, require an Android target with AGP 8.5.0, and only being able to pull from the common/android sources.
Here's the Gradle convention plugin I'm using to apply to the relevant modules:
https://gist.github.com/malbanese/6f015e0390ee767c4bc0acb87f697755
from compose-multiplatform.
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.
from compose-multiplatform.
+1 Getting multiplatform compose previews to work in different places is currently a hassle.
from compose-multiplatform.
A report in Kotlin IDEA plugin tracker: https://youtrack.jetbrains.com/issue/KTIJ-30072
from compose-multiplatform.
Related Issues (20)
- (Desktop) minimumInteractiveComponentSize + size/width/height Modifier leads to inconsistent placement HOT 3
- iOS. Animation crashes with OOM inside bottom sheet
- TextField error: kotlin.IllegalStateException: ComposeScene is closed HOT 3
- NPE in UndecoratedWindowResizer.desktop.kt in java.awt.PointerInfo.getLocation()
- Deep Linking Support - iOS HOT 5
- Compose Multiplatform and Jetpack Compose method signatures are inconsistent. HOT 1
- connection to Database HOT 3
- version update from 1.6.20-dev1673 -> 1.7.0-dev1686 breaks AnimatedContent HOT 2
- Offset difference in IME padding between iOS and Android HOT 1
- Build iOS failed with kotlin 2.0.0, compose 1.6.11. java.lang.IllegalArgumentException: Failed requirement. HOT 1
- iOS App with shared Compose UI module crashes on launch with `MissingResourceException` HOT 2
- composeResClass cannot be generated in modules other than shared
- Where can I see the changes to the slot table in the Compose July '24 release? HOT 1
- ModalBottomSheet Closes on Back Press with Keyboard Open in Compose Multiplatform HOT 1
- No such value argument slot in IrCallImpl: 1 (total=1) HOT 1
- Improve code style: Replace wildcard imports with explicit imports HOT 1
- Compose multiplatfrom and jetpack compose compatibility problem (java.lang.NoSuchMethodError MeasureScope#layout$default) HOT 1
- compose resources not loading on iOS ~ after 1.6.8 HOT 4
- Support type-safe navigation HOT 3
- (Select-All -> Delete) action in TextField doesn't work when empty text state disposes composition
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from compose-multiplatform.