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

docs: fix sb source and actions #1344

Merged
merged 6 commits into from
Sep 1, 2021

Conversation

nickofthyme
Copy link
Collaborator

Details

Storybook created an unintentional breaking change between 5.x and 6.3 that broke @storybook/addon-storysource when exporting stories from a central file, a non-typical approach. Upgrading storybook in #1231 broke the source tab that many consumers of @elastic/charts rely on. This pr fixes the story source (somewhat -- only shows exported value and not full file as before) and adds back the missing @storybook/addon-actions.

Changes

Related to source fix:

⚠️ No story code was changed, only renaming!

Unrelated to source fix:

  • Upgrade storybook to 6.3.7. An issue with globals was limiting this but it now fixed.
  • Added back missing @storybook/addon-actions addon in main.js
  • Remove all unnecessary selectedPanel overrides in favor of global. Set to source in development and knobs otherwise.

Demo of working source

Screen.Recording.2021-08-31.at.02.13.15.PM.mp4

@nickofthyme nickofthyme requested a review from markov00 August 31, 2021 19:28
@nickofthyme nickofthyme added the :docs Anything related to documentation, API, storybook label Aug 31, 2021
@nickofthyme nickofthyme enabled auto-merge (squash) August 31, 2021 22:35
Copy link
Member

@markov00 markov00 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, tested locally
I see also another fix thanks to this upgrade: the initial rendering of storybook now shows the story (If I'm not wrong previously the initial render shows just the white almond background without a chart)

@nickofthyme nickofthyme merged commit 3868a22 into elastic:master Sep 1, 2021
@nickofthyme
Copy link
Collaborator Author

Looks good to me, tested locally
I see also another fix thanks to this upgrade: the initial rendering of storybook now shows the story (If I'm not wrong previously the initial render shows just the white almond background without a chart)

I wasn't sure if that was due to old bookmarked links but glad it fixes that! 🎉

@nickofthyme nickofthyme deleted the fix-sb-source branch September 1, 2021 12:54
@nickofthyme
Copy link
Collaborator Author

🎉 This PR is included in version 35.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@nickofthyme nickofthyme added the released Issue released publicly label Sep 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:docs Anything related to documentation, API, storybook released Issue released publicly
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants