-
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
Update and move some Query filters #25674
Conversation
Size Change: +532 B (0%) Total Size: 1.17 MB
ℹ️ View Unchanged
|
@ntsekouras Haiii! Thanks for looping me into this one. I can see where you had some trouble with the CSS alignment/widths for these controls x labels. Short note: I've made some updates to the base Lastly, spacing for controls have always been determined with Ideally, you should not have to write custom Longer notes: The coupling of labels and controls within Gutenberg's input-based components are too tightly coupled. This leads to either awkward or limited alignment and width styling (both of which you experienced). Ideally, the widths and alignment for these controls should be standardized, following some sort of grid-based layout (predetermined by the UI system). For advance/custom use cases, the individual "parts" (e.g. |
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.
Tested code and confirmed it works.
I did have trouble with an FSE theme and got the This block has encountered an error and cannot be previewed.
error on the site-editor screen, but I suppose that is OK?
Since FSE is experimental and this block is also experimental and only available when the FSE experiment is enabled, we don't really have to worry about backwards-compatibility.
Code looks good to me 👍
Hey @aristath - thanks for reviewing.
Do you mean with a previous existed query block? I'd like to have a look at it.
Yes, I think we are okay, since there is going to be a lot of changes soon in Query block. |
The issue was in the query block I had in my theme's <!-- wp:query {"queryId":1,"query":{"perPage":10,"offset":0,"orderBy":"date"}} -->
<!-- wp:query-loop -->
<!-- wp:post-title {"isLink":true,"linkTarget":"_self"} /-->
<!-- wp:post-content /-->
<!-- /wp:query-loop -->
<!-- wp:query-pagination /-->
<!-- /wp:query --> |
Description
Based on many iterations for Query block design here: #25198 and slack channels etc, it seems that filtering will end up in the inspector controls. Although the final design has not yet been found and approved, I think it makes sense to move some of the options we already have in the inspector control to make the Query toolbar less crowded.
This PR also makes a couple of changes.
template
used in Query block from [PostTile, PostContent] to [PostTitle, PostDate, PostExcerpt] that seems to make more sense IMO.tags and categories
to show the input control.posts per page
andoffset
inNumberControls
.posts_per_page
number from options.Checklist: