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

Added block pattern for Podcast Grid #214

Merged
merged 5 commits into from Apr 4, 2023
Merged

Conversation

mehul0810
Copy link
Contributor

@mehul0810 mehul0810 commented Jan 21, 2023

Description of the Change

Added a block pattern for Podcast Grid with the help of Query Block. The figma design attached has Episode and Listening time for which we need to develop those custom blocks to support it.

Closes #84

Alternate Designs

Screenshot 2023-01-21 at 8 35 43 AM

Possible Drawbacks

Verification Process

Checklist:

  • I have read the CONTRIBUTING document.
  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my change.
  • All new and existing tests passed.

Changelog Entry

Credits

Props @

@mehul0810 mehul0810 requested a review from cadic as a code owner January 21, 2023 03:09
Copy link
Contributor

@cadic cadic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mehul0810 thank you for adding this block pattern.

The code looks good, but still require a few improvements.

Right now the new pattern will contain all posts by default. We could potentially filter the Query Loop block by podcasting taxonomy to only include posts which have a podcast. I suppose adding all podcasts by default will work, "taxQuery":{"podcasting_podcasts":[42,43,44]}. The user could reduce the list of podcasts if they want.

Episode and Listening Time blocks expected to be added within the current PR, as well as the cover image for each podcast.

array(
'title' => __( 'Podcast Grid', 'simple-podcasting' ),
'description' => _x( 'Podcast Grid', 'This block pattern is used to display podcast in a grid structure.', 'simple-podcasting' ),
'content' => '<!-- wp:query {"queryId":14,"query":{"perPage":3,"pages":0,"offset":0,"postType":"post","order":"desc","orderBy":"date","author":"","search":"","exclude":[],"sticky":"exclude","inherit":false},"displayLayout":{"type":"flex","columns":3}} -->
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The queryId property probably needs to be removed here, it will be auto-assigned in the block editor once added.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I made some changes:

  • Use podcast terms for query
  • Remove query ID
  • Adds podcast name
  • Use cover block featured image
  • Change category for the pattern to query (included in core)

Without building a custom block for it, listening time is not possible with existing core blocks.

@cadic cadic added this to the 1.5.0 milestone Jan 22, 2023
@jeffpaul jeffpaul added the help wanted Extra attention is needed label Feb 28, 2023
@jeffpaul jeffpaul requested a review from cadic March 9, 2023 14:56
@jeffpaul
Copy link
Member

@nateconley is there more work here or can this proceed for review?

@nateconley
Copy link
Contributor

@jeffpaul This can proceed for review if the listening time is okay to omit.

@jeffpaul
Copy link
Member

jeffpaul commented Apr 3, 2023

@vikrampm1 mind opening a follow-on issue for someone to look into adding the listening time bit?

@jeffpaul jeffpaul requested review from a team and dkotter and removed request for cadic and a team April 3, 2023 14:23
@dkotter dkotter merged commit c83468f into develop Apr 4, 2023
@dkotter dkotter deleted the feature/84-post-grid branch April 4, 2023 20:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Block Pattern: Post Grid Block
5 participants