Skip to content

Add support for split button loading

Samantha Ming requested to merge 434940-loading-state-split-button into master

What does this MR do and why?

This MR updates how the split_button.vue renders its loading state -- switched to use a more simplified approach with a loading prop instead, which aligns with how we set the disabled state with the disabled prop. This way it will be easier to handle the loading state without the need to iterate through the buttons array 👍

split-button-loading-status

MR acceptance checklist

Before After
image image

How to set up and validate locally

  1. Have the related FF enabled: echo "Feature.enable(:resolve_vulnerability_ai)" | rails c
  2. In order to run a pipeline to generate a Vulnerability report, you'll need an EE license.
  3. Fork https://gitlab.com/gitlab-org/govern/demos/sandbox/minac/test-remediations
  4. Run a pipeline against the default branch. It will generate vulnerabilities.
  5. Go to the project vulnerability report page
  6. Click on the SAST vulnerability
  7. In the dropdown down select the "Resolve with AI" button
  8. When clicked, the button should display a loading state

Note: the demo repo doesn't contain real vulnerabilities, so if you try to click on it, it will successfully make the request but you will get an error when trying to generate AI MR. This is okay. We're only testing the UI here.

Related to #434940 (closed)

Edited by Samantha Ming

Merge request reports