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

Reusable blocks preview not working. #16808

Closed
youknowriad opened this issue Jul 30, 2019 · 5 comments · Fixed by #14367
Closed

Reusable blocks preview not working. #16808

youknowriad opened this issue Jul 30, 2019 · 5 comments · Fixed by #14367
Labels
[Feature] Inserter The main way to insert blocks using the + button in the editing interface [Feature] Synced Patterns Related to synced patterns (formerly reusable blocks) [Type] Bug An existing feature does not function as intended [Type] Regression Related to a regression in the latest release

Comments

@youknowriad
Copy link
Contributor

The preview that shows when you hover reusable blocks in the inserter has regressed. It shows:

Capture d’écran 2019-07-30 à 12 13 01 PM

I tried debugging quickly. I think the issue comes from the fact that we use an embedded editor (separate blocks store) but we don't load the content of the reusable blocks in the sub reducer.

Potential solutions

  • Refactor the reusable blocks to use an embedded editor (There's some PRs in progress)
  • try to load the reusable blocks in the BlockEditorProvider used for the preview.

Questions

This used to work, so I'm curious when it regressed and what's the "hack" that allowed it to work previously.

cc @aduth @jorgefilipecosta

@youknowriad youknowriad added [Feature] Inserter The main way to insert blocks using the + button in the editing interface [Feature] Synced Patterns Related to synced patterns (formerly reusable blocks) [Type] Bug An existing feature does not function as intended [Type] Regression Related to a regression in the latest release labels Jul 30, 2019
@aduth
Copy link
Member

aduth commented Jul 30, 2019

I'm having trouble with my local environment when running Gutenberg at older commits, but I wonder if it might have something to do with #14678, and the fact that the blocks store for the reusable blocks preview would now be separate from the top-level?

<BlockEditorProvider
value={ [ block ] }
settings={ settings }
>
<BlockList />
</BlockEditorProvider>

Maybe simple enough to useSubRegistry={ false } ?

@aduth
Copy link
Member

aduth commented Jul 30, 2019

I'm not able to reproduce the issue in master, however? Are you sure there's not an error with your specific reusable blocks?

@youknowriad
Copy link
Contributor Author

Interesting, we were two people reproducing the error with @getdave I might have to check again tomorrow.

@marekhrabe
Copy link
Contributor

marekhrabe commented Jul 31, 2019

I've been definitely seeing it for weeks in previews. I'm using the docker setup from Gutenberg and my reusable blocks work well when inserted. It's just the preview that's faulty

@youknowriad
Copy link
Contributor Author

youknowriad commented Aug 9, 2019

It was introduced by #16808

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Inserter The main way to insert blocks using the + button in the editing interface [Feature] Synced Patterns Related to synced patterns (formerly reusable blocks) [Type] Bug An existing feature does not function as intended [Type] Regression Related to a regression in the latest release
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants