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
All threads resolved!
Compare and Show latest version
5 files
+ 66
38
Compare changes
  • Side-by-side
  • Inline
Files
5
@@ -64,6 +64,30 @@ export default {
showInfoBanner: true,
};
},
apollo: {
workItem: {
query: workItemQuery,
variables() {
return {
id: this.workItemId,
};
},
skip() {
return !this.workItemId;
},
error() {
this.error = this.$options.i18n.fetchError;
},
subscribeToMore: {
document: workItemTitleSubscription,
variables() {
return {
issuableId: this.workItemId,
};
},
},
},
},
computed: {
workItemLoading() {
return this.$apollo.queries.workItem.loading;
@@ -92,39 +116,24 @@ export default {
workItemWeight() {
return this.workItem?.mockWidgets?.find((widget) => widget.type === WIDGET_TYPE_WEIGHT);
},
workItemHierarchy() {
return this.workItem?.widgets?.find((widget) => widget.type === WIDGET_TYPE_HIERARCHY);
},
parentWorkItem() {
return this.workItemHierarchy?.parent;
},
parentUrl() {
return `../../issues/${this.parentWorkItem?.iid}`;
},
},
beforeDestroy() {
/** make sure that if the user has not even dismissed the alert ,
* should no be able to see the information next time and update the local storage * */
this.showInfoBanner = false;
this.dismissBanner();
},
methods: {
updateShowInfoBanner(value) {
this.showInfoBanner = value;
},
},
apollo: {
workItem: {
query: workItemQuery,
variables() {
return {
id: this.workItemId,
};
},
skip() {
return !this.workItemId;
},
error() {
this.error = this.$options.i18n.fetchError;
},
subscribeToMore: {
document: workItemTitleSubscription,
variables() {
return {
issuableId: this.workItemId,
};
},
},
dismissBanner() {
this.showInfoBanner = false;
},
},
WORK_ITEM_VIEWED_STORAGE_KEY,
@@ -176,20 +185,20 @@ export default {
<gl-button
v-if="isModal"
category="tertiary"
data-testid="work-item-close"
icon="close"
:aria-label="__('Close')"
@click="$emit('close')"
/>
</div>
<local-storage-sync
:value="showInfoBanner"
v-model="showInfoBanner"
:storage-key="$options.WORK_ITEM_VIEWED_STORAGE_KEY"
@input="updateShowInfoBanner"
>
<work-item-information
v-if="showInfoBanner"
:show-info-banner="showInfoBanner"
@work-item-banner-dismissed="updateShowInfoBanner"
@work-item-banner-dismissed="dismissBanner"
/>
</local-storage-sync>
<work-item-title
Loading