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

[Navigation block] Lift the limit of 10 pages max when creating navigation from top level pages #21019

Conversation

adamziel
Copy link
Contributor

Description

As reported in #19266:

In the Navigation block, if there are more than 10 top level pages and you choose Create from all top level pages then you only get the first 10, ordered by post ID.

This PR lifts this restriction by setting per_page: -1. It's actually also a good opportunity to discuss - should we still have a fixed limit of e.g. 50 pages? I don't see how navigation consisting of 200 top level pages would be any useful.

How has this been tested?

Tested locally

Screenshots

2020-03-19 15-19-22 2020-03-19 15_21_11

Types of changes

Non-breaking changes

Checklist:

  • My code is tested.
  • My code follows the WordPress code style.
  • My code follows the accessibility standards.
  • My code has proper inline documentation.
  • I've included developer documentation if appropriate.
  • I've updated all React Native files affected by any refactorings/renamings in this PR.

@adamziel adamziel added [Type] Bug An existing feature does not function as intended [Priority] High Used to indicate top priority items that need quick attention [Block] Navigation Affects the Navigation Block labels Mar 19, 2020
@adamziel adamziel requested review from draganescu and talldan March 19, 2020 14:23
@adamziel adamziel self-assigned this Mar 19, 2020
@mtias mtias added the Needs Design Feedback Needs general design feedback. label Mar 19, 2020
Copy link
Contributor

@draganescu draganescu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wouldn't the best for this case be if we had a default which can be changed via a filter? Usually it's ok to have some opinionated default that has less chances to break a layout with the click of a button.

What if we have a default of 10 and change the label to Craete from most recent 10 top level pages or something and have these filterable :)

Seems like a lot of work of an edge case tho ...

@kadamwhite
Copy link
Contributor

From a REST API standpoint, I believe we should still cap the max items returned per-request, but should up that limit so that fewer iterative requests are necessary. (see #21212)

@adamziel adamziel closed this May 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Navigation Affects the Navigation Block Needs Design Feedback Needs general design feedback. [Priority] High Used to indicate top priority items that need quick attention [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants