🔦 Showkase is an annotation-processor based Android library that helps you organize, discover, search and visualize Jetpack Compose UI elements
I did a new release in order to revert a change in the previous one as I feared it would have some implications to the users. More details in this PR.
Other than that, the same change log applies. Adding it here as well so that the latest release has an easily accessible changelog.
Finally, one thing you will notice is the change in the versioning scheme. I'm finally updating it since there was no real reason to continue with the "beta" versioning as it didn't signify maturity of the project by any means. We've been using this for over a couple years in production. This also fixes this issue (https://github.com/airbnb/Showkase/issues/308)
Note: Use the 1.0.2 release instead as it reverts a change that could potentially have implications.
This release contains the following fixes -
Finally, one thing you will notice is the change in the versioning scheme. I'm finally updating it since there was no real reason to continue with the "beta" versioning as it didn't signify maturity of the project by any means. We've been using this for over a couple years in production. This also fixes this issue (https://github.com/airbnb/Showkase/issues/308)
You can now create another annotation class that's annotated with @Preview
and Showkase will ensure that the @Preview
properties are applied whenever you use the custom annotation. Here's an example
@Preview(name = "Custom Preview One First", group = "Custom Previews")
@Preview(name = "Custom Preview One Second", group = "Custom Previews")
annotation class MyCustomPreview
// This custom annotation can now be used to represent previews
@MyCustomPreview
@Composable
fun CustomAnnotationPreview() {
}
This was contributed by @oas004 and required a lot of diligence 👏🏻
showkase-screenshot-testing-paparazzi
that provides a mechanism to automate screenshot testing for your codebase using Showkase + Paparazzi (https://github.com/airbnb/Showkase/pull/294).Assuming that you were already using Showkase, you just need 3 lines of code in the test
sourceset of your root module to automatically screenshot test all your previews in the default configuration.
@ShowkaseScreenshot(rootShowkaseClass = YourShowkaseRootModuleClass::class)
abstract class MyPaparazziShowkaseScreenshotTest: PaparazziShowkaseScreenshotTest {
companion object: PaparazziShowkaseScreenshotTest.CompanionObject
}
In our own usage, we've found issues with using Paparazzi when the codebase has a large number of screenshot and haven't quite figured out what's causing it (https://github.com/cashapp/paparazzi/issues/630). As a result, try at your own risk. Having said that, we are really keen on resolving the linked issue and deploying this. If you have any insights about this issue, please reach out!
internal
instead of forcing you to be public
. Please file issues if you notice any weird behavior after this refactor.Note: We discovered a bug in the 1.0.0-beta16
release hence not going to publish the release notes for it. Please use the 1.0.0-beta17
release instead.
@Preview
& @ShowakseComposable
annotations. This generates the additional previews even in the ShowkaseBrowser, just like you'd expect. One thing to note is that this only works for ksp
. More info about the kapt issue here. (https://github.com/airbnb/Showkase/pull/259)skipPrivatePreviews
flag to enable this. Here's how you'd configure it in your build.gradle
// If you are using ksp
ksp {
arg("skipPrivatePreviews", "true")
}
// If you are using kapt
kapt {
arguments {
arg("skipPrivatePreviews", "true")
}
}
showkase-screenshot-testing
artifact, you would've noticed that there was really limited information available when the test fails. We now share more information so that it's easier to debug the failing test (https://github.com/airbnb/Showkase/pull/276)showkase-screenshot-testing
articact and I'm working on a doc that dives deeper on this topic (https://github.com/airbnb/Showkase/pull/252)Want to once again give a huge shout out to all the contributors. I'm very grateful for all the help and appreciate everything you do to improve this library 🙏
I am particularly excited about this release because all these improvements were from the community, particularly from Odin, who is the MVP for this release 🥳
This release contains the following exiting changes 🥳
1.1.1
(https://github.com/airbnb/Showkase/pull/229)showkase-screenshot-testing-shot
. Refer this PR for more details. Extensive documentation around automated screenshot testing with Showkase coming shortly (https://github.com/airbnb/Showkase/pull/232)Fixed bug that was introduced in beta09 release that stopped showing sub module components (https://github.com/airbnb/Showkase/issues/213)
Also contains other fixes and contributions
Fix duplicate class issue with generated metadata file (#201)