-
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-posts): post fetch for widget blocks #1066
Conversation
@@ -173,7 +173,8 @@ export const postsBlockSelector = ( select, { clientId, attributes } ) => { | |||
const { getBlocks } = select( 'core/block-editor' ); | |||
const editorBlocksIds = getEditorBlocksIds( getEditorBlocks() ); |
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.
getEditorBlocks()
returns an empty array while in the widget editor, that's why another method for detecting the widget editor is used below.
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.
👍
# [1.47.0-alpha.1](v1.46.1...v1.47.0-alpha.1) (2022-03-31) ### Bug Fixes * **author-list:** handle alphabetizing last names containing spaces ([#1057](#1057)) ([1af7e19](1af7e19)) * authors and guest authors in homepage posts ([#1083](#1083)) ([038d9a4](038d9a4)) * donate block non-default styles grid breakpoint ([#1078](#1078)) ([5450e57](5450e57)) * **homepage-posts:** post fetch for widget blocks ([#1066](#1066)) ([3734a3f](3734a3f)) ### Features * add alternate and minimal styles to donate block ([#1068](#1068)) ([3c914d2](3c914d2))
🎉 This PR is included in version 1.47.0-alpha.1 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
# [1.47.0](v1.46.1...v1.47.0) (2022-04-05) ### Bug Fixes * **author-list:** handle alphabetizing last names containing spaces ([#1057](#1057)) ([1af7e19](1af7e19)) * authors and guest authors in homepage posts ([#1083](#1083)) ([038d9a4](038d9a4)) * donate block non-default styles grid breakpoint ([#1078](#1078)) ([5450e57](5450e57)) * **homepage-posts:** post fetch for widget blocks ([#1066](#1066)) ([3734a3f](3734a3f)) * incorrect nesting of tax_query args ([#1087](#1087)) ([a613874](a613874)) ### Features * add alternate and minimal styles to donate block ([#1068](#1068)) ([3c914d2](3c914d2))
🎉 This PR is included in version 1.47.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
All Submissions:
Changes proposed in this Pull Request:
While adding a Homepage Posts or Carousel block to a widget area through the new block-based UI you get placeholder content instead of fetching actual posts.
This PR makes the necessary changes for these blocks to perform the posts fetch on the widget editor.
How to test the changes in this Pull Request:
npm run build
and confirm the posts are fetchedOther information: