Skip to content

Fix(Subscription Card): add disabled state to sync

What does this MR do and why?

Describe in detail what your merge request does and why.

The disabled state was removed from the sync button. This MR adds it back in with a slight change in that it is hidden for Legacy and Offline Cloud licenses.

Note: There is no nice way of showing a tooltip when the button is disabled. All solutions have downsides, e.g. smaller clickable area inside the button, or the selection area being larger than the button (both due to adding the tooltip to an element inside or wrapping the button.

Related: !106507 (merged).

Screenshots or screen recordings

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

Before:

Legacy (and Offline) License Cloud License (enabled) Cloud License (disabled)
Screenshot_2022-12-20_at_12.28.40 Screenshot_2022-12-20_at_12.12.22 -

After:

Legacy (and Offline) License Cloud License (enabled) Cloud License (disabled) - The curser is not visible, but indicates disabled
Screenshot_2022-12-19_at_13.01.29 Screenshot_2022-12-20_at_10.05.24 Screenshot_2022-12-20_at_10.05.56

How to set up and validate locally

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

Local test

  1. Visit http://127.0.0.1:3000/admin/subscription
  2. Apply this patch and comment in the type of license you want to see: test-different-licenses.patch
  3. You should see that of these three types only online cloud license has the option to sync.

Actual test

  1. Visit http://127.0.0.1:3000/admin/subscription
  2. Make sure to have CustomersDot set up with Zuora to create a legacy license (license file), an offline (cloud) license, and an online (cloud) license. You can follow the instructions here (a bit out-dated, but still works): https://gitlab.com/gitlab-org/customers-gitlab-com/-/blob/staging/doc/resource_videos.md
  3. Find the subscription license key/file and activation code in the emails that gets generated from the purchases or find them in CustomersDot http://localhost:5000/ and add them to your instance (one by one is the easiest way to go).
  4. You should see that of these three types only online cloud license has the option to sync.

MR acceptance checklist

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

Related to customers-gitlab-com#5318 (closed)

Edited by Michael Lunøe

Merge request reports

Loading