-
Notifications
You must be signed in to change notification settings - Fork 0
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
[BLOCK] Custom Query Loop #7
base: main
Are you sure you want to change the base?
Conversation
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.
@GeoffDusome I'm going to continue going through this but want to leave individual comments as I do.
I left a few small thoughts here for now. Also, I wanted to share this screencast of a bug I encountered on the admin side.
|
||
.page-numbers:not(.dots, .next, .prev) { | ||
|
||
@mixin t-body; |
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.
I wonder if we should think about doing this differently. I know these are intended to be used only with Moose, but it feels a little uncomfortable to be relying on mixins and variables from a different codebase where they may change or not be present at all.
<h2 class="p-card-search-result__title t-display-x-small" style="margin-top: 0; margin-bottom: var(--wp--preset--spacing--10)"><?php echo get_the_title( $id ); ?></h2> | ||
|
||
<p class="p-card-search-result__excerpt"><?php echo get_the_excerpt( $id ); ?></p> | ||
|
||
<p class="p-card-search-result__permalink t-caption" style="margin-top: var(--wp--preset--spacing--20); color: var(--color-neutral-60)"><?php echo get_the_permalink( $id ); ?></p> |
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.
Don't forget to escape these.
<FormTokenField | ||
__next40pxDefaultSize={ true } | ||
label={ __( 'Post Types', 'tribe' ) } | ||
value={ postTypes } | ||
suggestions={ postTypeSuggestions() } | ||
onChange={ ( tokens ) => { | ||
setPostTypes( tokens ); | ||
} } |
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.
I am finding these form token fields a little confusing to use. Maybe we can add more helper text or change the control type? It just wasn't clear to me that typing would bring up a list of available post types.
} } | ||
/> | ||
{ postTypes !== null && postTypes.length > 0 ? ( | ||
<FormTokenField |
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.
Same comment here about the form token field
Custom Query Loop
What does this do/fix?
A dynamic block with some supporting components to create the ability to define a custom query loop that gives us more features than that of the core Query block.
How can this be quickly implemented for testing?
block
directory to thethemes/core/blocks/tribe/custom-query-loop/
directory.components
directory to thethemes/core
directory.tribe/custom-query-loop
block to theself::TYPES
array inplugins/core/src/Blocks/Blocks_Definer.php
.npm run dist
to build the block.Media