diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-09-19 21:06:29 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-09-19 21:06:29 +0000 |
commit | b35b9ac7e2fd4a707ea9291eb57769c690403b4c (patch) | |
tree | ae746b64cc7d3a19926e6d4a39a5daeb990a4154 /app/assets/javascripts/sidebar | |
parent | 81f7adf08b4557c38ac2ef1c730e72e07db2f1a3 (diff) | |
download | gitlab-ce-b35b9ac7e2fd4a707ea9291eb57769c690403b4c.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/sidebar')
4 files changed, 17 insertions, 23 deletions
diff --git a/app/assets/javascripts/sidebar/components/assignees/assignee_title.vue b/app/assets/javascripts/sidebar/components/assignees/assignee_title.vue index 63b93a80ead..f4dac38b9e1 100644 --- a/app/assets/javascripts/sidebar/components/assignees/assignee_title.vue +++ b/app/assets/javascripts/sidebar/components/assignees/assignee_title.vue @@ -1,6 +1,5 @@ <script> import { n__ } from '~/locale'; -import { trackEvent } from 'ee_else_ce/event_tracking/issue_sidebar'; export default { name: 'AssigneeTitle', @@ -30,11 +29,6 @@ export default { return n__('Assignee', `%d Assignees`, assignees); }, }, - methods: { - trackEdit() { - trackEvent('click_edit_button', 'assignee'); - }, - }, }; </script> <template> @@ -45,7 +39,9 @@ export default { v-if="editable" class="js-sidebar-dropdown-toggle edit-link float-right" href="#" - @click.prevent="trackEdit" + data-track-event="click_edit_button" + data-track-label="right_sidebar" + data-track-property="assignee" > {{ __('Edit') }} </a> diff --git a/app/assets/javascripts/sidebar/components/confidential/confidential_issue_sidebar.vue b/app/assets/javascripts/sidebar/components/confidential/confidential_issue_sidebar.vue index 1c75b6148e8..e350264de96 100644 --- a/app/assets/javascripts/sidebar/components/confidential/confidential_issue_sidebar.vue +++ b/app/assets/javascripts/sidebar/components/confidential/confidential_issue_sidebar.vue @@ -5,7 +5,6 @@ import tooltip from '~/vue_shared/directives/tooltip'; import Icon from '~/vue_shared/components/icon.vue'; import eventHub from '~/sidebar/event_hub'; import editForm from './edit_form.vue'; -import { trackEvent } from 'ee_else_ce/event_tracking/issue_sidebar'; export default { components: { @@ -52,11 +51,6 @@ export default { toggleForm() { this.edit = !this.edit; }, - onEditClick() { - this.toggleForm(); - - trackEvent('click_edit_button', 'confidentiality'); - }, updateConfidentialAttribute(confidential) { this.service .update('issue', { confidential }) @@ -88,7 +82,10 @@ export default { v-if="isEditable" class="float-right confidential-edit" href="#" - @click.prevent="onEditClick" + data-track-event="click_edit_button" + data-track-label="right_sidebar" + data-track-property="confidentiality" + @click.prevent="toggleForm" > {{ __('Edit') }} </a> diff --git a/app/assets/javascripts/sidebar/components/lock/lock_issue_sidebar.vue b/app/assets/javascripts/sidebar/components/lock/lock_issue_sidebar.vue index ec2a7b93a98..c7c5e0e20f1 100644 --- a/app/assets/javascripts/sidebar/components/lock/lock_issue_sidebar.vue +++ b/app/assets/javascripts/sidebar/components/lock/lock_issue_sidebar.vue @@ -6,7 +6,6 @@ import issuableMixin from '~/vue_shared/mixins/issuable'; import Icon from '~/vue_shared/components/icon.vue'; import eventHub from '~/sidebar/event_hub'; import editForm from './edit_form.vue'; -import { trackEvent } from 'ee_else_ce/event_tracking/issue_sidebar'; export default { components: { @@ -66,11 +65,6 @@ export default { toggleForm() { this.mediator.store.isLockDialogOpen = !this.mediator.store.isLockDialogOpen; }, - onEditClick() { - this.toggleForm(); - - trackEvent('click_edit_button', 'lock_issue'); - }, updateLockedAttribute(locked) { this.mediator.service .update(this.issuableType, { @@ -114,7 +108,10 @@ export default { v-if="isEditable" class="float-right lock-edit" type="button" - @click.prevent="onEditClick" + data-track-event="click_edit_button" + data-track-label="right_sidebar" + data-track-property="lock_issue" + @click.prevent="toggleForm" > {{ __('Edit') }} </button> diff --git a/app/assets/javascripts/sidebar/components/subscriptions/subscriptions.vue b/app/assets/javascripts/sidebar/components/subscriptions/subscriptions.vue index 1f5f19d1931..ea5edb3ce3f 100644 --- a/app/assets/javascripts/sidebar/components/subscriptions/subscriptions.vue +++ b/app/assets/javascripts/sidebar/components/subscriptions/subscriptions.vue @@ -1,10 +1,10 @@ <script> import { __ } from '~/locale'; +import Tracking from '~/tracking'; import icon from '~/vue_shared/components/icon.vue'; import toggleButton from '~/vue_shared/components/toggle_button.vue'; import tooltip from '~/vue_shared/directives/tooltip'; import eventHub from '../../event_hub'; -import { trackEvent } from 'ee_else_ce/event_tracking/issue_sidebar'; const ICON_ON = 'notifications'; const ICON_OFF = 'notifications-off'; @@ -19,6 +19,7 @@ export default { icon, toggleButton, }, + mixins: [Tracking.mixin({ label: 'right_sidebar' })], props: { loading: { type: Boolean, @@ -65,7 +66,10 @@ export default { // Component event emission. this.$emit('toggleSubscription', this.id); - trackEvent('toggle_button', 'notifications', this.subscribed ? 0 : 1); + this.track('toggle_button', { + property: 'notifications', + value: this.subscribed ? 0 : 1, + }); }, onClickCollapsedIcon() { this.$emit('toggleSidebar'); |