Skip to content

Remove usage of bootstrap-form gem within form templates

What does this MR do and why?

Removes the usage of bootstrap_form_for within the following files:

  • app/views/clusters/clusters/user/_form.html.haml
  • app/views/clusters/clusters/_provider_details_form.html.haml
  • app/views/clusters/clusters/_namespace.html.haml

This gem is outdated and deprecated within our codebase, and we ought to be using gitlab_ui_form_for instead. This gem's pending removal is currently blocking the Ruby 3 migration effort.

Screenshots or screen recordings

CleanShot_2023-01-10_at_15.50.11_2x

How to set up and validate locally

The changes in this MR are entirely the product of replacing bootstrap's form helper methods with normal form helper methods. This means being a bit more verbose about nesting inputs and labels within .form-group elements, separating the f.label helper onto its own line, and moving the help properties into their own .form-text.text-muted block beneath the input.

The best way to validate that no destructive changes have happened is to:

  1. Open this cluster form in your local GDK (on master branch)
  2. Copy the DOM for the form within the developer console
  3. Save it using prettier formatting
  4. Checkout this branch
  5. Copy the DOM for the form again
  6. Save it using prettier formatting
  7. Compare the two prettier-formatted forms to validate that they are functionally identical (some minor spacing changes will be the only notable difference)

One should also validate that the form functions as it should, by:

  1. Enable the kubernetes integration in their local GDK
  2. Use the deprecated "Connect a cluster (certificate)" form to add a kubernetes cluster integration to a project or group
  3. View and edit the cluster details after adding it

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 #358325 (closed) Part of #359430 (closed)

Edited by Mike Greiling

Merge request reports

Loading