-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Add Terms Query container block #70720
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
base: trunk
Are you sure you want to change the base?
Conversation
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.
To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
Size Change: +1.16 kB (+0.06%) Total Size: 1.91 MB
ℹ️ View Unchanged
|
@mikachan Are we sure that we want to utilize the I'm also not sure how the query arg |
Ah I see, in that case I think something like
Yes, these are essentially the same display option, and they can probably be consolidated. I was using |
|
||
return ( | ||
<> | ||
<InspectorControls> |
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.
Why not put InspectorControls
inside the TermsQueryInspectorControls
component?
What?
Part of #49094.
This adds a new container block called Terms Query, similar to the Query block but for terms rather than posts. This can be tested as part of a larger PR at #70682. It is designed to contain a new Terms Template block, which can then hold inner blocks for displaying each term.
I haven't created a Core backport PR yet as I'm not sure if this is the right approach for this block. I'll make sure to open one before this PR is merged.
Why?
To allow for more options and flexibility when displaying terms.
How?
This block allows for inner blocks and has a wider potential for extensibility compared to the Categories/Terms List block.
I've tried to keep the implementation as simple as possible so we can build up the functionality as we add the other blocks. For the inspector controls, I've tried to stay as close as possible to the options provided by the Categories List block.
Testing Instructions
This block is difficult to test in isolation, so a working example can be seen in #70682. This block doesn't really do anything on its own other than provide some block settings for the terms query.
For this first PR:
Screenshots or screencast