Commit 2d8961cc authored by Kushal Pandya's avatar Kushal Pandya

Merge branch 'jira-issues-root-cleanup' into 'master'

Jira issues root cleanup

See merge request gitlab-org/gitlab!60468
parents e8a8089b 99d42aed
...@@ -274,44 +274,47 @@ export default { ...@@ -274,44 +274,47 @@ export default {
<gl-skeleton-loading /> <gl-skeleton-loading />
</li> </li>
</ul> </ul>
<component <template v-else>
:is="issuablesWrapper" <component
v-if="!issuablesLoading && issuables.length" :is="issuablesWrapper"
class="content-list issuable-list issues-list" v-if="issuables.length > 0"
:class="{ 'manual-ordering': isManualOrdering }" class="content-list issuable-list issues-list"
v-bind="$options.vueDraggableAttributes" :class="{ 'manual-ordering': isManualOrdering }"
@update="handleVueDraggableUpdate" v-bind="$options.vueDraggableAttributes"
> @update="handleVueDraggableUpdate"
<issuable-item
v-for="issuable in issuables"
:key="issuableId(issuable)"
:class="{ 'gl-cursor-grab': isManualOrdering }"
:issuable-symbol="issuableSymbol"
:issuable="issuable"
:enable-label-permalinks="enableLabelPermalinks"
:label-filter-param="labelFilterParam"
:show-checkbox="showBulkEditSidebar"
:checked="issuableChecked(issuable)"
@checked-input="handleIssuableCheckedInput(issuable, $event)"
> >
<template #reference> <issuable-item
<slot name="reference" :issuable="issuable"></slot> v-for="issuable in issuables"
</template> :key="issuableId(issuable)"
<template #author> :class="{ 'gl-cursor-grab': isManualOrdering }"
<slot name="author" :author="issuable.author"></slot> :issuable-symbol="issuableSymbol"
</template> :issuable="issuable"
<template #timeframe> :enable-label-permalinks="enableLabelPermalinks"
<slot name="timeframe" :issuable="issuable"></slot> :label-filter-param="labelFilterParam"
</template> :show-checkbox="showBulkEditSidebar"
<template #status> :checked="issuableChecked(issuable)"
<slot name="status" :issuable="issuable"></slot> @checked-input="handleIssuableCheckedInput(issuable, $event)"
</template> >
<template #statistics> <template #reference>
<slot name="statistics" :issuable="issuable"></slot> <slot name="reference" :issuable="issuable"></slot>
</template> </template>
</issuable-item> <template #author>
</component> <slot name="author" :author="issuable.author"></slot>
<slot v-if="!issuablesLoading && !issuables.length" name="empty-state"></slot> </template>
<template #timeframe>
<slot name="timeframe" :issuable="issuable"></slot>
</template>
<template #status>
<slot name="status" :issuable="issuable"></slot>
</template>
<template #statistics>
<slot name="statistics" :issuable="issuable"></slot>
</template>
</issuable-item>
</component>
<slot v-else name="empty-state"></slot>
</template>
<gl-pagination <gl-pagination
v-if="showPaginationControls" v-if="showPaginationControls"
:per-page="defaultPageSize" :per-page="defaultPageSize"
......
...@@ -48,12 +48,13 @@ export default { ...@@ -48,12 +48,13 @@ export default {
<template #title> <template #title>
<span :title="tab.titleTooltip">{{ tab.title }}</span> <span :title="tab.titleTooltip">{{ tab.title }}</span>
<gl-badge <gl-badge
v-if="isTabCountNumeric(tab)" v-if="tabCounts && isTabCountNumeric(tab)"
variant="neutral" variant="neutral"
size="sm" size="sm"
class="gl-tab-counter-badge" class="gl-tab-counter-badge"
>{{ tabCounts[tab.name] }}</gl-badge
> >
{{ tabCounts[tab.name] }}
</gl-badge>
</template> </template>
</gl-tab> </gl-tab>
</gl-tabs> </gl-tabs>
......
...@@ -206,19 +206,19 @@ export default { ...@@ -206,19 +206,19 @@ export default {
</template> </template>
<template #reference="{ issuable }"> <template #reference="{ issuable }">
<span v-safe-html="jiraLogo" class="svg-container jira-logo-container"></span> <span v-safe-html="jiraLogo" class="svg-container jira-logo-container"></span>
<span>{{ issuable.references.relative }}</span> <span v-if="issuable">{{ issuable.references.relative }}</span>
</template> </template>
<template #author="{ author }"> <template #author="{ author }">
<gl-sprintf message="%{authorName} in Jira"> <gl-sprintf message="%{authorName} in Jira">
<template #authorName> <template #authorName>
<gl-link class="author-link js-user-link" target="_blank" :href="author.webUrl" <gl-link class="author-link js-user-link" target="_blank" :href="author.webUrl">
>{{ author.name }} {{ author.name }}
</gl-link> </gl-link>
</template> </template>
</gl-sprintf> </gl-sprintf>
</template> </template>
<template #status="{ issuable }"> <template #status="{ issuable }">
{{ issuable.status }} <template v-if="issuable"> {{ issuable.status }} </template>
</template> </template>
<template #empty-state> <template #empty-state>
<jira-issues-list-empty-state <jira-issues-list-empty-state
......
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`JiraIssuesListRoot renders issuable-list component with correct props 1`] = `
Object {
"currentPage": 1,
"currentTab": "opened",
"defaultPageSize": 2,
"enableLabelPermalinks": true,
"initialFilterValue": Array [
Object {
"type": "filtered-search-term",
"value": Object {
"data": "foo",
},
},
],
"initialSortBy": "created_desc",
"isManualOrdering": false,
"issuableSymbol": "#",
"issuables": Array [],
"issuablesLoading": false,
"labelFilterParam": "labels",
"namespace": "gitlab-org/gitlab-test",
"nextPage": 2,
"previousPage": 0,
"recentSearchesStorageKey": "jira_issues",
"searchInputPlaceholder": "Search Jira issues",
"searchTokens": Array [],
"showBulkEditSidebar": false,
"showPaginationControls": false,
"sortOptions": Array [
Object {
"id": 1,
"sortDirection": Object {
"ascending": "created_asc",
"descending": "created_desc",
},
"title": "Created date",
},
Object {
"id": 2,
"sortDirection": Object {
"ascending": "updated_asc",
"descending": "updated_desc",
},
"title": "Last updated",
},
],
"tabCounts": null,
"tabs": Array [
Object {
"id": "state-opened",
"name": "opened",
"title": "Open",
"titleTooltip": "Filter by issues that are currently opened.",
},
Object {
"id": "state-closed",
"name": "closed",
"title": "Closed",
"titleTooltip": "Filter by issues that are currently closed.",
},
Object {
"id": "state-all",
"name": "all",
"title": "All",
"titleTooltip": "Show all issues.",
},
],
"totalItems": 0,
"urlParams": Object {
"labels[]": undefined,
"page": 1,
"search": "foo",
"sort": "created_desc",
"state": "opened",
},
}
`;
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment