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

📕 Storybook #37102

Closed
4 tasks done
streamich opened this issue May 24, 2019 · 8 comments · Fixed by #43529
Closed
4 tasks done

📕 Storybook #37102

streamich opened this issue May 24, 2019 · 8 comments · Fixed by #43529
Assignees
Labels
Team:Operations Team label for Operations Team

Comments

@streamich
Copy link
Contributor

streamich commented May 24, 2019

Add Storybook Kibana-wide (currently we have Storybook installation in canvas).

  • Allow any plugin to have its own Storybook

  • Initial discussion with @clintandrewhall @spalger @streamich
    • How do we add it to Kibana as a whole? (per plugin? global? in ./pacakges folder?)
      • Decided that most likely a single configuration will live at Kibana top level.
      • It will be possible to start a Storybook just for a specific plugin.
    • Will core need Storybook?
      • Probably not.
    • Snapshot testing with Storyshots.
      • Discussed possibility of selectively picking stories that will be snapshot tested, due to possibility of large diffs in snapshots.
    • Possibly it could be hard to maintain Storybook and help devs to learn it.
      • This is an extra piece of configuration for ops team.
    • How/where do we publish static storybook?
    • On push post a link to static Storybook build in PR thread.

TODO:

  • think about documentation, best practices.
  • @streamich to re-use configuration of canvas Storybook, and "convert" one of the plugins (possibly in Management app) to use Storybook.
  • Re-sync again.
@streamich streamich changed the title Storybook 📕 Storybook May 28, 2019
@jbudz jbudz added Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc labels May 29, 2019
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-canvas

@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-platform

@streamich
Copy link
Contributor Author

streamich commented Jun 12, 2019

  • 2nd sync
    • Decided will never run all stories of all plugins in one Storybook, but Storybook per plugin.
      • (Thus, plugins don't need to namespace their stories.)
    • @streamich presented small demo.
      • Allowed Storybook from Canvas to load stories Kibana-wide.
      • Created stories for few SIEM app components.
      • Showed one way how it is possible to load stories only for a specific plugin (thx to @dgieselaar).
    • @spalger suggested there might be another way to load stories for a specific plugin—using symlinks and generating config files dynamically.
    • Should Storybook config be global or each plugin should have its own config?
      • Each plugin could have its own "entry" file where it loads all stories.
    • @clintandrewhall suggested to use canvas/scripts/storybook.js script as that watches and rebuilds SASS.
    • Storybook build might fail for many reasons (TypeScript, React, Storyshots), developers will need to know they have to update stories for React components they modify.
    • @clintandrewhall is pro Storyshot snapshot testing. @spalger slightly skeptical as snapshots generated by Storyshots might be very large (maybe wrong?).
      • If EUI changes some CSS class name, is it good or bad if hundreds of Storyshot tests in Kibana fail?
      • There is a way to globally Jest-mock modules in Storyshots.
      • There might be ways to Jest-mock modules in more granular way.
    • We don't really have best practices.
      • Maybe could mention something about folder structure and how to separated "pure" and "connected" React components.
      • Would be interesting to see what other people come up with.

TODO:

  • @streamich to make PR of the demo (and possibly add more stories for SIEM components).
  • @spalger to take over Storybook configuration.
    • See how it can be extracted from Canvas somewhere globally.
    • See what is the best way to load stories for individual plugins.
    • See what is is the best way to do Storyshot snapshot testing.
  • Sync again

@streamich
Copy link
Contributor Author

streamich commented Jun 13, 2019

#38943 — demo PR: using Storybook in SIEM app

@streamich
Copy link
Contributor Author

streamich commented Jun 13, 2019

#38856 — separate package.json for Storybook

@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-app-arch

@timductive timductive added the impact:high Addressing this issue will have a high level of impact on the quality/strength of our product. label Jul 18, 2019
@streamich streamich removed Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc labels Dec 9, 2019
@streamich streamich self-assigned this Dec 9, 2019
@streamich streamich added Team:Operations Team label for Operations Team and removed discuss impact:high Addressing this issue will have a high level of impact on the quality/strength of our product. labels Dec 9, 2019
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-operations (Team:Operations)

@streamich
Copy link
Contributor Author

streamich commented Dec 23, 2019

Next steps: #54707

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

Successfully merging a pull request may close this issue.

5 participants