Fix issues with New Project page Vue dropdown
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
- In rails console enable the feature flag
Feature.enable(:paginatable_namespace_drop_down_for_project_creation)
- Visit the new project page such as
http://127.0.0.1:3000/projects/new
- 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.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #26732 (closed)
Edited by Coung Ngo