Skip to content

Fix Kaminari pagination for file blame

Vasilii Iakliushin requested to merge 225174_fix_pagination_for_large_blobs into master

What does this MR do and why?

Contributes to #225174 (closed)

Problem

Kaminari does not work correctly when the limit is over the max_per_page value (100 by default).

Solution

Increase the max_per_page limit during the Kaminari initialization.

Screenshots or screen recordings

Before After
Screenshot_2022-06-21_at_19.00.08 Screenshot_2022-06-21_at_18.58.18

How to set up and validate locally

  1. Enable feature flag
    Feature.enable(:blame_page_pagination)
  2. Visit http://127.0.0.1:3000/gitlab-org/gitlab-test/-/blame/master/files/markdown/ruby-style-guide.md
  3. Verify that page 1 in the paginator is active
  4. Click on the second page
  5. Verify that the second page is loaded
  6. Verify that the page 2 in the paginator is active

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Vasilii Iakliushin

Merge request reports

Loading