Skip to content

Move transfer project namespace dropdown to GraphQL

What does this MR do and why?

Related to #296817 (closed)

Due to a request from a backend maintainer related to database performance we would like to change how the Namespace dropdown shown when transferring a project is populated. Currently it is populated by passing the options via data attributes. This has the downside of requiring the query to be run on initial page load and not supporting pagination. This MR changes the dropdown to use a GraphQL query to populate the options. It also adds support for pagination via an infinite scroll.

Screenshots or screen recordings

Per page changed to 6 for after video to demonstrate how pagination works

Before After
Screen_Recording_2022-07-13_at_4.56.55_PM Screen_Recording_2022-07-13_at_4.54.51_PM

How to set up and validate locally

  1. Navigate to a project -> Settings -> General -> Advanced
  2. Open the Select a new namespace dropdown in the Transfer project section
  3. If you want to test the pagination change the GROUPS_PER_PAGE variable to 6

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 Peter Hegman

Merge request reports

Loading