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
aa1425fc
Commit
aa1425fc
authored
Jul 06, 2021
by
Himanshu Kapoor
Committed by
Robert Speicher
Jul 06, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update tracking labels for consolidated edit menu
parent
e8f349c5
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
18 additions
and
20 deletions
+18
-20
app/assets/javascripts/vue_shared/components/web_ide_link.vue
...assets/javascripts/vue_shared/components/web_ide_link.vue
+4
-6
app/helpers/blob_helper.rb
app/helpers/blob_helper.rb
+2
-2
spec/frontend/vue_shared/components/web_ide_link_spec.js
spec/frontend/vue_shared/components/web_ide_link_spec.js
+4
-4
spec/helpers/blob_helper_spec.rb
spec/helpers/blob_helper_spec.rb
+8
-8
No files found.
app/assets/javascripts/vue_shared/components/web_ide_link.vue
View file @
aa1425fc
...
...
@@ -93,9 +93,8 @@ export default {
tooltip
:
''
,
attrs
:
{
'
data-qa-selector
'
:
'
edit_button
'
,
'
data-track-event
'
:
'
click_edit
'
,
// eslint-disable-next-line @gitlab/require-i18n-strings
'
data-track-label
'
:
'
Edit
'
,
'
data-track-action
'
:
'
click_consolidated_edit
'
,
'
data-track-label
'
:
'
edit
'
,
},
...
handleOptions
,
};
...
...
@@ -127,9 +126,8 @@ export default {
tooltip
:
''
,
attrs
:
{
'
data-qa-selector
'
:
'
web_ide_button
'
,
'
data-track-event
'
:
'
click_edit_ide
'
,
// eslint-disable-next-line @gitlab/require-i18n-strings
'
data-track-label
'
:
'
Web IDE
'
,
'
data-track-action
'
:
'
click_consolidated_edit_ide
'
,
'
data-track-label
'
:
'
web_ide
'
,
},
...
handleOptions
,
};
...
...
app/helpers/blob_helper.rb
View file @
aa1425fc
...
...
@@ -65,7 +65,7 @@ module BlobHelper
return
unless
blob
=
readable_blob
(
options
,
path
,
project
,
ref
)
common_classes
=
"btn gl-button btn-confirm js-edit-blob gl-ml-3
#{
options
[
:extra_class
]
}
"
data
=
{
track_
event:
'click_edit'
,
track_label:
'E
dit'
}
data
=
{
track_
action:
'click_edit'
,
track_label:
'e
dit'
}
if
Feature
.
enabled?
(
:web_ide_primary_edit
,
project
.
group
)
common_classes
+=
" btn-inverted"
...
...
@@ -85,7 +85,7 @@ module BlobHelper
return
unless
blob
common_classes
=
'btn gl-button btn-confirm ide-edit-button gl-ml-3'
data
=
{
track_
event:
'click_edit_ide'
,
track_label:
'Web IDE
'
}
data
=
{
track_
action:
'click_edit_ide'
,
track_label:
'web_ide
'
}
unless
Feature
.
enabled?
(
:web_ide_primary_edit
,
project
.
group
)
common_classes
+=
" btn-inverted"
...
...
spec/frontend/vue_shared/components/web_ide_link_spec.js
View file @
aa1425fc
...
...
@@ -15,8 +15,8 @@ const ACTION_EDIT = {
tooltip
:
''
,
attrs
:
{
'
data-qa-selector
'
:
'
edit_button
'
,
'
data-track-
event
'
:
'
click
_edit
'
,
'
data-track-label
'
:
'
E
dit
'
,
'
data-track-
action
'
:
'
click_consolidated
_edit
'
,
'
data-track-label
'
:
'
e
dit
'
,
},
};
const
ACTION_EDIT_CONFIRM_FORK
=
{
...
...
@@ -32,8 +32,8 @@ const ACTION_WEB_IDE = {
text
:
'
Web IDE
'
,
attrs
:
{
'
data-qa-selector
'
:
'
web_ide_button
'
,
'
data-track-
event
'
:
'
click
_edit_ide
'
,
'
data-track-label
'
:
'
Web IDE
'
,
'
data-track-
action
'
:
'
click_consolidated
_edit_ide
'
,
'
data-track-label
'
:
'
web_ide
'
,
},
};
const
ACTION_WEB_IDE_CONFIRM_FORK
=
{
...
...
spec/helpers/blob_helper_spec.rb
View file @
aa1425fc
...
...
@@ -67,8 +67,8 @@ RSpec.describe BlobHelper do
it
'passes on primary tracking attributes'
do
parsed_link
=
Capybara
.
string
(
link
).
find_link
(
'Edit'
)
expect
(
parsed_link
[
:'data-track-
event
'
]).
to
eq
(
"click_edit"
)
expect
(
parsed_link
[
:'data-track-label'
]).
to
eq
(
"
E
dit"
)
expect
(
parsed_link
[
:'data-track-
action
'
]).
to
eq
(
"click_edit"
)
expect
(
parsed_link
[
:'data-track-label'
]).
to
eq
(
"
e
dit"
)
expect
(
parsed_link
[
:'data-track-property'
]).
to
eq
(
nil
)
end
end
...
...
@@ -85,8 +85,8 @@ RSpec.describe BlobHelper do
it
'passes on secondary tracking attributes'
do
parsed_link
=
Capybara
.
string
(
link
).
find_link
(
'Edit'
)
expect
(
parsed_link
[
:'data-track-
event
'
]).
to
eq
(
"click_edit"
)
expect
(
parsed_link
[
:'data-track-label'
]).
to
eq
(
"
E
dit"
)
expect
(
parsed_link
[
:'data-track-
action
'
]).
to
eq
(
"click_edit"
)
expect
(
parsed_link
[
:'data-track-label'
]).
to
eq
(
"
e
dit"
)
expect
(
parsed_link
[
:'data-track-property'
]).
to
eq
(
"secondary"
)
end
end
...
...
@@ -332,8 +332,8 @@ RSpec.describe BlobHelper do
it
'passes on secondary tracking attributes'
do
parsed_link
=
Capybara
.
string
(
link
).
find_link
(
'Web IDE'
)
expect
(
parsed_link
[
:'data-track-
event
'
]).
to
eq
(
"click_edit_ide"
)
expect
(
parsed_link
[
:'data-track-label'
]).
to
eq
(
"
Web IDE
"
)
expect
(
parsed_link
[
:'data-track-
action
'
]).
to
eq
(
"click_edit_ide"
)
expect
(
parsed_link
[
:'data-track-label'
]).
to
eq
(
"
web_ide
"
)
expect
(
parsed_link
[
:'data-track-property'
]).
to
eq
(
"secondary"
)
end
end
...
...
@@ -350,8 +350,8 @@ RSpec.describe BlobHelper do
it
'passes on primary tracking attributes'
do
parsed_link
=
Capybara
.
string
(
link
).
find_link
(
'Web IDE'
)
expect
(
parsed_link
[
:'data-track-
event
'
]).
to
eq
(
"click_edit_ide"
)
expect
(
parsed_link
[
:'data-track-label'
]).
to
eq
(
"
Web IDE
"
)
expect
(
parsed_link
[
:'data-track-
action
'
]).
to
eq
(
"click_edit_ide"
)
expect
(
parsed_link
[
:'data-track-label'
]).
to
eq
(
"
web_ide
"
)
expect
(
parsed_link
[
:'data-track-property'
]).
to
eq
(
nil
)
end
end
...
...
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