Skip to content

Add pagination to `Profile > Contributed projects` page on User Profile

What does this MR do and why?

This MR adds pagination to the https://gitlab.com/users/:username/contributed page on User profile.

Currently, this page has no pagination, and hence there are performance issues.

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Screenshots or screen recordings

Before After
image image

How to set up and validate locally

  1. Checkout the branch
  2. Go to the Profile/Contributed projects page
  3. Verify that pagination is visible and working! 🎉

note: in case you don't have 20+ contributed projects, you can update UsersController#load_contributed_projects method with a following code:

--  @contributed_projects = contributed_projects.with_route.joined(user).page(params[:page]).without_count
++  @contributed_projects = contributed_projects.with_route.joined(user).page(params[:page]).per(3).without_count

for testing purposes.

Related to #15539 (closed)

Edited by Bojan Marjanovic

Merge request reports