Showkase Versions Save

🔦 Showkase is an annotation-processor based Android library that helps you organize, discover, search and visualize Jetpack Compose UI elements

1.0.2

7 months ago

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.

  • De-dupe with the fully qualified function name #315
  • Remove the Deprecation warning on generated module files when building #339
  • Fix width incorrectly passed to showkaseHeightDp param in ShowkaseMetadata. #336
  • Update kotlin to 1.8.10, xprocessing to 1.6.0-alpha01. This fixes the Dagger 2.48 incompatibility issue - https://github.com/airbnb/Showkase/issues/349
  • Upgrade compose version to 1.4.2 #353
  • Additionally, there was some foundational work done to allow adding more information into the Showkase Browser (#309 ). This is still work in progress so it's not necessarily usable just yet.

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)

1.0.1

7 months ago

Note: Use the 1.0.2 release instead as it reverts a change that could potentially have implications.

This release contains the following fixes -

  • De-dupe with the fully qualified function name #315
  • Remove the Deprecation warning on generated module files when building #339
  • Embed proguard rule for generated provider class #341
  • Fix width incorrectly passed to showkaseHeightDp param in ShowkaseMetadata. #336
  • Update kotlin to 1.8.10, xprocessing to 1.6.0-alpha01. This fixes the Dagger 2.48 incompatibility issue - https://github.com/airbnb/Showkase/issues/349
  • Upgrade compose version to 1.4.2 #353
  • Additionally, there was some foundational work done to allow adding more information into the Showkase Browser (#309 ). This is still work in progress so it's not necessarily usable just yet.

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)

1.0.0-beta18

1 year ago

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 👏🏻

  • Experimental Added a new artifact 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!

  • Other misc documentation updates and fixes

1.0.0-beta17

1 year ago
  • Optimized the code generation to be more performant (https://github.com/airbnb/Showkase/pull/284)
    • We hit an issue with Jacoco that pointed out how our final generated aggregator class had a heavy init method that caused a Jacoco task to fail at scale (1000+ previews). In addition, the root module can become a build time bottleneck as the codebase scales. In this release, we optimized the code generation by moving some of the code generation to the respective modules that have the previews as opposed to generating everything in the root module. This also allows us to leverage incremental compilation better. One nice side effect of this refactor is that your preview functions are now allowed to be internal instead of forcing you to be public. Please file issues if you notice any weird behavior after this refactor.
  • Let the IDE recognize generated code when using KSP (#279 )
    • Some folks complained how the generated classes/methods weren't being detected by the IDE. This happens because the source generated by ksp specifically needs to be registered separately. The linked PR does it for the sample app and shows how you'd do that in your own codebase.
  • Fixed bug in getShowkaseMetadataFromPreview where the preview width was being set as the showkase metadata height (#280)

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.

1.0.0-beta15

1 year ago
  • Ensure that Multi Preview annotations don't throw a compile time error (https://github.com/airbnb/Showkase/pull/255)
  • Fixed indentation error in generated code (https://github.com/airbnb/Showkase/pull/258)
  • Support stacking of @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)
  • Added the ability to skip previews functions that are private. You can use annotations options and pass the 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")
    }
}
  • If you are using the auto generated screenshot tests from the 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)
  • Added a sample to demonstrate how you can automate screenshot testing of all the previews in your codebase using Showkase + Paparazzi. Using this setup is a strong recommendation (as opposed to even the showkase-screenshot-testing articact and I'm working on a doc that dives deeper on this topic (https://github.com/airbnb/Showkase/pull/252)
  • Fixed issue where having a BackHandler in a preview would break navigation in the ShowkaseBrowser (https://github.com/airbnb/Showkase/pull/267)
  • Miscellaneous documentations related fixes

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 🙏

1.0.0-beta14

1 year ago

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 🥳

1.0.0-beta13

1 year ago

This release contains the following exiting changes 🥳

1.0.0-beta11

2 years ago

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

1.0.0-beta10

2 years ago

Fix duplicate class issue with generated metadata file (#201)