-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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 search in Query block #25222
Add search in Query block #25222
Conversation
Size Change: +68 B (0%) Total Size: 1.2 MB
ℹ️ View Unchanged
|
267d64e
to
bbf6435
Compare
Taking a look at this, I'm uncertain what benefit adding a search field provides for the block. @ntsekouras, I imagine that if a Query block is used on a search template ( I tested this and it works, but I'm not sure why I'd want to use this. When typing in a keyword, the list filters to show only posts with that keyword. I saw that it changed because the list changed. But what happens if the list doesn't change? How does the user know entering the keyword in the search field worked? It seems to me like this use case should really be limited to categories, tags, taxonomies, etc. and not used in relation to a search field. Here's my experience |
Hey @mapk.
I'm not really sure yet how all these will come together eventually, but for now the the implementation still seems relevant. The
This is another matter to discuss that applies to every change in the |
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 works very well, but only to provide a way to use search programmatically via attributes to filter the query results. Design wise it is very bare-bones. It also makes little sens why search is in the block controls area and author is in the inspector controls area, both being filters.
Thanks for reviewing @draganescu!
Yes, I know, but there is a lot of discussions/iterations happening lately (related issue by @mapk ) about the design and I believe soon we will have some decisions to change the UI as well. |
I'm still unclear on how search should work here. I just can't imagine this scenario. I understand the flow for an end user to land on the @draganescu are you saying this ability should be purely programmatic? Should we remove any user facing UI for this? |
I think its base use case would be in any random page (homepage, any simple page etc..) that a user would like to have a list of posts with some keywords. The search query searches title, content etc.. and while it could be achieved with The front end outpout would not be a |
Description
This PR will add search support in Query block and is part of #24934 and FSE milestone 5.
There still needs to be a decision about the final design of Query block which is in this issue: #25198.
For now I've added the search control in the toolbar.
This PR also fixes a React warning about passing
null
to a select component forauthors
list.Checklist: