Skip to content

Releases: airbnb/Showkase

1.0.3

04 Jun 04:44
Compare
Choose a tag to compare

This release contains the following changes and improvements

  • Stop exporting Showkase activity (#355)
  • Clear guidance in the README on setting up Showkase for debug only builds (#369)
  • Improvements to ensure incremental compilation works correctly as the warnings have been addressed (#372, #383)
  • Provide dark background for rendering Dark mode previews (#385)
  • Upgraded Showkase to leverage Kotlin 1.9.23 & Compose Compiler 1.5.13 (#389)

1.0.2

19 Sep 19:45
Compare
Choose a tag to compare

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 - #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 (#308)

1.0.1

19 Sep 17:36
Compare
Choose a tag to compare

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 - #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 (#308)

1.0.0-beta18

27 Mar 17:35
Compare
Choose a tag to compare
  • Added support for custom preview annotations (#303).

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 (#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 (cashapp/paparazzi#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

17 Dec 17:22
Compare
Choose a tag to compare
  • Optimized the code generation to be more performant (#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

16 Dec 15:19
Compare
Choose a tag to compare
  • Ensure that Multi Preview annotations don't throw a compile time error (#255)
  • Fixed indentation error in generated code (#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. (#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 (#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 (#252)
  • Fixed issue where having a BackHandler in a preview would break navigation in the ShowkaseBrowser (#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

22 Aug 16:35
Compare
Choose a tag to compare
  • Bumped up the version of Compose Compiler to use the 1.2.0 stable release (#249)
  • Fix long provider name codegen making code that does not compile (#241)
  • Fix textoverflow on top appbar for components with long names (#240)
  • Optimize code formatting in ShowkaseTheme.kt (#243)
  • Add close button for search field with animation (#242)

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

10 Jun 03:21
Compare
Choose a tag to compare

This release contains the following exiting changes 🥳

  • Showkase is based off Compose version 1.1.1 (#229)
  • Showkase's automated screenshot testing infra just got a sample integration with Shot, a popular screenshot testing library. This also means that there's a new artifact available showkase-screenshot-testing-shot. Refer this PR for more details. Extensive documentation around automated screenshot testing with Showkase coming shortly (#232)
  • Fix for app already in inverse mode issue (#223)
  • Fix for function names with illegal characters in codegen (#234)
  • Added more documentation around how Showkase supports the ability to document component styles and enables linking all components styles in a single view in the browser (#227)

1.0.0-beta12

10 Feb 05:49
Compare
Choose a tag to compare
  • Fix unable to find showkase root issue (7258828)
  • Fix super small previews issue(e1ae330)

1.0.0-beta11

04 Feb 20:38
Compare
Choose a tag to compare

Fixed bug that was introduced in beta09 release that stopped showing sub module components (#213)

Also contains other fixes and contributions