-
Notifications
You must be signed in to change notification settings - Fork 35
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
What to do in Roborazzi #483
Comments
I can gladly help with Compose Preview support, but I’ll be soon on holidays till October.
These are likely tough…I’ve done some research though
|
With #383 right up my alley, and now that dropbox/differ#17 has been merged, I can pick this up. I'll be at droidcon NY so after, I'll make time to look into this. |
FYI @takahirom data class Device(
val id: Identifier,
val dimensions: Dimensions,
val densityDpi: Int,
val orientation: Orientation,
val shape: Shape,
val chinSize: Int,
val type: Type?, // Phone, Car, Desktop...
) {
fun inDp() : Device {...}
fun inPx(): Device {...}
}
class Identifier(
val id: String?,
val name: String?,
)
class Dimensions(
val height: Float,
val width: Float,
val unit: Unit, // px or dp
)
... This should make it very easy to support the device param of Previews in Roborazzi & Paparazzi. |
So I just released ComposablePreviewScanner 0.4.0. The final class looks like this: data class Device(
val identifier: Identifier? = null,
val dimensions: Dimensions,
val densityDpi: Int,
val orientation: Orientation,
val shape: Shape,
val chinSize: Int = 0,
val type: Type? = null,
val screenRatio: ScreenRatio = ScreenRatioCalculator.calculateFor(dimensions),
val screenSize: ScreenSize = ScreenSizeCalculator.calculateFor(dimensions, densityDpi),
val cutout: Cutout = NONE,
val navigation: Navigation = GESTURE,
) {
fun inDp(): Device = this.copy(dimensions = dimensions.inDp(densityDpi))
fun inPx(): Device = this.copy(dimensions = dimensions.inPx(densityDpi))
} And I provided a method for an almost-one-liner integration with Robolectric/Roborazzi :) RobolectricDeviceQualifierBuilder.build(preview.previewInfo)?.run {
RuntimeEnvironment.setQualifiers(this)
} Which should be called before calling any cumulative qualifier |
Thank you for providing this valuable feature! I think we can use it here. |
Yes, I can try to provide an MR today or in the upcoming days 😊 |
If you can handle this, that would be much appreciated! Thank you! |
I have been absent for months due to DroidKaigi 2024. We have a lot to do. I would like to list what we need to do and prioritize it.
Core Features
Migrate iOS implementation to use RoboCanvas Interface
#383
We couldn't progress with the multiplatform due to this issue, which makes it difficult to maintain our codebase. However, it seems the library will be released next week, but it is currently blocked.dropbox/differ#17
Now it was unblocked!
IntelliJ Plugin
Use CaptureResults in the IntelliJ Plugin (Your contributions are welcome)
#485
We would like to use CaptureResults in the IntelliJ Plugin. This feature allows us to view images in directories other than the default directory set by the tests, making it more effective. Additionally, we could see the class info for the images and make it possible to navigate the test class.
Gradle Plugin
Merge the test results of each module (Your contributions are welcome)
#472
Viewing all the module test results could be very useful, but we currently cannot do this. We need to understand the best practices for using multiple modules in Gradle.
Experimental Compose Preview Support
Add some options to RobolectricPreviewInfosApplier (Your contributions are welcome)
Our Preview annotation support offers very limited options.
https://github.com/takahirom/roborazzi/blob/main/roborazzi-compose-preview-scanner-support/src/main/java/com/github/takahirom/roborazzi/RobolectricPreviewInfosApplier.kt
Future Enhancement
Robolectric-based emulator: It is doable, but we don't have a strong motivation or use case for this. However, we can debug and create something similar to Maestro Studio.
Robolectric Emulator(Roborazzi Emulator) #176
AI: I'm considering an AI-related feature. We won't introduce it in an existing module; instead, it will be a new module. I have a few ideas, but we need to think about what we can do and what we have to do. (Your ideas are welcome.)
AI Idea for Roborazzi Thread #484
The text was updated successfully, but these errors were encountered: