-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
WIP: Add query description block #29609
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.
Thanks for working on this @carolinan !
I have thought about this (not in depth though) when working on Query Title: #29428 and #27989.
TLDR: This block and Query Title should probably handle more cases, which are not identified yet, with the exception of a Search Title
and probably a Search description (?).
I think there are two alternatives here:
- Use block variations here as well
- I was thinking that we might be able to just use Query Title and have an option to show description, based on its variation.
What do you think?
export const settings = { | ||
title: _x( 'Query Description', 'block title' ), | ||
description: __( | ||
'Displays a description for the term.' |
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 is very specific to term
queries.
I don't think there is anything like a search description? |
Also if these are not separate blocks, then it will be much more difficult to handle alignments, font sizes, colors, line height, padding and whatever else we can come up with. |
Currently, there is no such thing as a @ntsekouras I don't understand what the title has to do with term descriptions... 🤔 Can you please elaborate? |
I can't come up with a scenario where the description would be used without the query block - or without the title 🤔 For example if a shop plugin would display different products below a description, it would still be using a query, no? |
When I started working on
Agree. |
Anyway, no matter what block that is used, where I really got stuck was when I tried to find a way to display the correct text, and not a placeholder, in the editor. |
In the alternative PR on #29613 the block can be used outside a query... So you can have for example an {TERM NAME HERE}
<!-- wp:term-description /-->
<!-- wp:query {"queryId":0,"query":{"inherit":true}} -->
..... The term-description doesn't need to be inside the query itself, it's a generic block. |
That works on the front, but not the editor, unless you also want an option where you select which term to show the description for. |
But it doesn't need to be editable... At least not for an MVP - which is what we're trying to accomplish. The block can show a placeholder on the editor and the proper description on the frontend. Not everything needs to be editable on the site-editor.... |
I agree with that. That's what I have for Archive Title as well. |
Thanks for your work Carolina and your help with the other PR and Query Title 💯 |
Description
How has this been tested?
Screenshots
Types of changes
Checklist: