Add pagination to `Profile > Contributed projects` page on User Profile
requested to merge 15539-add-pagination-to-profile-contributed-projects-page-on-user-profile into master
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 |
---|---|
How to set up and validate locally
- Checkout the branch
- Go to the
Profile/Contributed projects
page - 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