Storybook + Apostrophe 3.0
See original GitHub issueWe’ve built out a lot of cool A3 stuff in isolation but we need to figure out how apostrophe-storybook and Apostrophe co exist before things diverge too far.
Where should Vue components be authored in Apostrophe?
Option 1: Components live in Storybook and are imported into Apostrophe 3.0
This is what we’re currently and it feels good. A blank canvas where you can just start writing an atomic piece of UI and know exactly where the files are going to go and how to write your story states.
Pros:
- Easy to get going
- Single, flat architecture where all components can be found
- Test driven approach ‘feels’ good
Cons:
- Writing new components happens in
apostrophe-storybook
instead of core. Friction!
Option 2: Components live in Apostrophe and are imported into Storybook
This makes more intuitive sense because when you’re updating or writing a new component, you’re writing it in the Apostrophe core module.
Pros:
- Easy to contribute
- Modules own their components. Apostrophe-UI contains all generic interface.
- A path forward for Storybook being a visual testbed where apostrophe and non-core modules could be installed can exist.
Cons
- Storybook becomes non-essential and prone to rot
- Harder to just ‘get started’ because you need to build your own context.
Where does Storybook live?
In either scenarios above we’re assuming Storybook is a separate repo, but it doesn’t have to be! In an effort to further reduce separation and ‘things to maintain’, Storybook could live alongside Apostrophe in core. This would make for a bit smoother development flow as you wouldn’t have to symlink the repos together in order to update both. Thoughts on that?
Issue Analytics
- State:
- Created 4 years ago
- Comments:8 (7 by maintainers)
Top GitHub Comments
A pattern where the story is bundled with the component would make it very clear for future component development, so I like that ✔️
Putting SB right into the core apostrophe module seems good from a maintenance perspective ✔️
So all we would need would be some loader so that SB could inhale all registered Apostrophe components and their stories and then you would never have to fiddle with Storybook’s config, just fire it up and run your tests. ✔️
Are we at ✔️✔️✔️ on Option 2 + Yes on the bonus question?
This direction looks great.
On Mon, Jun 24, 2019 at 10:43 AM Alex Bea notifications@github.com wrote:
–
Thomas Boutell, Chief Software Architect P’unk Avenue | (215) 755-1330 | punkave.com