Skip to content

Use GlFormFields for admin_emails_form.vue

What does this MR do and why?

This MR replaces a "boring form" with our new fancy "gl-form-fields" gitlab-ui component: https://gitlab-org.gitlab.io/gitlab-ui/?path=/docs/base-form-form-fields--docs

In doing so, we manage to lose 75 lines of code 🎉

Screenshots or screen recordings

Before After
image image

How to set up and validate locally

  1. Emailing users is a Premium feature. A developer EE licence is needed.
  2. http://gdk.test:3000/admin/email
  3. Check validation messages appears if you try and submit the form without completing any of the fields
  4. Open dev tools and block gdk.test:3000/api/v4/groups.json?search=&per_page=20 and check an alert appears when trying to click the group/project dropdown
  5. Fill out the form, submit and check network inspector to ensure the form data is posted as expected
  6. Check sent e-mails in http://gdk.test:3000/rails/letter_opener

NOTE: If you need to re-submit the form in less than 10 minutes, run this from the rails console:

Gitlab::ExclusiveLease.cancel(Admin::EmailService::LEASE_KEY, Gitlab::ExclusiveLease.get_uuid(Admin::EmailService::LEASE_KEY))

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 Dan MH

Merge request reports

Loading