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

Fix issue with defaults not being applied for dynamic blocks #17343

Merged
merged 2 commits into from Sep 5, 2019

Conversation

@talldan
Copy link
Contributor

commented Sep 5, 2019

Description

#16796 introduced a regression where default attributes for dynamic blocks stopped working. This change resolves that issue.

Also fixes #15487.

How has this been tested?

I looked into adding an e2e test. It's a definite possibility to test a block like the Search block, but we'd need to produce a snapshot comparing against the rendered version of a post rather than the raw version like we do for static blocks.

For now, manual testing steps:

  1. Create a new post, add a search block
  2. Preview the post
  3. Expect that the search block should render correctly in the post

Screenshots

Before

Screen Shot 2019-09-05 at 6 02 59 pm

After

Screen Shot 2019-09-05 at 6 02 22 pm

Types of changes

Bug fix (non-breaking change which fixes an issue)

Checklist:

  • My code is tested.
  • My code follows the WordPress code style.
  • My code follows the accessibility standards.
  • My code has proper inline documentation.
  • I've included developer documentation if appropriate.
@talldan talldan merged commit fcb5049 into master Sep 5, 2019
2 checks passed
2 checks passed
pull-request-automation
Details
Travis CI - Pull Request Build Passed
Details
@talldan talldan deleted the fix/defaults-not-applied-for-dynamic-blocks branch Sep 5, 2019
@talldan talldan added this to the Gutenberg 6.5 milestone Sep 5, 2019
@noisysocks

This comment has been minimized.

Copy link
Member

commented Sep 10, 2019

Good catch, thanks for fixing!

@youknowriad

This comment has been minimized.

Copy link
Contributor

commented Sep 13, 2019

@talldan do you know if this change have been packported into Core (the php change) or whether it's included in the last patch here https://core.trac.wordpress.org/ticket/47843

cc @gziolo

@talldan

This comment has been minimized.

Copy link
Contributor Author

commented Sep 13, 2019

@youknowriad Sorry, I don't know.

dd32 pushed a commit to dd32/gutenberg that referenced this pull request Sep 27, 2019
…ss#17343)

* Fix undefined variable for search block

* Use prepared attributes with gutenberg_provide_render_callback_with_block_object filter
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.