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

A Query Block is inserted when Inserting a Posts List Block #34556

Closed
maddisondesigns opened this issue Sep 5, 2021 · 3 comments
Closed

A Query Block is inserted when Inserting a Posts List Block #34556

maddisondesigns opened this issue Sep 5, 2021 · 3 comments
Labels
[Block] Query Loop Affects the Query Loop Block [Feature] Block Variations Block variations, including introducing new variations and variations as a feature

Comments

@maddisondesigns
Copy link

Description

When you insert a Posts List Block, it actually inserts a Query Loop Block instead.

screenshot_146

If this block is simply a customised version of the Query Loop Block, then you need to tell users this. Inserting a completely different block to what the user selected is confusing. If this is what it's supposed to do, then at the very minimum, don't show "Query Loop" in the Settings Sidebar for the block title.

There is zero documentation when I tried to google to find out anything about this block so I have absolutely no idea whether this is doing what it's supposed to be doing, or not. Either way, it's incredibly confusing. There isn't even any indication in the Help Panel in the Block inserter, that this block is simply a customised Query Loop block.

screenshot_148

Having multiple blocks that perform identical functions is really poor usability and confusing.

Step-by-step reproduction instructions

  1. Insert Posts List Block
  2. Look at Settings Sidebar to see that it's inserted a Query Loop Block instead

Screenshots, screen recording, code snippet

No response

Environment info

WP5.8 (No Gutenberg plugin. Core only)
TwentyTwenty
MacOS Big Sur 11.5.2
Firefox 91.0.2

Please confirm that you have searched existing issues in the repo.

Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

Yes

@Mamaduka Mamaduka added [Feature] Inserter The main way to insert blocks using the + button in the editing interface Needs Testing Needs further testing to be confirmed. labels Sep 5, 2021
@ntsekouras
Copy link
Contributor

👋 @maddisondesigns - thanks for creating the ticket.

Posts List is indeed a Query Loop's block variation and that's why it's shown in the inserter. This behavior is the same for every variation with inserter scope (or nothing as inserter is the default) like Youtube which is just a block variation of Embed block.

Query Loop is a quite new block with many enhancements planned for the future and I was wondering why seeing the Query Loop there was a problem? Besides the confusion that you describe, what was your use case, goal or expectation, that couldn't be achieved. Any more specific feedback would be really helpful.

If this is what it's supposed to do, then at the very minimum, don't show "Query Loop" in the Settings Sidebar for the block title.

Regarding the above, there is a calculation (through isActive prop in block variations API) if a block matches a block variation. In complex blocks like the Query Loop is quite hard to properly match the block and there are discussions/plans to use some variations which are configured for some basic needs, like the above. Posts List is a Query Loop configured to show posts and exclude sticky posts, which is a quite common use case for a site.

@ntsekouras ntsekouras removed the Needs Testing Needs further testing to be confirmed. label Sep 17, 2021
@maddisondesigns
Copy link
Author

maddisondesigns commented Sep 18, 2021

@ntsekouras Thanks for explaining that. My main concern is that it's confusing for users when you select one block (Posts List) and it inserts a completely different block (Query Loop).

I can understand why it's done and having a pre-configured block makes sense to make it easier for users, but the way it's done at the moment, makes it confusing.

You mention that other blocks currently work in same way, for example, a YouTube block is just a block variation of the Embed block. That may be so, but as far as your average user is concerned, the YouTube block is just another completely different block. When you insert a YouTube block, it actually shows "YouTube" in the Settings Sidebar. The user can see that the block they inserted is the one that was indeed added. This doesn't happen with the Posts List block. When you insert a Posts List block, the Settings Sidebar tells you that you've inserted a Query Loop block instead. The same goes for the List View button in the top Block Editor Toolbar (at the top of the page). If I'm searching through that to find the Posts List block that I just inserted earlier, I'm not going to find it because it's listed as a Query Loop block instead. As an end user, it's confusing when you think you're inserting one thing, and it ends up inserting something else.

screenshot_749

It either needs to say Posts List in the Settings Side (and the List View), or it needs to be made clearer that what you're actually inserting is a (customised) Query Loop block instead.

@ntsekouras ntsekouras added [Block] Query Loop Affects the Query Loop Block [Feature] Block Variations Block variations, including introducing new variations and variations as a feature and removed [Feature] Inserter The main way to insert blocks using the + button in the editing interface labels Sep 18, 2021
@ntsekouras
Copy link
Contributor

It either needs to say Posts List in the Settings Side (and the List View), or it needs to be made clearer that what you're actually inserting is a (customised) Query Loop block instead.

Makes sense @maddisondesigns ! I understand the issue here and is not an easy one to solve well.

Noting that there are already some discussions about this and the road map for Posts List and in general the handling of Query Loop and its block variations.

So I'll close this one in favor of the existing: #32268. Check it out and follow that one, for continuing the discussions in one place.

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Query Loop Affects the Query Loop Block [Feature] Block Variations Block variations, including introducing new variations and variations as a feature
Projects
None yet
Development

No branches or pull requests

3 participants