Skip to content

Prevent premature completed state on Billing Address

Re-work of !139603 (merged)

Related to #434902 (closed)

Adds logic to only show a green check next to completed steps that have already been accessed. Previously, we were showing a green check next to Contact information before the user had accessed that step because no action was needed.

Implements a way to keep track of the furthest step so that we can determine if the user has already accessed the step or not.

Screenshots or screen recordings

New subscription Add on
purchase_flow_with_correct_check_marks add_on_subscription
Subscription details Contact information Payment method Completed
Step 1 step_2 step_3 completed
add_on_step_1 addon_step_2 addon_step_3 addon_step_4

How to set up and validate locally

  1. Enable the feature flag
    Feature.enable(:key_contacts_management_v2, type: :gitlab_com_derisk)
  2. Have CustomersDot set up and connected to GitLab
  3. Visit http://localhost:3000/-/subscriptions/new?plan_id=2c92c0f876e0f4cc0176e176a08f1b70 (new subscription)
  4. Go through the form,
  5. Hit next as well as edit buttons to ensure the form works as expected
  6. Visit http://localhost:3000/-/subscriptions/buy_minutes?selected_group=GROUP_ID_HERE and test the same logic (add-on form)
  7. Disable the feature flag
    Feature.disable(:key_contacts_management_v2, type: :gitlab_com_derisk)
  8. Verify the form still works as expected
Edited by Laura Callahan

Merge request reports