FE [Import by URL] Prevent empty fields for connection check
The backend issue for the Import by Url page improvements included validating git endpoints.
However some frontend validation is warranted in the new form. At present the import_by_url_form.vue component permits the user to send empty fields to the backend when clicking "check connection". By adding some light frontend validation we can prevent the connection check to Gitaly (?) and get the user to fix the issue quickly client-side instead of awaiting the feedback from the backend, creating an unnecessary network request, such as below where no url was entered.
Also change the button that is disabled !201202 (comment 2727208467)
Acceptance criteria
-
"Check connection" button is disabled without a URL Repository field(this contradicts ux guidelines) - User sees some UI feedback on missing field prompting them to add a url, before clicking check button
- Update test in spec/frontend/projects/new_v2/components/import_by_url_form_spec.js
- (Optional) basic url validation? (http, https, git)
Edited by Oiza Baiye