Commit eefcb9ab authored by Clement Ho's avatar Clement Ho

Code improvements

parent 6205e9d5
...@@ -4,6 +4,13 @@ import relatedIssueMixin from '../mixins/related_issues_mixin'; ...@@ -4,6 +4,13 @@ import relatedIssueMixin from '../mixins/related_issues_mixin';
export default { export default {
name: 'IssueItem', name: 'IssueItem',
mixins: [relatedIssueMixin], mixins: [relatedIssueMixin],
props: {
canReorder: {
type: Boolean,
required: false,
default: false,
},
},
computed: { computed: {
stateTitle() { stateTitle() {
return this.isOpen ? 'Open' : 'Closed'; return this.isOpen ? 'Open' : 'Closed';
......
...@@ -42,7 +42,6 @@ export default { ...@@ -42,7 +42,6 @@ export default {
:class="{ :class="{
'issue-token-link': isCondensed, 'issue-token-link': isCondensed,
'issue-main-info': !isCondensed, 'issue-main-info': !isCondensed,
'sortable-link': canReorder
}" }"
:href="computedPath" :href="computedPath"
:title="issueTitle" :title="issueTitle"
...@@ -89,7 +88,7 @@ export default { ...@@ -89,7 +88,7 @@ export default {
v-tooltip v-tooltip
ref="removeButton" ref="removeButton"
type="button" type="button"
class="js-issue-token-remove-button flex-right" class="js-issue-token-remove-button"
:class="{ :class="{
'issue-token-remove-button': isCondensed, 'issue-token-remove-button': isCondensed,
'btn btn-default': !isCondensed 'btn btn-default': !isCondensed
......
...@@ -41,11 +41,6 @@ const mixins = { ...@@ -41,11 +41,6 @@ const mixins = {
required: false, required: false,
default: false, default: false,
}, },
canReorder: {
type: Boolean,
required: false,
default: false,
},
}, },
directives: { directives: {
tooltip, tooltip,
......
...@@ -664,6 +664,7 @@ ...@@ -664,6 +664,7 @@
padding-right: $gl-padding; padding-right: $gl-padding;
.issue-main-info { .issue-main-info {
flex: 1 auto;
margin-right: 10px; margin-right: 10px;
min-width: 0; min-width: 0;
} }
......
...@@ -14,7 +14,7 @@ const issuable1 = { ...@@ -14,7 +14,7 @@ const issuable1 = {
title: 'issue1', title: 'issue1',
path: '/foo/bar/issues/123', path: '/foo/bar/issues/123',
state: 'opened', state: 'opened',
destroy_relation_path: '/foo/bar/issues/123/related_issues/1', relation_path: '/foo/bar/issues/123/related_issues/1',
}; };
const issuable2 = { const issuable2 = {
...@@ -23,7 +23,7 @@ const issuable2 = { ...@@ -23,7 +23,7 @@ const issuable2 = {
title: 'issue1', title: 'issue1',
path: '/foo/bar/issues/124', path: '/foo/bar/issues/124',
state: 'opened', state: 'opened',
destroy_relation_path: '/foo/bar/issues/124/related_issues/1', relation_path: '/foo/bar/issues/124/related_issues/1',
}; };
describe('RelatedIssuesRoot', () => { describe('RelatedIssuesRoot', () => {
......
...@@ -6,7 +6,7 @@ const issuable1 = { ...@@ -6,7 +6,7 @@ const issuable1 = {
title: 'issue1', title: 'issue1',
path: '/foo/bar/issues/123', path: '/foo/bar/issues/123',
state: 'opened', state: 'opened',
destroy_relation_path: '/foo/bar/issues/123/related_issues/1', relation_path: '/foo/bar/issues/123/related_issues/1',
}; };
const issuable2 = { const issuable2 = {
...@@ -15,7 +15,7 @@ const issuable2 = { ...@@ -15,7 +15,7 @@ const issuable2 = {
title: 'issue1', title: 'issue1',
path: '/foo/bar/issues/124', path: '/foo/bar/issues/124',
state: 'opened', state: 'opened',
destroy_relation_path: '/foo/bar/issues/124/related_issues/1', relation_path: '/foo/bar/issues/124/related_issues/1',
}; };
describe('RelatedIssuesStore', () => { describe('RelatedIssuesStore', () => {
......
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