-
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
Query block: Inspiration from Drupal's Views module #25790
Comments
Hey @aristath - thanks for exploring ideas! To be honest Drupal is a CMS I haven't worked with before, but your screenshot seemed to me With my above assumption (features highlight) my thoughts are: Left column:The only thing that is not being discussed or already supported (at least partial support) is the Regarding the Middle column:
Yes this should be a simple placeholder I think, that is missing now. |
Correct. I used Drupal as an example because it may be intimidating, but at the same time it has every option under the sun. Most of them are things we won't need or won't want to do, but there are some ideas worth exploring. The 2 main things that I feel we should add is the format, and no-result-behavior. Especially the |
If things are in list form, a list item makes sense for sure. Overall I would defer to developers on the specific implementaton aspects and what features the query block should support. However I would echo that the list of features is intimidating, so even if those features are largely meant to be for the Query block alone, and to be abstracted away in patterns, or wrappers such as the Latest Posts block (at some point), and to an extent even themes, there's definitely an interesting challenge here when it comes to sorting, displaying and handling all that complexity. Perhaps uncovering it in a progressive way — adding a property/filter with a plus button when you need it — may be a good way to do that. |
The Query block should be entirely agnostic regarding formatting. Formatting should come from individual blocks (like "Latest Posts") or other containing elements. |
Does that imply that the query block will be "hidden", and users will be interacting with it via "proxy" blocks (like latest-posts)? |
My point is the query block itself shouldn't have markup. |
@aristath thanks for doing some competitive analysis to spark inspiration. I really appreciate that. In regards to "Format" and switching out different layouts for the Query block, I've created an issue here: #25750 I recently explored using the Transform Tool to help surface these patterns. Please drop some feedback there when you can. :) |
The |
I thought just a div should be there so as to be able to add the sole display option of Query block for switching to related comment: #25462 (comment) |
The way I can make this work right now is by wrapping the query block in a group, then nest all post blocks inside another group, add a custom css class to the group wrapping the query block and then style it. |
I agree with this point. 👍 There needs to be a wrapper of sorts that handles the repeating pattern of blocks. Unless of course, we just use a Group block to provide that wrapper. |
Building on @mapk 's comment #25750 (comment) (Always thinking from developer's perspective) Wouldn't it be possible to:
Of course it would be nice to change directly the Markup of the Is anything possible like: if(block_paramater('layout')=='grid'){
render_block('query'){
[CHANGES here]
};
render_block('query_loop'){
[CHANGES here]
};
} of even |
@aristath, amazing work doing this exploration. Is there anything actionable here that we should include in the tracking issue #24762? I personally can see two items that stand out:
I think @ntsekouras had PR opened that explores grid view in the Query block.
If there isn't an item filed, we should do it. Otherwise, it feels like we can close this issue once we create follow-up tasks. |
While working with the query block and FSE themes I thought I'd give a look at what other CMSs do... Particularly Drupal.
Drupal has a "views" module. It's far more advanced than what we're trying to achieve with the query block, but it does have some good ideas. Its UI is more developer-oriented, and is not WYSIWYG, but I'll post a screenshot of its options below:
Left Column:
<ul><li>
items. Tables can come later, but it's important we have them as lists. Not everything is supposed to be a<div>
on the web, and most themes (non-FSE themes) print lists on brogrolls 'cause that's what makes sense semantically.Middle Column:
Right Column:
cc @ntsekouras @mapk
The text was updated successfully, but these errors were encountered: