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

@talldan talldan 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 requested a review from epiqueras September 5, 2019 10:08
@talldan talldan self-assigned this Sep 5, 2019
@talldan talldan added [Type] Bug An existing feature does not function as intended [Feature] Blocks Overall functionality of blocks [Priority] Highest (OMGBBQ) Used to indicate widespread, critical issues that need immediate attention [Type] Regression Related to a regression in the latest release labels Sep 5, 2019
@talldan talldan merged commit fcb5049 into master Sep 5, 2019
@talldan talldan deleted the fix/defaults-not-applied-for-dynamic-blocks branch September 5, 2019 23:58
@talldan talldan added this to the Gutenberg 6.5 milestone Sep 5, 2019
@noisysocks
Copy link
Member

Good catch, thanks for fixing!

@youknowriad
Copy link
Contributor

@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
Copy link
Contributor Author

talldan commented Sep 13, 2019

@youknowriad Sorry, I don't know.

@youknowriad youknowriad added the Backport to WP 6.7 Beta/RC Pull request that needs to be backported to the WordPress major release that's currently in beta label Sep 13, 2019
@jorgefilipecosta jorgefilipecosta removed the Backport to WP 6.7 Beta/RC Pull request that needs to be backported to the WordPress major release that's currently in beta label Feb 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Blocks Overall functionality of blocks [Priority] Highest (OMGBBQ) Used to indicate widespread, critical issues that need immediate attention [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 this pull request may close these issues.

Search block with no button content
5 participants