Skip to content
Snippets Groups Projects

Work Items - Tasks First Time Experience

Merged Deepika Guliani requested to merge 366687-work-items-tasks-first-time-experience into master
3 files
+ 51
11
Compare changes
  • Side-by-side
  • Inline
Files
3
@@ -2,13 +2,15 @@
import { GlAlert, GlSprintf, GlLink } from '@gitlab/ui';
import glFeatureFlagMixin from '~/vue_shared/mixins/gl_feature_flags_mixin';
import LocalStorageSync from '~/vue_shared/components/local_storage_sync.vue';
import { __, s__ } from '~/locale';
import { s__ } from '~/locale';
import { helpPagePath } from '~/helpers/help_page_helper';
import { WORK_ITEM_VIEWED_COUNTER_KEY } from '../constants';
import { WORK_ITEM_VIEWED_STORAGE_KEY } from '../constants';
export default {
i18n: {
learnTasksButtonText: s__('WorkItem|Learn about tasks'),
workItemsText: s__('WorkItem|work items'),
tasksInformationTitle: s__('WorkItem|Introducing tasks'),
},
components: {
GlAlert,
@@ -45,19 +47,16 @@ export default {
showWorkItemInformation() {
return this.workItemAccessCounter > 1;
},
informationTitle() {
return s__('Introducing tasks');
},
informationBody() {
return s__(
'A task provides the ability to break down your work into smaller pieces tied to an issue. Tasks are the first items using our new %{workItemsLink} objects. Additional work item types will be coming soon',
'A task provides the ability to break down your work into smaller pieces tied to an issue. Tasks are the first items using our new %{workItemsLink} objects. Additional work item types will be coming soon.',
);
},
},
mounted() {
this.workItemAccessCounter += 1;
},
WORK_ITEM_VIEWED_COUNTER_KEY,
WORK_ITEM_VIEWED_STORAGE_KEY,
};
</script>
@@ -65,19 +64,20 @@ export default {
<section class="gl-display-block gl-mb-2">
<local-storage-sync
v-model="workItemAccessCounter"
:storage-key="$options.WORK_ITEM_VIEWED_COUNTER_KEY"
:storage-key="$options.WORK_ITEM_VIEWED_STORAGE_KEY"
/>
<gl-alert
v-if="showWorkItemInformation"
variant="info"
:title="informationTitle"
:title="$options.i18n.tasksInformationTitle"
:primary-button-link="tasksDocLinkPath"
:primary-button-text="$options.i18n.learnTasksButtonText"
data-testid="work-item-information"
@dismiss="showInfo = false"
>
<gl-sprintf :message="informationBody">
<template #workItemsLink>
<gl-link :href="workItemsLinkPath">{{ __('work items') }}</gl-link>
<gl-link :href="workItemsLinkPath">{{ $options.i18n.workItemsText }}</gl-link>
</template>
></gl-sprintf
>
Loading