Enable mock setup to make onboarding development easier
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.
-
Enable feature flag via
rails console
:Feature.enable(:user_onboarding)
-
Change
get_onboarding_demo_project
inonboarding_controller.rb
to the following:def get_onboarding_demo_project Project.find_by_full_path("gitlab-org/gitlab-test") end
-
Change
user_onboarding_enabled?
inee/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
-
Changelog entry -
Documentation created/updated or follow-up review issue created -
Code review guidelines -
Merge request performance guidelines -
Style guides -
Database guides -
Separation of EE specific content
Performance and Testing
-
Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process. -
Tested in all supported browsers
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