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 playground is broken #24051

Closed
capJavert opened this issue Jul 20, 2020 · 8 comments · Fixed by #24554
Closed

Storybook playground is broken #24051

capJavert opened this issue Jul 20, 2020 · 8 comments · Fixed by #24554
Labels
Good First Issue An issue that's suitable for someone looking to contribute for the first time Storybook Storybook and its stories for components [Type] Bug An existing feature does not function as intended

Comments

@capJavert
Copy link

Describe the bug
Storybook playground is broken. https://wordpress.github.io/gutenberg/?path=/story/docs-introduction--page I also tried building latest release (at this time https://github.com/WordPress/gutenberg/releases/tag/v8.5.1) locally and I encountered same error.

I am looking at integrating standalone version of gutenberg inside my react based application so I followed the setup from storybook when I encountered this error. I was able to setup this once before and everything worked. I have the project and yarn.lock here if you want to checkout the last version that worked for me.

What can we do to fix this?

To reproduce
Steps to reproduce the behavior:

  1. Go to https://wordpress.github.io/gutenberg/?path=/story/playground-block-editor--default
  2. Click on "Add block" button.
  3. See error Cannot read property 'length' of undefined

Expected behavior
A new block is added inside editor area.

Screenshots
image

Editor version (please complete the following information):

  • This error is happening inside storybook playground released here.

Desktop (please complete the following information):

  • any OS or browser
@capJavert
Copy link
Author

Release 8.4.0 works without the error above. Looks like the QuickInserter component broke something after 8.5.0 release.

@capJavert
Copy link
Author

capJavert commented Jul 20, 2020

But on the 8.4.0 release (same setup as reported above) there is another error:
Cannot read property 'createSuccessNotice' of null

image

To reproduce
Steps to reproduce the behavior:

  1. Go to /?path=/story/playground-block-editor--default
  2. Click on "Add block" button.
  3. Select any (except for paragraph) block from tooltip
  4. See error Cannot read property 'createSuccessNotice' of null

@annezazu annezazu added [Type] Bug An existing feature does not function as intended Storybook Storybook and its stories for components labels Jul 24, 2020
@capJavert
Copy link
Author

capJavert commented Jul 30, 2020

@annezazu any interest to fix this sooner then later?

I would be interested to try and fix this by myself. I think its a shame a great project like this breaks in "hello world" like example.

@annezazu
Copy link
Contributor

@capJavert I'm afraid I am just helping with triage by adding labels but am not in a place to fix this. If you're game to take this on, that would be lovely. I'll see what I can do to flag this for others though as I agree it would be great to have this fixed.

@ItsJonQ
Copy link

ItsJonQ commented Jul 30, 2020

That's a bummer!!

For some context, I believe it takes a combination of various parts to bootstrap up the Gutenberg editor. The one that exists in the Playground story is a very basic version of it.

It looks like it's breaking at something related to QuickInserter. I'm not sure what's up.

@youknowriad I noticed the same thing happening in AsBlocks as well:
https://github.com/youknowriad/asblocks

Screen Shot 2020-07-30 at 1 53 24 PM

Is this a bug related to the Editor being bootstrapped in an environment outside of WP-Admin?

(Thanks!! <3)

@youknowriad
Copy link
Contributor

I don't know yet, I created an issue on asblocks too but I have yet to debug it properly.

@capJavert
Copy link
Author

@youknowriad any success in solving this? Can you link the issue you created for asblocks.

@youknowriad
Copy link
Contributor

@capJavert Yes, it's actually and easy fix see here youknowriad/asblocks#43 (comment)

I think we should solve this in the quick inserter code here and just have default values for these settings.

@youknowriad youknowriad added the Good First Issue An issue that's suitable for someone looking to contribute for the first time label Aug 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Good First Issue An issue that's suitable for someone looking to contribute for the first time Storybook Storybook and its stories for components [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants