-
Notifications
You must be signed in to change notification settings - Fork 43
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 homepage-articles block not parsing nested inner blocks #1878
Conversation
ac6914a
to
e706ef9
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work fixing this @kevin940726! I could reproduce the issue, where the block was stuck in a loading state when viewed while editing a page within the site editor. With this PR applied, the loading state concludes and the block renders as expected in the site editor 👍
Before | After |
---|---|
The approach for recursively getting blocks sounds good to me, but it'd be good to get a second review / approval from @Automattic/newspack-product too 🙂
Hi! Any news on this? Just a friendly reminder in case I'm missing something 🙏. |
Thanks @kevin940726 and sorry for the delay. This will be added to the alphas in the next few days and should be part of the Oct 14 release. |
## [4.2.3-alpha.1](v4.2.2...v4.2.3-alpha.1) (2024-10-14) ### Bug Fixes * articles block fail to get all inner blocks ([#1878](#1878)) ([c699724](c699724)) * deprecate video playlist block ([#1903](#1903)) ([4876de6](4876de6)) * potential fatal with invalid attribute combo ([#1900](#1900)) ([adf2e9d](adf2e9d))
🎉 This PR is included in version 4.2.3-alpha.1 🎉 The release is available on: Your semantic-release bot 📦🚀 |
## [4.2.4-alpha.1](v4.2.3...v4.2.4-alpha.1) (2024-10-23) ### Bug Fixes * articles block fail to get all inner blocks ([#1878](#1878)) ([c699724](c699724)) * deprecate video playlist block ([#1903](#1903)) ([4876de6](4876de6)) * potential fatal with invalid attribute combo ([#1900](#1900)) ([adf2e9d](adf2e9d))
🎉 This PR is included in version 4.2.4-alpha.1 🎉 The release is available on: Your semantic-release bot 📦🚀 |
## [4.3.1](v4.3.0...v4.3.1) (2024-10-28) ### Bug Fixes * articles block fail to get all inner blocks ([#1878](#1878)) ([c699724](c699724)) * deprecate video playlist block ([#1903](#1903)) ([4876de6](4876de6)) * potential fatal with invalid attribute combo ([#1900](#1900)) ([adf2e9d](adf2e9d)) * update block classes for the site editor ([#1920](#1920)) ([1a07ad0](1a07ad0))
🎉 This PR is included in version 4.3.1 🎉 The release is available on: Your semantic-release bot 📦🚀 |
All Submissions:
Changes proposed in this Pull Request:
Related to Automattic/wp-calypso#91839. This will also need a sync to https://github.com/Automattic/jetpack.
The
Homepage Posts
block (or theBlog Posts
block in calypso and jetpack) won't load in the site editor. This is because the block fails to discover itself withgetBlocks
. This was partially fixed in #1066 but didn't take nested inner blocks into accounts. Since thecore/post-content
block is similar, this PR recursively callsgetBlocks
on all nested inner blocks.How to test the changes in this Pull Request:
Test with
wp-now
locally:npm install
.npm start
to build the blocks locally.npx @wp-now/wp-now start
, it should open a webpage.Homepage Posts
block at the end of the page and expect it to display correctly.Other information: