Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
033a3c98
Commit
033a3c98
authored
Nov 16, 2020
by
Dennis Tang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Finalize new create project UI experiment
The new/B variant of the experiment will be used
parent
a4bbb806
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
24 additions
and
48 deletions
+24
-48
app/assets/javascripts/pages/projects/new/index.js
app/assets/javascripts/pages/projects/new/index.js
+17
-35
app/controllers/projects_controller.rb
app/controllers/projects_controller.rb
+0
-6
app/views/projects/new.html.haml
app/views/projects/new.html.haml
+2
-3
changelogs/unreleased/dennis-update-new-project-ui-experiment.yml
...gs/unreleased/dennis-update-new-project-ui-experiment.yml
+5
-0
lib/gitlab/experimentation.rb
lib/gitlab/experimentation.rb
+0
-4
No files found.
app/assets/javascripts/pages/projects/new/index.js
View file @
033a3c98
...
...
@@ -2,46 +2,28 @@ import initProjectVisibilitySelector from '../../../project_visibility';
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
=
isExperimentEnabled
(
'
newCreateProjectUi
'
);
import
(
/* webpackChunkName: 'experiment_new_project_creation' */
'
../../../projects/experiment_new_project_creation
'
)
.
then
(
m
=>
{
const
el
=
document
.
querySelector
(
'
.js-experiment-new-project-creation
'
);
if
(
!
hasNewCreateProjectUi
)
{
// Setting additional tracking for HAML template
if
(
!
el
)
{
return
;
}
Array
.
from
(
document
.
querySelectorAll
(
'
.project-edit-container [data-experiment-track-label]
'
),
).
forEach
(
node
=>
node
.
addEventListener
(
'
click
'
,
event
=>
{
const
{
experimentTrackLabel
:
label
}
=
event
.
currentTarget
.
dataset
;
Tracking
.
event
(
category
,
'
click_tab
'
,
{
property
,
label
});
}),
);
}
else
{
import
(
/* webpackChunkName: 'experiment_new_project_creation' */
'
../../../projects/experiment_new_project_creation
'
)
.
then
(
m
=>
{
const
el
=
document
.
querySelector
(
'
.js-experiment-new-project-creation
'
);
if
(
!
el
)
{
return
;
}
const
config
=
{
hasErrors
:
'
hasErrors
'
in
el
.
dataset
,
isCiCdAvailable
:
'
isCiCdAvailable
'
in
el
.
dataset
,
};
m
.
default
(
el
,
config
);
})
.
catch
(()
=>
{
createFlash
(
__
(
'
An error occurred while loading project creation UI
'
));
});
}
const
config
=
{
hasErrors
:
'
hasErrors
'
in
el
.
dataset
,
isCiCdAvailable
:
'
isCiCdAvailable
'
in
el
.
dataset
,
};
m
.
default
(
el
,
config
);
})
.
catch
(()
=>
{
createFlash
(
__
(
'
An error occurred while loading project creation UI
'
));
});
});
app/controllers/projects_controller.rb
View file @
033a3c98
...
...
@@ -34,12 +34,6 @@ class ProjectsController < Projects::ApplicationController
# Project Export Rate Limit
before_action
:export_rate_limit
,
only:
[
:export
,
:download_export
,
:generate_new_export
]
# Experiments
before_action
only:
[
:new
,
:create
]
do
frontend_experimentation_tracking_data
(
:new_create_project_ui
,
'click_tab'
)
push_frontend_experiment
(
:new_create_project_ui
)
end
before_action
only:
[
:edit
]
do
push_frontend_feature_flag
(
:service_desk_custom_address
,
@project
)
push_frontend_feature_flag
(
:approval_suggestions
,
@project
,
default_enabled:
true
)
...
...
app/views/projects/new.html.haml
View file @
033a3c98
...
...
@@ -8,10 +8,9 @@
.project-edit-errors
=
render
'projects/errors'
-
if
experiment_enabled?
(
:new_create_project_ui
)
.js-experiment-new-project-creation
{
data:
{
is_ci_cd_available:
ci_cd_projects_available?
,
has_errors:
@project
.
errors
.
any?
}
}
.js-experiment-new-project-creation
{
data:
{
is_ci_cd_available:
ci_cd_projects_available?
,
has_errors:
@project
.
errors
.
any?
}
}
.row
{
'v-cloak'
:
experiment_enabled?
(
:new_create_project_ui
)
}
.row
{
'v-cloak'
:
true
}
.col-lg-3.profile-settings-sidebar
%h4
.gl-mt-0
=
_
(
'New project'
)
...
...
changelogs/unreleased/dennis-update-new-project-ui-experiment.yml
0 → 100644
View file @
033a3c98
---
title
:
Finalize new create project UI experiment
merge_request
:
47804
author
:
type
:
changed
lib/gitlab/experimentation.rb
View file @
033a3c98
...
...
@@ -55,10 +55,6 @@ module Gitlab
tracking_category:
'Growth::Expansion::Experiment::InviteMembersEmptyGroupVersionA'
,
use_backwards_compatible_subject_index:
true
},
new_create_project_ui:
{
tracking_category:
'Manage::Import::Experiment::NewCreateProjectUi'
,
use_backwards_compatible_subject_index:
true
},
contact_sales_btn_in_app:
{
tracking_category:
'Growth::Conversion::Experiment::ContactSalesInApp'
,
use_backwards_compatible_subject_index:
true
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment