-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Add Terms Query 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
Add Terms Query block #70720
Changes from 1 commit
7e8198d
001a8ae
27a3b07
05cd427
1c28168
824d60d
97cdd68
37442c4
fbad8e3
eb6cf92
5b76c63
d2d95c6
428f355
8dba15b
77efc0b
cc5f368
5bcd841
96d2395
e29d786
f50051e
1d807da
e5fdc1e
9294f16
d75b7c0
9979371
56e244d
697b177
9a96508
dbb3d2a
f96f6f8
c0d3cda
4ed2351
677c0e8
489ec29
208ab8c
b170d83
b2023fa
755e79f
2d3b4f2
3a0801a
de054eb
844e7ed
28048ca
b973dc3
a187d83
7173f82
45dfa23
32013b6
8a0f499
a28366c
f674fd4
ee656b4
77210f4
bd974c7
2a6f7ce
9101b46
d04f9ac
8fd0ca4
972d952
ab582bf
793337e
fc9cb2d
c37da74
e321549
6e45569
47423d4
51bdfae
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
* Add term template block * Add experimental flag * Fix server sider rendering * Fix render_block_core_term_template * Update query to termQuery * Remove termType * Fix spacing * Remove showOnlyTopLevel * Fix linting * Create test fixtures * Remove editorStyle * Remove clsx * Add comment for memo * Add custom loading placeholder * Add isActiveTerm function * Handle children filtering on query level * Disable layout controls * Fix front end styling Co-authored-by: mikachan <mikachan@git.wordpress.org> Co-authored-by: cr0ybot <cr0ybot@git.wordpress.org> Co-authored-by: fabiankaegy <fabiankaegy@git.wordpress.org> Co-authored-by: scruffian <scruffian@git.wordpress.org>
- Loading branch information
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,53 @@ | ||
| { | ||
| "$schema": "https://schemas.wp.org/trunk/block.json", | ||
| "apiVersion": 3, | ||
| "__experimental": true, | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If we decide now to ship these blocks to core, I think this field is unnecessary. If we're just going to experiment on a Gutenberg PR for a while, I think a core backport PR is unnecessary.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It would be great if this block could make it into 6.9, but maybe we could keep it as experimental in Gutenberg up until the last GB version that'll be included before the feature freeze. What do you think?
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think either is fine. I might have been a bit confused, but a PR to core isn't needed in either case, right? If I recall correctly, the new block will be added automatically when the editor package is synced to core.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah you're right, this should come across with the package updates. I'll add the
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ah no sorry, I think the new block bindings data will need to be backported! But not the block itself.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ah yes, we need to add new functions, |
||
| "name": "core/term-template", | ||
| "title": "Term Template", | ||
| "category": "theme", | ||
| "ancestor": [ "core/terms-query" ], | ||
| "description": "Contains the block elements used to render a taxonomy term, like the name, description, and more.", | ||
| "textdomain": "default", | ||
| "usesContext": [ "termQueryId", "termQuery", "templateSlug", "termName" ], | ||
| "supports": { | ||
| "reusable": false, | ||
| "html": false, | ||
| "align": [ "wide", "full" ], | ||
| "color": { | ||
| "gradients": true, | ||
| "link": true, | ||
| "__experimentalDefaultControls": { | ||
| "background": true, | ||
| "text": true | ||
| } | ||
| }, | ||
| "typography": { | ||
| "fontSize": true, | ||
| "lineHeight": true, | ||
| "__experimentalFontFamily": true, | ||
| "__experimentalFontWeight": true, | ||
| "__experimentalFontStyle": true, | ||
| "__experimentalTextTransform": true, | ||
| "__experimentalTextDecoration": true, | ||
| "__experimentalLetterSpacing": true, | ||
| "__experimentalDefaultControls": { | ||
| "fontSize": true | ||
| } | ||
| }, | ||
| "spacing": { | ||
| "margin": true, | ||
| "padding": true | ||
| }, | ||
| "interactivity": { | ||
| "clientNavigation": true | ||
| }, | ||
| "__experimentalBorder": { | ||
| "radius": true, | ||
| "color": true, | ||
| "width": true, | ||
| "style": true | ||
| } | ||
| }, | ||
| "allowedBlocks": [], | ||
| "style": "wp-block-term-template" | ||
| } | ||
Uh oh!
There was an error while loading. Please reload this page.
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.
Should we have consistent plurals? Either
Terms TemplateorTerm Query? Actually maybe this way makes sense since the Query is for all terms but the template is for one.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.
This was the main reason I went with "terms" for the container block and "term" for the inner blocks, as the container is for all terms, but the inner blocks are for each individual term. But every time I've named one of the blocks I think about this 😅 I think this is pretty easy to change later, as the block is still experimental.