Skip to content

Add loading icon and form hiding on error to group-level merge request settings

What does this MR do?

This MR adds a loading icon to the group-level merge request settings. It also hides the form if the loading icon is shown or the loading fails due to an API error.

After some UX discussion, it was also determined that the alerts should be moved to be inside the section rather than being shown at the top of the page.

Screenshots or Screencasts (strongly suggested)

Screen_Recording_2021-07-21_at_10.33.52

Setup & testing

  1. Enable the feature flag echo "Feature.enable(:group_merge_request_approval_settings_feature_flag)" | rails c
  2. View the Merge request approvals settings at [GDK_HOST]/groups/[GROUP]/-/edit
  3. Check the loading icon is shown on load and the form is hidden
  4. Save the form and check the success alert is shown
  5. Block the [GDK_HOST]/api/v4/groups/[GROUP_ID]/merge_request_approval_setting network request using the browsers network panel (Chrome, Firefox)
  6. Save the form and check the saving alert is shown
  7. Refresh the page and check the loading alert is shown and the loading icon continues to be shown rather than the form

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

Does this MR contain changes to processing or storing of credentials or tokens, authorization and authentication methods or other items described in the security review guidelines? If not, then delete this Security section.

  • [-] Label as security and @ mention @gitlab-com/gl-security/appsec
  • [-] The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • [-] Security reports checked/validated by a reviewer from the AppSec team

Related to #335982 (closed)

Edited by Robert Hunt

Merge request reports