Skip to content

Correctly count wiki pages in sidebar

Markus Koller requested to merge 212835-wiki-all-pages-button into master

What does this MR do?

The existing code had two problems:

  • We were only counting toplevel entries, not individual pages.
  • We were showing the "View All Pages" button when the number of pages exactly matches the limit, even when there are no further pages.

This is now resolved by loading one page more than the limit, and using the result count to determine if we have more pages.

Ref: #212835 (closed)

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:

  • [-] Label as security and @ mention @gitlab-com/gl-security/appsec
  • [-] The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • [-] Security reports checked/validated by a reviewer from the AppSec team
Edited by Markus Koller

Merge request reports