Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate to Storybook? #69

Closed
hobbes7878 opened this issue Jul 26, 2022 · 4 comments
Closed

Migrate to Storybook? #69

hobbes7878 opened this issue Jul 26, 2022 · 4 comments

Comments

@hobbes7878
Copy link
Member

hobbes7878 commented Jul 26, 2022

Tracking with a demo to see how painful/beneficial this would be here: https://github.com/reuters-graphics/storybook-demo

Demo site, here: https://reuters-graphics.github.io/storybook-demo/

@hobbes7878
Copy link
Member Author

hobbes7878 commented Jul 26, 2022

One definite downside:

For example: https://reuters-graphics.github.io/storybook-demo/?path=/docs/beforeafter--override-overlay-css

Often we teach folks to override styles within the components using global SCSS to match their page design.

Storybook doesn't seem to register :global SCSS tags in stories (and also leaks non-scoped SCSS into other component's stories, per storybookjs/storybook#12855).

Seems like we'd have trouble documenting SCSS overrides of component styles... but maybe it's OK to have fewer examples of overriding styles on individual components and just have a page in the docs dedicated to saying, here's how to think about overriding ANY styles in components.

@hobbes7878
Copy link
Member Author

Worth a word about potential upsides here, too, I suppose.

Storybook is a mature component library framework, which means we won't have to maintain our own via sveltekit. Svelte is a community-supported framework in Storybook (not core), but it seems like it's well maintained, and even on the minds of SvelteKit core team to support.

The main future upside I see, though, is the benefit we get from the plugin ecosystem to add more testing into our components, including things like accessibility tests. It's also the framework dotcom uses, so in terms of compatibility, it's easier for them to look at what we're doing, if that becomes necessary.

I also wonder whether we're going to want something more robust to manage components NOW vs. regretting it later once we've scaled up with lots more stuff..

Worth tagging @MinamiFunakoshiTR in at this point to discuss and talk about specific pain points with the components we have.

Going forward with this means definite migration pain to move our docs into Storybook format, not to mention more customisation of styles and stuff I'd want to do in the app, but it's probably something we could pick at in a branch until it's done, too.

@hobbes7878
Copy link
Member Author

For now, gonna take Storybook on a longer test run with a new, non-critical lib:
https://github.com/reuters-graphics/svelte-charts

If we're happy with it there, then we can decide to migrate this library to Storybook , as well.

@hobbes7878
Copy link
Member Author

Development now tracking on the storybook branch..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant