Skip to content

Fix issues with New Project page Vue dropdown

Coung Ngo requested to merge 26732-fix-dropdown-issues into master

What does this MR do and why?

This MR fixes some issues with the Vue dropdown on the New Project page. The New Project page is all in Haml, but the dropdown was recently converted to a Vue dropdown in !68778 (merged) to address performance issues. The Vue dropdown is behind the feature flag paginatable_namespace_drop_down_for_project_creation, defaulted to off.

This MR updates code so that:

  • Doing New Project > From Import > GitLab Export now works (issue was raised in #342952 (closed)app/assets/javascripts/projects/project_new.js was looking for #project_namespace_id but didn't find it)
  • The visibility radio options are now updated when the dropdown changes. For example, if you select a private group then the Internal and Public radio options become disabled. (this is tested by new_project_spec.rb#L251 and will pass when we turn on the feature flag and update the specs)
  • When a visibility radio option is disabled, a reason is shown again (.option-disabled-reason was accidentally removed from the markup sometime in the past but added back in this MR)

Screenshots or screen recordings

Screen_Recording_2021-10-13_at_8.15.44_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 such as http://127.0.0.1:3000/projects/new
  3. Test the changes

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