Open vinaygaba opened 1 month ago
@elihart I'll do the test update once we agree on the API direction. Those just need to be regenerated and I'm happy to add them upfront if that helps wrap your head around the changes.
Does anything need to be added to the test codegen to take advantage of this, or will per module tests just work once this is set up?
This is meant to be done in a follow up PR. This change is particular can happen in isolation so figured it makes doing reviews easier.
This PR adds a new public API that generates metadata about the Showkase elements on a per module basis. This essentially results in a new API being exposes which gives you access to a
Showkase.getModuleMetadata()
method in every module where Showkase is configured to run.The reason this is useful is so that this API can be leveraged to define custom tooling and behavior, such as generating a Paparazzi test in each module separately (as opposed to doing it in just the root module with all the previews aggregated). This allows the tests to be better parallelized and even avoided if the module did not have changes.
With this change, a new API is available for you to get access to all the Showkase elements in a given module. Here's what it looks like at the call site -
Addresses: https://github.com/airbnb/Showkase/issues/299 and #379
@elihart @airbnb/showkase-maintainers