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: Number of pages settings are too restrictive #26550

Closed
mapk opened this issue Oct 28, 2020 · 7 comments
Closed

Query: Number of pages settings are too restrictive #26550

mapk opened this issue Oct 28, 2020 · 7 comments
Labels
[Block] Query Loop Affects the Query Loop Block Needs Dev Ready for, and needs developer efforts Needs Technical Feedback Needs testing from a developer perspective.

Comments

@mapk
Copy link
Contributor

mapk commented Oct 28, 2020

Problem

Currently, the "Number of pages" control requires the user to set the exact number of pages they want to include in the query.

Screen Shot 2020-10-28 at 11 47 24 AM

This is a problem because many times the user might want to include all posts that match their settings and may not know the exact number they need to type as the page count.

Solution

I realize that the Pagination block should be one the user can add, duplicate, and move around (hopefully from within the Query block). But the setting should be a simple toggle to turn on or off pagination, not an input field. Maybe in the block itself, a user can adjust whether or not they want "All" pages or limit this by a particular number.

Can we try something like this?

pagination

I also imagine the Pagination block would provide the same options as other blocks such as "Duplicate" allowing more than one Pagination block and moving it to above or below the list.

Screen Shot 2020-10-28 at 12 35 06 PM

cc @ntsekouras @mariohamann

@mapk mapk added Needs Design Feedback Needs general design feedback. Needs Technical Feedback Needs testing from a developer perspective. [Block] Query Loop Affects the Query Loop Block labels Oct 28, 2020
@mariohamann
Copy link

mariohamann commented Oct 28, 2020

  • I wasn't aware of the concept of "Number of pages". In my opinion, this option doesn't make sense. Is this option still available? In the loooong discussion in Query block: Toolbar control revisions #25198 (comment) it seemed to be abandoned very early? (Is this option available in REST?)
  • I totally second the idea that the pagination block should be inside the Query Block – I think that makes things easier in technical terms.
  • I like the interaction to add a pagination Block and I like the concept of adding more than one pagination block. Instead of a Boolean: What do you think about an "Add button"? I think in that case we could add a pagination block per default (Currently it would feel strange to have pagination active per default, but in FSE it would be quite useful.) Edit: This interaction could make a lot of sense: In the current flow the Pagination block is just gone if a user deletes it – but the pagination option is still active. So one would have to switch pagination off and switch pagination on again to get the pagination block back? I think a simple "add pagination" button which creates the default block and makes pagination possible could be handier in the long run.

Screen Recording 2020-10-28 at 21 45 56

Further thoughts

  • Will pagination be available outside of FSE? That wouldn't work, would it?
  • To show the Top 10 of posts, users would select "10 posts per page" and "No pagination". Quick thought concerning the labels: Might it the label "posts per page" irritate if there is only one page?

@mapk
Copy link
Contributor Author

mapk commented Oct 29, 2020

Thanks, @mariohamann!

I like the interaction to add a pagination Block and I like the concept of adding more than one pagination block. Instead of a Boolean: What do you think about an "Add button"?

I believe the Inserter (panel and/or inline) would solve this. Here's a screenshot of how it is right now.

Screen Shot 2020-10-29 at 11 13 54 AM

The initial idea behind the toggle in the toolbar was about turning pagination on... not so much around adding pagination, although it did that as well. :)

I did receive some feedback today from @jameskoster and @MichaelArestad about including the Pagination block in the Query block by default. And if the user doesn't want it, they can just delete that block. Here's how that might work.

pagination

@MichaelArestad
Copy link
Contributor

Could we remove the number of pages setting? This seems like information that should be passed to the pagination block somehow without a user needing to specify.

@jameskoster
Copy link
Contributor

Isn't the Number of pages setting is entirely redundant?

I'd have thought it would be calculated automatically – total number of posts returned by query / number of posts displayed per page = number of pages

@mapk
Copy link
Contributor Author

mapk commented Nov 3, 2020

@ntsekouras can we get to this point where the Pagination block is added by default to the Query block? And then if we can revise the dropdown to look more like this:

  • Eliminate the "number of pages" option.
  • Add helper text to the "offset" option along with a more thorough label.

Screen Shot 2020-11-03 at 10 33 48 AM

@mapk mapk added Needs Dev Ready for, and needs developer efforts and removed Needs Design Feedback Needs general design feedback. labels Nov 3, 2020
mapk added a commit that referenced this issue Nov 3, 2020
…th design direction. Still need to force Pagination block to be included by default.
@gziolo gziolo changed the title Number of pages settings are too restrictive Query: Number of pages settings are too restrictive Nov 8, 2020
@skorasaurus
Copy link
Member

was requested by a user at #22226 ;

@ntsekouras
Copy link
Contributor

Closing this as Number of pages is handled with Query Pagination block (#28125)

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 Needs Dev Ready for, and needs developer efforts Needs Technical Feedback Needs testing from a developer perspective.
Projects
None yet
Development

No branches or pull requests

6 participants