Skip to content

Delay query fetching for New Project page dropdown

Coung Ngo requested to merge 26732-delay-query-fetching into master

What does this MR do and why?

This MR does 2 things:

  • On load of the New Project page, 4 GraphQL queries are executed because 4 of the Project URL dropdowns are rendered into the DOM even though only 1 is shown at a time. This is because all 4 sections are rendered into the DOM but only 1 is shown. The dropdown was changed to fetch the query on opening of the dropdown instead of on load of the dropdown.
  • The logic for filtering groups when creating from a group template was fixed to make the following test pass when the feature flag is on: ee/spec/features/projects/new_project_spec.rb:242

These changes are behind the feature flag paginatable_namespace_drop_down_for_project_creation (#26732 (closed)), defaulted to off

Screenshots or screen recordings

Screen_Recording_2021-12-01_at_1.44.14_pm

How to set up and validate locally

  1. In rails console enable the feature flag
    Feature.enable(:paginatable_namespace_drop_down_for_project_creation)
  2. Visit the new project page http://127.0.0.1:3000/projects/new
  3. Test the MR

MR acceptance checklist

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

Related to #26732 (closed)

Edited by Coung Ngo

Merge request reports

Loading