Skip to content

Improve New Trial flow for edge case scenario

What does this MR do?

See #243911 (closed) for all of the details. The TL;DR of it is that we’re improving a previously cumbersome UX workflow when the user does not have a personal namespace which is eligible for a trial, nor does the user have any groups or none of their groups are eligible for a trial.

This MR also improves the overall UX by using different intro copy for each of the four possible scenarios.

Screenshots

Current UX Updated UX
image image

Copy changes

**Current copy:**

You can apply your Trial to your Personal account or create a New Group.

**Copy for each scenario:**
All options are available to the user:

You can apply your trial to a new group, an existing group, or your personal account.

No groups exist or are eligible:

You can apply your trial to a new group or your personal account.

The user’s namespace is ineligible:

You can apply your trial to a new group or an existing group.

Neither the user’s namespace nor any groups are eligible:

Create a new group to start your GitLab Gold trial.

How to test it locally

  1. Install the GDK
  2. Spoof the GDK to think it is running on dot-com (this will prompt the “Start a trial” UI elements to show up)
    • Edit the self.com? method in the lib/gitlab.rb file (look for def self.com? around line 46 or so):
        def self.com?
          return true
          # Check `gl_subdomain?` as well to keep parity with gitlab.com
          Gitlab.config.gitlab.url == COM_URL || gl_subdomain?
        end
  3. Enable the Billing pages & plans (NOTE: This step may not be strictly necessary merely for access to the “Start a Trial” flow, but it could be helpful in the process nonetheless.)
    1. Boot up the GDK (gdk start) and then hop into the Rails console: bin/rails console
    2. Turn on the ApplicationSetting which enables this: ApplicationSetting.first.update_attribute(check_namespace_plan: true)
    3. Exit the console (exit) and restart the rails app process (gdk restart rails)
  4. Create a few test user accounts: one with groups, one without groups, one with groups where the user’s namespace has already been trialed, and one without groups where the user’s namespace has already been trialed.
    • To mark a user’s namespace as trialed:
      1. Make sure the user actually has a namespace and that that namespace has a gitlab_subscription: user.namespace.gitlab_subscription. If not, create one.
      2. Update that gitlab_subscription by setting its trial_ends_on and trial attributes: gitlab_subscription.update(trial_ends_on: Date.today - 1.day, trial: true)
  5. Log in as each user and navigate to /-/trials/select
    • User with un-trialed namespace & un-trialed groups
      • You should see three option groups in the drop-down select (New, Groups, & Users)
      • You should see the text “You can apply your trial to your personal account, an existing group, or create a new group.”
    • User with un-trialed namespace but no groups (or already trialed groups)
      • You should see two option groups in the drop-down select (New & Users)
      • You should see the text “You can apply your trial to your personal account or create a new group.”
    • User with a trialed namespace & un-trialed groups
      • You should see two option groups in the drop-down select (New & Groups)
      • You should see the text “You can apply your trial to an existing group or create a new group.”
    • User with a trialed namespace & no groups (or already trialed groups)
      • You should not see the drop-down select at all
      • You should see a text field labeled New Group Name
      • You should see the text “Create a group to start your GitLab Gold trial.”

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:

  • [-] Label as security and @ mention @gitlab-com/gl-security/appsec
  • [-] The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • [-] Security reports checked/validated by a reviewer from the AppSec team

Addresses #243911 (closed)

Edited by Dallas Reedy

Merge request reports