Skip to content

Improve error states in product analytics onboarding modals

What does this MR do and why?

Improves the error state within the Product Analytics onboarding flow settings modals.

  • moves error to top of modal
  • displays error using a GlAlert
  • fixes issue where network level errors were not being handled (previously only errors within the response)

Both the project level provider settings modal + the clear-settings modal have been updated.

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Screenshots or screen recordings

Before After
image image
image image

How to set up and validate locally

  1. Follow these instructions to setup Product Analytics in GDK.
  2. Create a new project / visit a not-onboarded project.
  3. Ensure you are signed in as a maintainer or higher role.
  4. Visit Project > Analytics > Analytics dashboards.
  5. Click "Set up"

Then, two things to verify:

a) If you have no project settings already configured for this project:

  1. On the self-managed provider card, un-check Use instance-level settings, and then click Use self-managed provider
  2. Enter values in the form
  3. Use devtools to block network /graphql requests
  4. Submit the form
  5. Verify error state is as expected

b) If you do have project settings already configured for this project:

  1. On the self-managed provider card, check Use instance-level settings, and then click Use self-managed provider
  2. Modal will pop up prompting to remove settings
  3. Use devtools to block network /graphql requests
  4. Submit the modal
  5. Verify error state is as expected

Note: to test the start of the onboarding flow multiple times on the same project, this patch can be applied to prevent the actual graphql mutation being sent (you will land on the loading state and sit there forever):

patch

Related to #479438 (closed)

Merge request reports

Loading