Skip to content

Fetch product analytics project settings via GraphQL

What does this MR do and why?

Fetch product analytics project settings via GraphQL

  • Completely removes settings from being passed via DOM.
  • Adds loading state for provider cards.

This work is in preparation for the upcoming change to allow editing project-level provider settings from within the onboarding flow.

Having this data fetched via GraphQL simplifies this later step, by ensuring all data is managed by Apollo.

Editing settings work stream:

  • Fetch project-level provider settings via GraphQL <-- you are here
  • Extract clear settings modal to standalone component !160659 (merged)
  • Remove redirect when clearing self-managed project-level provider settings !160669 (merged)
  • Allow configuring project-level provider settings within onboarding flow !153625 (merged)

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 (data exists up front so no loading state) image (new loading state while fetching project settings)
image (new loading state when !canSelectGitlabManagedProvider)
image image (no visual differences once loaded)
image (error state if fetch fails)

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. (open devtools and view network panel. Optionally throttle network speed to make loading states more obvious)
  6. Click "Set up" and complete the onboarding flow. Verify initial graphql request for project settings is fired. Verify new loading state displayed while fetching these settings.

Related to #466638 (closed)

Edited by Elwyn Benson

Merge request reports

Loading