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

Query Loop Block Improvements #30910

Closed
5 of 11 tasks
mtias opened this issue Apr 16, 2021 · 13 comments
Closed
5 of 11 tasks

Query Loop Block Improvements #30910

mtias opened this issue Apr 16, 2021 · 13 comments
Labels
[Block] Query Loop Affects the Query Loop Block [Type] Tracking Issue Tactical breakdown of efforts across the codebase and/or tied to Overview issues.

Comments

@mtias
Copy link
Member

mtias commented Apr 16, 2021

These are some notes for tracking improvements to Query block.

Prioritized for WordPress 5.8:

The "inherit query" setting is very obscure. There's a few things we need to address there:

The other part that is tricky is the live editing. It can be super useful for some contexts but it is a bit too much as a default.

Currently the relationship between Query and Loop is still a bit confusing. I'd propose making some adjustments to the names:


Follow up iterations

Expand on the editing flow by having something similar to the isolated part or modal view as a way to edit both the template and content. Related to:

@mtias mtias added [Type] Tracking Issue Tactical breakdown of efforts across the codebase and/or tied to Overview issues. [Block] Query Loop Affects the Query Loop Block labels Apr 16, 2021
@priethor
Copy link
Contributor

Make "editing" an optional setting and disabled by default.

It could also be worth exploring a "click-through" interface like with reusable blocks in #29337

@ntsekouras
Copy link
Contributor

Consider again the implementation of the "Posts List" variation.

What do you mean here?

@jameskoster
Copy link
Contributor

It could also be worth exploring a "click-through" interface like with reusable blocks in #29337

I believe this is only one half of the editing consideration. The click-through will help in terms of boundaries and general selection interactions, but there is also the contents of the innerblocks (IE the actual post content) to think about. Editing the title of post B while editing post A can be quite confusing.

@mtias
Copy link
Member Author

mtias commented Apr 26, 2021

@ntsekouras having a version of Query that doesn't include the inner Loop (because it doesn't need to show prev/next links nor query titles) and is called "Post List" or something similar to that, allowing us to treat Query as the building block for themes but something more familiar (like Latest Posts) for users.

@youknowriad
Copy link
Contributor

Is there any important remaining thing here that is mandatory in 5.8? Should we remove this issue from the board?

@Clorith
Copy link
Member

Clorith commented May 26, 2021

Looking at the checklist in the initial post, there's still a fair bit of outstanding issues (or just needs an update), most importantly I would say is the edit feature.

I've noticed this is still on by default, and will lead to user confusion (if I edit something in a page, I expect it to be within the context of that page, not that it changes globally on my site). Even with the extra checkboxes for "are you sure you want to update these secondary pages", they're checked by default, and I often don't second-guess the confirmation screen, I should use it for a double-check, but to me it's become "just another double-click I need to make".

@jameskoster
Copy link
Contributor

Make "editing" an optional setting and disabled by default.

I'd like to propose the solution in #31461 (comment) for this. The use case is virtually identical.


I wonder if we can decrease reliance on the confusing "inherit query from URL" option through contextual variations. Similar to what we've done with the Header / Footer template parts.

When editing a post, I would never want a query to inherit from the URL. Also, the UX to display a post list relies on the user inserting a "Query" block... this is not very intuitive. I would suggest:

  • The Query block cannot be inserted in to posts at all, and is strictly a template-only block.
  • Instead, I can insert a "Posts" block which is a Query variation and shares most properties. The exceptions being: it has a relevant icon / description, and the "inherit from URL" option is removed entirely.

When editing a template, you will want the query to inherit from the URL most of the time. So we can just make that the default, and move the option to the "Advanced" panel. In fact... if we implement post-type variations as outlined above, we can probably remove this confusing option altogether. The result is:

  • If you want to insert a post list in a template or a page, you insert the "Posts" block (which is a Query variation).
  • If you want to insert a query that inherits from the URL in a template, you insert the "Query" block.

@priethor
Copy link
Contributor

Is there any important remaining thing here that is mandatory in 5.8? Should we remove this issue from the board?

I think there are still a couple of things that should be addressed before 5.8, like changing the block name, clarifying the inheritance option, and disabling editing by default.

@jameskoster
Copy link
Contributor

jameskoster commented May 26, 2021

I think there are still a couple of things that should be addressed before 5.8, like changing the block name, clarifying the inheritance option, and disabling editing by default.

I put a design prototype together that explores some of these issues. Many of the concepts we've been working on for the template editor can potentially be applied here as well.

Sound on:

Query.block.mp4

Click-through pattern for template parts and reusable blocks: #31109
Content-locking: #31461

Edit: I realise that a variation to display posts wouldn't support pagination, so we could simplify the structure significantly in that use case by removing the template block:

Screenshot 2021-05-26 at 19 15 15

@youknowriad
Copy link
Contributor

Removing this from the 5.8 broad as I believe we got all the 5.8 targeted improvements in already.

@mtias mtias mentioned this issue Jun 30, 2021
57 tasks
@annezazu annezazu changed the title Query Block Improvements Query Loop Block Improvements Oct 18, 2021
@annezazu
Copy link
Contributor

Feedback from the FSE Outreach Program consistently points to confusion around what settings live in the block toolbar vs the settings in the sidebar. For example, folks seem to expect the ability to change the number of items shown in the sidebar rather than the toolbar. Could an audit of these various settings (including their naming) be added to this issue to help improve the experience?

@priethor
Copy link
Contributor

Added prioritized items for WordPress 5.9, as the Query block will be instrumental in block theme building.

@priethor
Copy link
Contributor

priethor commented Dec 2, 2021

De-prioritized items from WP 5.9 and moved them down to the further iterations section.

Because there is only a handful of improvements left, we can close this tracking issue and continue work on the specific tickets. 🚀

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 [Type] Tracking Issue Tactical breakdown of efforts across the codebase and/or tied to Overview issues.
Projects
None yet
Development

No branches or pull requests

7 participants