icfnext / storybook-aem

MIT License
10 stars 4 forks source link

storybookjs/aem vs this #16

Open ByteFader opened 4 years ago

ByteFader commented 4 years ago

jzeltman i see you are also contributing to storybookjs/aem. How does this storybook setup compare to storybookjs/aem? As i've understood from the docs both have a different approach but which one is going to 'win the race' or is it a matter of flavour and preference?

jzeltman commented 4 years ago

@ByteFader The two approaches are merging somewhat. The @storybook/aem project will be the best way to use HTL files in Storybook. The approach used by this repo - fetching html from aem - will continue to be a viable strategy, one I will be using myself in fact, but can now be done by using the @storybook/aem project.

At some point we will get some better documentation how to do so, but basically I'm doing it now through the .storybook/middleware.js file and rerouting fetches to AEM url's via the server to get around CORS issues. Let me know if you want some more details on how to do so.

The Addons we've made in this repo will continue to exist and be improved. Currently the Style System is integrated with @storybook/aem, and just needs to be updated in the documentation. However, the Grid, Page Template, and Confluence Addons may be moved to a more generic location. Those aren't things that are necessarily tied to AEM. Although for the Confluence Addon, we're finishing up a proxy for AEM so that the Confluence Addon can be used when Storybook is built to static files and hosted in AEM. The wrapper Addons in the repo may continue to exist, but that is to be determined as their functionality has mostly been included in the @storybook/aem project.

The command line app will be moved over to the @storybook/aem project as well. I've been focused on building out the tooling and process for using the CLI app, and will be taking what's built so far, and updating and improving it to be integrated with @storybook/aem.

megazear7 commented 4 years ago

storybookjs/aem Now contains the CLI which started here. It currently has the package and story commands available. It uses the addons from this repository when creating stories.

Here is a blog post that shows the two working together in their current state: engineering.icf.com/setup-storybook-with-aem.