Skip to content
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

Consolidating the Query Loop block, Latest Posts block and Post Lists block #32332

Open
Tracked by #41405
paaljoachim opened this issue May 28, 2021 · 8 comments
Open
Tracked by #41405
Labels
[Block] Latest Posts Affects the Latest Posts Block [Block] Page List Affects the Page List Block [Block] Post Content Affects the Post Content Block [Block] Query Loop Affects the Query Loop Block Needs Design Needs design efforts. [Type] Enhancement A suggestion for improvement.

Comments

@paaljoachim
Copy link
Contributor

Description

At the moment there exists three blocks that to me seems to do the same thing.
The Query block, Latest Posts block and the Post Lists block.

Post-lists

It seems like the settings vary a bit between the blocks as well.

My expectation is to have one block that covers what is needed to show Posts or a CPT, with a few different filters on how I would like to show the Posts/CPT on each page. Having three block options to choose from is very confusing.

Consolidating the three blocks into one block would be helpful, as a user would then be able to select the specific block to do what is needed to show the specific content.

@paaljoachim paaljoachim added [Block] Latest Posts Affects the Latest Posts Block [Block] Query Loop Affects the Query Loop Block [Type] Enhancement A suggestion for improvement. labels May 28, 2021
@mrfoxtalbot
Copy link

I would argue that the Page List block should also be merged/consolidated.

Screenshot 2021-06-06 at 12 16 27

@paaljoachim paaljoachim added the [Block] Page List Affects the Page List Block label Jun 6, 2021
@javierarce
Copy link
Contributor

javierarce commented Jun 28, 2021

Combining those four blocks into one is a great idea.

In the case of Post Lists block, it would be quite easy since it’s the same block under a different name. 



Page List block would also be trivial to combine, and the users would benefit from having more control over the results since this block just spits out a list of all the pages the user has.



The only thing users would lose if we got rid of this block would be the possibility to create a bulleted list, something that I’m not sure it’s possible to achieve in an easy way using the Query block.


Latests Posts (LP) would be a little more difficult to remove right away because it has some nice settings that are a bit difficult to achieve with the Query block

.

Here’s a table with the equivalent methods and some pros/cons for the alternative method in the Query block (QB):

LP setting QB solution QB pros QB cons
Dividers Separator block Users can change the type of border and its color The divider has a fixed width.
Border Grouping the post and setting the border More options to change the type of border Difficult for the average user?
Post Content Post Content block
Excerpt Post Excerpt block It's not possible to set the maximum number of words
Author Post Author block It gives more configuration options like avatar, bio, or byline
Post Date Post Date block Gives more customization options like date format, color, typography, or even link it to the post
Featured image Post Featured Image block The block gives less control over the image than the Latest Posts block, where users can change width, show thumbnail or full image, etc. There's a ticket that will solve this.

Finally, the Latest Posts filters are similar to the ones in the Query block, but in the Latest Posts block, users can change the number of items from the sidebar.

@javierarce
Copy link
Contributor

While I was thinking about this issue, I thought of another idea: instead of consolidating these blocks into one, would it make sense to leave them as independent blocks but make them all use the Query block internally? The only difference would be that initially, they would have different settings to render each kind of list.

@paaljoachim paaljoachim added the Needs Design Needs design efforts. label Jun 28, 2021
@javierarce
Copy link
Contributor

After thinking for a while about this issue, I think that my second idea makes more sense. The basic Query block should be a powerful and "content agnostic" block, probably more oriented towards advanced users with specific needs (like theme developers).

The other blocks would use the Query block internally but start with a different set of defaults, reducing the number of blocks to maintain and offering a similar experience to the user while at the same time helping them to find an appropriate block faster.

Another important thing we'd need to pay attention to is the name of the block in the sidebars. Right now, if a user inserts a Posts List block, the List view and the right sidebar show "Query Loop", making the interface disorienting.

Screenshot 2021-07-05 at 14 04 47

@javierarce
Copy link
Contributor

I found this ticket by @jameskoster that has a more comprehensive list of enhancements and ideas about the Post List block #32268

@paaljoachim paaljoachim added the [Block] Post Content Affects the Post Content Block label Nov 6, 2022
@annezazu annezazu changed the title Consolidating the Query block, Latest Posts block and Post Lists block Consolidating the Query Loop block, Latest Posts block and Post Lists block Nov 29, 2023
@jarekmorawski
Copy link

FWIW, we faced a similar issue with the Product Collection block in WooCommerce. We decided to merge all block variations into one and surface them in the Inspector and block toolbar.

image

Happy to provide more information and the designs if you're interested.

@paaljoachim
Copy link
Contributor Author

Hey @jarekmorawski

Thank you for the feedback to various issues! It is greatly appreciated!
Do please add the designs.

Thank you again!

@andreawetzel
Copy link

Noting that the Posts Lists variation was removed in 6.7 #63404

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Latest Posts Affects the Latest Posts Block [Block] Page List Affects the Page List Block [Block] Post Content Affects the Post Content Block [Block] Query Loop Affects the Query Loop Block Needs Design Needs design efforts. [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

No branches or pull requests

5 participants