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

Increase number of items per page for default Query Loop Block #32638

Closed
annezazu opened this issue Jun 11, 2021 · 13 comments · Fixed by #35603
Closed

Increase number of items per page for default Query Loop Block #32638

annezazu opened this issue Jun 11, 2021 · 13 comments · Fixed by #35603
Labels
[Block] Query Loop Affects the Query Loop Block Good First Issue An issue that's suitable for someone looking to contribute for the first time [Status] In Progress Tracking issues with work in progress [Type] Enhancement A suggestion for improvement.

Comments

@annezazu
Copy link
Contributor

What problem does this address?

As part of the seventh call for testing for the FSE Outreach Program, this item of feedback came in:

There’s a bit of a confusion point in the Query Block with Items per Page. Despite having multiple published posts only one appeared by default. I found the controls in the Block Toolbar to increase, but also found it a bit cumbersome to toggle between the Block Toolbar and Block Sidebar to refine the underlying query.

Specifically, I can replicate that only one item appears upon adding the Query Loop Block. Here's the current process:

default.query.mov

What is your proposed solution?

Because this block is meant to highlight how you can query a set of posts or pages, it seems wise to have it show multiple by default. I'm not sure if this is a technical limitation or an intentional UX decision but, since I didn't know, I figured I'd open the discussion up :)

@annezazu annezazu added [Type] Enhancement A suggestion for improvement. [Block] Query Loop Affects the Query Loop Block labels Jun 11, 2021
@annezazu
Copy link
Contributor Author

More related feedback from the same call for testing to include:

The default number of query results shown is set to one. At first glance, it wasn’t obvious to me that I have to go into settings to increase that. My expected behavior was that it shows 3-5 results and adds a pagination automatically. So it was also a little odd to have to add that manually. If that’s difficult to implement technically, some hint text might be helpful …

@annezazu
Copy link
Contributor Author

More feedback from the same call for testing. This was a key area of repeated feedback:

I was able to create a working 2 column portfolio using query blocks, but when viewing the actual page there’s only one post and not all the ones from the post category I selected. I figure there’s a way to select more, but if it’s not clearly visible on the sidebar while I’m editing the related query block, I don’t really care if the feature is hidden somewhere, as I figure the average user would just quit and not bother further. The option might be in front of my eyes, but I just can’t see it.

@javierarce
Copy link
Contributor

Because this block is meant to highlight how you can query a set of posts or pages, it seems wise to have it show multiple by default. I'm not sure if this is a technical limitation or an intentional UX decision but, since I didn't know, I figured I'd open the discussion up :)

It is also unclear why this is happening, but I don't think it's a technical decision because some versions (like Offset and Large Title) showcase more than one post by default.

Maybe the idea was to show an initial default that is not very tall? In any case, I think it would be better to increase the default number of posts in that version to something like 3 (so the preview is not too tall, but it can help users understand that it could be customized). I can also imagine redesigning the placeholder state with some extra controls for the number of items and offset, so people can customize the block before adding it to the page.

@javierarce
Copy link
Contributor

javierarce commented Jun 24, 2021

Regarding this feedback:

I was able to create a working 2 column portfolio using query blocks, but when viewing the actual page there’s only one post and not all the ones from the post category I selected. I figure there’s a way to select more, but if it’s not clearly visible on the sidebar while I’m editing the related query block, I don’t really care if the feature is hidden somewhere, as I figure the average user would just quit and not bother further. The option might be in front of my eyes, but I just can’t see it.

That is something I've also found in my initial exploration of the Query Block and I find it puzzling: if a user clicks on "Start Blank" and then selects one of the four available variations (Title & Date, Title & Excerpt, Title, Date, & Excerpt or Image, Date, & Title), then there's no way to crease or decrease the number of items in the block or change the offset. ~~

This is something that doesn't happen when picking a variation from the initial placeholder selection. If that's not a bug, it seems like a strange design decision to me.

Update on 07/05: this wasn't a bug, but me not understanding the way the "Inherit query from template" works 😅

@ntsekouras
Copy link
Contributor

That is something I've also found in my initial exploration of the Query Block and I find it puzzling: if a user clicks on "Start Blank" and then selects one of the four available variations (Title & Date, Title & Excerpt, Title, Date, & Excerpt or Image, Date, & Title), then there's no way to crease or decrease the number of items in the block or change the offset. ~~

The behavior of Query Loop patterns and variations regarding inherit value will be consolidated with this PR: #33163

@javierarce
Copy link
Contributor

Thanks, @ntsekouras. I was confused when I started testing and comparing the different loop variations.

@carolinan
Copy link
Contributor

Hi
The default, and the number of posts shown in the carousel, is now 3 posts, can this issue be closed?

@ntsekouras
Copy link
Contributor

The default, and the number of posts shown in the carousel, is now 3 posts, can this issue be closed?

This is different. There are some patterns that have set the number of posts to 1 and the selection of the results to showing only one. This is a bit challenging to tackle as there are two cases of patterns having one as per page:

  1. The pattern is intended to show a simple list and has set the number to one to be less overwhelming
  2. The pattern has multiple Query Loop blocks and uses a different design/layout for a post in combination with another Query Loop block with offset.

I guess it would be better not to try to be smart about this and probably leave this for patterns to handle. What we could do though would be to change the number of posts to three (where is needed) in the Query Loop core patterns.

--cc @kjellr

@annezazu
Copy link
Contributor Author

annezazu commented Oct 6, 2021

As part of the tenth call for testing, more feedback came in around this topic that I'll pass on below:

I viewed the page and could only see the one post. I expected to see all the posts.

I was also initially surprised by 1 item per page as the default, and it took me a moment to find the settings again to change it.

Using Site Editor, at first adding Query Loop Block will automatically add 1 post only and it’s difficult to find where to change the settings to add more posts.

I imagine this is going to continue to cause confusion, especially at scale when the block is used more.

@andrewserong
Copy link
Contributor

andrewserong commented Oct 7, 2021

I found the controls in the Block Toolbar to increase, but also found it a bit cumbersome to toggle between the Block Toolbar and Block Sidebar to refine the underlying query.

I ran into this today while testing. I wonder if it'd help for us to duplicate the settings in the toolbar in the settings in the sidebar, for visibility. When I looked at the Settings panel in the sidebar I expected that all the controls would be available there, but it took me a while to find the Items per Page setting in the toolbar, and then it felt a bit awkward tweaking settings in two different places for me, too.

@carolinan
Copy link
Contributor

But I believe that is tracked in this issue #25198

@andrewserong
Copy link
Contributor

Ah, perfect, thanks for linking me to the right place @carolinan!

@kjellr
Copy link
Contributor

kjellr commented Oct 7, 2021

I guess it would be better not to try to be smart about this and probably leave this for patterns to handle. What we could do though would be to change the number of posts to three (where is needed) in the Query Loop core patterns.

Yeah, I think this is the best route — it'll give folks a more realistic sense of the patterns: what you see in the preview is what you get.

@ntsekouras ntsekouras added the Good First Issue An issue that's suitable for someone looking to contribute for the first time label Oct 8, 2021
@github-actions github-actions bot added the [Status] In Progress Tracking issues with work in progress label Oct 13, 2021
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 Good First Issue An issue that's suitable for someone looking to contribute for the first time [Status] In Progress Tracking issues with work in progress [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants