Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-01-13 21:16:51 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2022-01-13 21:16:51 +0300
commitaa072fd68cfe366c0d5968c65e9b42aecb2a75b5 (patch)
treea7b51bab61941464115c84beff0d11ecf2a582ee /app/assets/javascripts/work_items
parentbd5ff5cb6553dd8f168b28c97175a63250fe2ab2 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/work_items')
-rw-r--r--app/assets/javascripts/work_items/components/item_title.vue4
-rw-r--r--app/assets/javascripts/work_items/constants.js2
-rw-r--r--app/assets/javascripts/work_items/pages/work_item_root.vue16
3 files changed, 21 insertions, 1 deletions
diff --git a/app/assets/javascripts/work_items/components/item_title.vue b/app/assets/javascripts/work_items/components/item_title.vue
index 5e9e50a94f0..79840cc4f0f 100644
--- a/app/assets/javascripts/work_items/components/item_title.vue
+++ b/app/assets/javascripts/work_items/components/item_title.vue
@@ -2,7 +2,10 @@
import { escape } from 'lodash';
import { __ } from '~/locale';
+import { WI_TITLE_TRACK_LABEL } from '../constants';
+
export default {
+ WI_TITLE_TRACK_LABEL,
props: {
initialTitle: {
type: String,
@@ -56,6 +59,7 @@ export default {
role="textbox"
:aria-label="__('Title')"
:data-placeholder="placeholder"
+ :data-track-label="$options.WI_TITLE_TRACK_LABEL"
:contenteditable="!disabled"
class="gl-pseudo-placeholder"
@blur="handleBlur"
diff --git a/app/assets/javascripts/work_items/constants.js b/app/assets/javascripts/work_items/constants.js
index b39f68abf74..995c02a2c5b 100644
--- a/app/assets/javascripts/work_items/constants.js
+++ b/app/assets/javascripts/work_items/constants.js
@@ -1,3 +1,5 @@
export const widgetTypes = {
title: 'TITLE',
};
+
+export const WI_TITLE_TRACK_LABEL = 'item_title';
diff --git a/app/assets/javascripts/work_items/pages/work_item_root.vue b/app/assets/javascripts/work_items/pages/work_item_root.vue
index 479274baf3a..4262e169655 100644
--- a/app/assets/javascripts/work_items/pages/work_item_root.vue
+++ b/app/assets/javascripts/work_items/pages/work_item_root.vue
@@ -1,16 +1,21 @@
<script>
import { GlAlert } from '@gitlab/ui';
+import Tracking from '~/tracking';
import workItemQuery from '../graphql/work_item.query.graphql';
import updateWorkItemMutation from '../graphql/update_work_item.mutation.graphql';
-import { widgetTypes } from '../constants';
+import { widgetTypes, WI_TITLE_TRACK_LABEL } from '../constants';
import ItemTitle from '../components/item_title.vue';
+const trackingMixin = Tracking.mixin();
+
export default {
+ titleUpdatedEvent: 'updated_title',
components: {
ItemTitle,
GlAlert,
},
+ mixins: [trackingMixin],
props: {
id: {
type: String,
@@ -34,6 +39,14 @@ export default {
},
},
computed: {
+ tracking() {
+ return {
+ category: 'workItems:show',
+ action: 'updated_title',
+ label: WI_TITLE_TRACK_LABEL,
+ property: '[type_work_item]',
+ };
+ },
titleWidgetData() {
return this.workItem?.widgets?.nodes?.find((widget) => widget.type === widgetTypes.title);
},
@@ -50,6 +63,7 @@ export default {
},
},
});
+ this.track();
} catch {
this.error = true;
}