Skip to content

Enable mock setup to make onboarding development easier

Doug Stull requested to merge enable-user-onboarding into master

What does this MR do?

This enables working on onboarding tour easier. Before we had to do something like the below:

How to work on Onboarding tour

The information here helps developers set up GDK for working on the Onboarding tour.

Since this feature is behind a feature flag and uses Gitlab CE as the demo project in production, there are a few steps required to get this working locally.

  1. Enable feature flag via rails console:

    Feature.enable(:user_onboarding)
  2. Change get_onboarding_demo_project in onboarding_controller.rb to the following:

    def get_onboarding_demo_project
      Project.find_by_full_path("gitlab-org/gitlab-test")
    end
  3. Change user_onboarding_enabled? in ee/app/helpers/ee/application_helper.rb to the following:

    def user_onboarding_enabled?
      ::Feature.enabled?(:user_onboarding)
    end

For local testing, if you want the onboarding to automatically appear for new users (that have no projects and have not previously dismissed the onboarding), the following patch needs to be made to ee/app/controllers/ee/dashboard/projects_controller.rb:

def show_onboarding_welcome_page?
- return false unless ::Gitlab.com?
 return false if cookies['onboarding_dismissed'] == 'true'

 ::Feature.enabled?(:user_onboarding) && !show_projects?(projects, params)
end

instead of that, now we just have to set the feature flag like so: Feature.enable(:user_onboarding)

ce backport: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/32066

Does this MR meet the acceptance criteria?

Conformity

Performance 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
Edited by Lucas Charles

Merge request reports