Commit 1676eca9 authored by Mike Greiling's avatar Mike Greiling

Merge branch '34723-visually-differentiate-blocked-issues' into 'master'

Add blocked icon on issue board card

Closes #34723

See merge request gitlab-org/gitlab!24420
parents 3bbb9a7b 3e93d7f8
...@@ -161,6 +161,14 @@ export default { ...@@ -161,6 +161,14 @@ export default {
<div> <div>
<div class="d-flex board-card-header" dir="auto"> <div class="d-flex board-card-header" dir="auto">
<h4 class="board-card-title append-bottom-0 prepend-top-0"> <h4 class="board-card-title append-bottom-0 prepend-top-0">
<icon
v-if="issue.blocked"
v-gl-tooltip
name="issue-block"
:title="__('Blocked issue')"
class="issue-blocked-icon append-right-4"
:aria-label="__('Blocked issue')"
/>
<icon <icon
v-if="issue.confidential" v-if="issue.confidential"
v-gl-tooltip v-gl-tooltip
......
...@@ -37,6 +37,7 @@ class ListIssue { ...@@ -37,6 +37,7 @@ class ListIssue {
this.project_id = obj.project_id; this.project_id = obj.project_id;
this.timeEstimate = obj.time_estimate; this.timeEstimate = obj.time_estimate;
this.assignableLabelsEndpoint = obj.assignable_labels_endpoint; this.assignableLabelsEndpoint = obj.assignable_labels_endpoint;
this.blocked = obj.blocked;
if (obj.project) { if (obj.project) {
this.project = new IssueProject(obj.project); this.project = new IssueProject(obj.project);
......
...@@ -287,6 +287,10 @@ ...@@ -287,6 +287,10 @@
cursor: help; cursor: help;
} }
.issue-blocked-icon {
color: $red-500;
}
@include media-breakpoint-down(md) { @include media-breakpoint-down(md) {
padding: $gl-padding-8; padding: $gl-padding-8;
} }
......
---
title: Add blocked icon on issue board card
merge_request: 24420
author:
type: added
...@@ -303,6 +303,14 @@ Different issue board features are available in different [GitLab tiers](https:/ ...@@ -303,6 +303,14 @@ Different issue board features are available in different [GitLab tiers](https:/
| Premium / Silver | Multiple | Multiple | Yes | Yes | | Premium / Silver | Multiple | Multiple | Yes | Yes |
| Ultimate / Gold | Multiple | Multiple | Yes | Yes | | Ultimate / Gold | Multiple | Multiple | Yes | Yes |
## Blocked issues
> [Introduced](https://gitlab.com/gitlab-org/gitlab/issues/34723) in GitLab 12.8.
If an issue is blocked by another issue, an icon will display next to its title to differentiate it from unblocked issues.
![Blocked issues](img/issue_boards_blocked_icon_v12_8.png)
## Actions you can take on an Issue Board ## Actions you can take on an Issue Board
- [Create a new list](#creating-a-new-list). - [Create a new list](#creating-a-new-list).
......
...@@ -2768,6 +2768,9 @@ msgstr "" ...@@ -2768,6 +2768,9 @@ msgstr ""
msgid "Blocked" msgid "Blocked"
msgstr "" msgstr ""
msgid "Blocked issue"
msgstr ""
msgid "Blocks" msgid "Blocks"
msgstr "" msgstr ""
......
...@@ -66,7 +66,11 @@ describe('Issue card component', () => { ...@@ -66,7 +66,11 @@ describe('Issue card component', () => {
}); });
it('does not render confidential icon', () => { it('does not render confidential icon', () => {
expect(wrapper.find('.fa-eye-flash').exists()).toBe(false); expect(wrapper.find('.confidential-icon').exists()).toBe(false);
});
it('does not render blocked icon', () => {
expect(wrapper.find('.issue-blocked-icon').exists()).toBe(false);
}); });
it('renders confidential icon', done => { it('renders confidential icon', done => {
...@@ -324,4 +328,20 @@ describe('Issue card component', () => { ...@@ -324,4 +328,20 @@ describe('Issue card component', () => {
.catch(done.fail); .catch(done.fail);
}); });
}); });
describe('blocked', () => {
beforeEach(done => {
wrapper.setProps({
issue: {
...wrapper.props('issue'),
blocked: true,
},
});
wrapper.vm.$nextTick(done);
});
it('renders blocked icon if issue is blocked', () => {
expect(wrapper.find('.issue-blocked-icon').exists()).toBe(true);
});
});
}); });
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