Skip to content

Create statistics card for Code Suggestions – no purchase scenario

Angelo Gulina requested to merge ag/create-card-code-suggestions into master

What does this MR do and why?

This MR relates to https://gitlab.com/gitlab-org/gitlab/-/issues/411951 and is introducing:

  1. a semi-general-purpose component (UsageStatistics) for usage statistics (also used here)
  2. a new card for Code Suggestions usage statistics, for the case where no Addon has been purchased

This MR also updates the button size, as per design specs.

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

Before After
With no subscription
Screenshot_2023-07-12_at_09.44.36 Screenshot_2023-07-17_at_16.23.02
With a subscription
Screenshot_2023-07-12_at_09.38.53 Screenshot_2023-07-17_at_16.18.40

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

  • Make sure to have the following env variables set up, before starting gdk
    • CUSTOMER_PORTAL_URL to https://customers.staging.gitlab.com
    • GITLAB_SIMULATE_SAAS to true
    • GITLAB_LICENSE_MODE to test
  • Create a Group
  • Buy a Subscription
  • Visit /groups/<your-namespace-name>/-/usage_quotas#seats-quota-tab
  • Enable enable_hamilton_in_usage_quotas_ui FF (globally, or for your group)

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Angelo Gulina

Merge request reports