Commit 10d63c75 authored by Igor Drozdov's avatar Igor Drozdov

Merge branch...

Merge branch '254985-resolve-new_create_project_ui-experiment-feature-flag-naming-issue' into 'master'

Resolve new_create_project_ui experiment naming issue

Closes #254985

See merge request gitlab-org/gitlab!44163
parents 1ab26e7f 2e5a540c
......@@ -3,13 +3,14 @@ import initProjectNew from '../../../projects/project_new';
import { __ } from '~/locale';
import { deprecatedCreateFlash as createFlash } from '~/flash';
import Tracking from '~/tracking';
import { isExperimentEnabled } from '~/lib/utils/experimentation';
document.addEventListener('DOMContentLoaded', () => {
initProjectVisibilitySelector();
initProjectNew.bindEvents();
const { category, property } = gon.tracking_data ?? { category: 'projects:new' };
const hasNewCreateProjectUi = 'newCreateProjectUi' in gon?.features;
const hasNewCreateProjectUi = isExperimentEnabled('newCreateProjectUi');
if (!hasNewCreateProjectUi) {
// Setting additional tracking for HAML template
......
......@@ -37,7 +37,7 @@ class ProjectsController < Projects::ApplicationController
# Experiments
before_action only: [:new, :create] do
frontend_experimentation_tracking_data(:new_create_project_ui, 'click_tab')
push_frontend_feature_flag(:new_create_project_ui) if experiment_enabled?(:new_create_project_ui)
push_frontend_experiment(:new_create_project_ui)
end
before_action only: [:edit] do
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment