Add pagination to importers
Problem to solve
When we try to import a project from GitLab to a local instance, for example, we get all the projects from GitLab and show all of them in a list. For a user inside the
gitlab-org that can be around minimum 600 projects. This has several implications.
First, we don't make one request but severals to retrieve all projects. Each request, minimum 6 if we want to retrieve 600 projects, has its own latency and the user would have to wait a long time to show the project list (if it doesn't time out).
Second, the list is just that, a regular list. The user experience for a 600 elements raw list isn't very good.
If we implement a paginated list, the final throughoutput would be better and the user would get the list faster. We should also consider adding filtering.
- Add pagination to our importers (e.g. GitHub, Bitbucket).
- Projects to import should be paginated with some reasonable number of projects per page, I suggest 50.
- The "Import all projects" button should still refer to all of the projects across all pages.
- Change "Import all projects" to "Import all X projects" where X is the total number of projects across all pages (e.g. "Import all 493 projects").