Merge branch '33926-update-issuable-icons' into 'master'

Update issuable status icons

Closes #33926

See merge request gitlab-org/gitlab-ce!15898
This commit is contained in:
Annabel Dunstone Gray 2017-12-13 19:14:38 +00:00
commit 9d0fc98c7d
9 changed files with 32 additions and 15 deletions

View file

@ -48,7 +48,7 @@ export default class Issue {
}) })
.fail(() => new Flash(issueFailMessage)) .fail(() => new Flash(issueFailMessage))
.done((data) => { .done((data) => {
const isClosedBadge = $('div.status-box-closed'); const isClosedBadge = $('div.status-box-issue-closed');
const isOpenBadge = $('div.status-box-open'); const isOpenBadge = $('div.status-box-open');
const projectIssuesCounter = $('.issue_counter'); const projectIssuesCounter = $('.issue_counter');

View file

@ -24,10 +24,14 @@
font-size: $gl-font-size; font-size: $gl-font-size;
line-height: 25px; line-height: 25px;
&.status-box-closed { &.status-box-mr-closed {
background-color: $gl-danger; background-color: $gl-danger;
} }
&.status-box-issue-closed {
background-color: $gl-primary;
}
&.status-box-merged { &.status-box-merged {
background-color: $gl-primary; background-color: $gl-primary;
} }

View file

@ -610,11 +610,19 @@
} }
.issuable-status-box { .issuable-status-box {
float: none; align-self: stretch;
display: inline-block; display: flex;
justify-content: center;
align-items: center;
margin-top: 0; margin-top: 0;
padding-left: 9px;
padding-right: 9px;
@media (min-width: $screen-sm-min) {
display: inline-block;
height: auto; height: auto;
align-self: center; align-self: center;
}
} }
.issuable-gutter-toggle { .issuable-gutter-toggle {

View file

@ -74,7 +74,7 @@ module IssuesHelper
elsif item.try(:merged?) elsif item.try(:merged?)
'status-box-merged' 'status-box-merged'
elsif item.closed? elsif item.closed?
'status-box-closed' 'status-box-mr-closed'
elsif item.try(:upcoming?) elsif item.try(:upcoming?)
'status-box-upcoming' 'status-box-upcoming'
else else

View file

@ -887,11 +887,11 @@ class MergeRequest < ActiveRecord::Base
def state_icon_name def state_icon_name
if merged? if merged?
"check" "git-merge"
elsif closed? elsif closed?
"times" "close"
else else
"circle-o" "issue-open-m"
end end
end end

View file

@ -14,12 +14,12 @@
.detail-page-header .detail-page-header
.detail-page-header-body .detail-page-header-body
.issuable-status-box.status-box.status-box-closed{ class: issue_button_visibility(@issue, false) } .issuable-status-box.status-box.status-box-issue-closed{ class: issue_button_visibility(@issue, false) }
= icon('check', class: "hidden-sm hidden-md hidden-lg") = sprite_icon('mobile-issue-close', size: 16, css_class: 'hidden-sm hidden-md hidden-lg')
%span.hidden-xs %span.hidden-xs
Closed Closed
.issuable-status-box.status-box.status-box-open{ class: issue_button_visibility(@issue, true) } .issuable-status-box.status-box.status-box-open{ class: issue_button_visibility(@issue, true) }
= icon('circle-o', class: "hidden-sm hidden-md hidden-lg") = sprite_icon('issue-open-m', size: 16, css_class: 'hidden-sm hidden-md hidden-lg')
%span.hidden-xs Open %span.hidden-xs Open
.issuable-meta .issuable-meta

View file

@ -7,7 +7,7 @@
.detail-page-header .detail-page-header
.detail-page-header-body .detail-page-header-body
.issuable-status-box.status-box{ class: status_box_class(@merge_request) } .issuable-status-box.status-box{ class: status_box_class(@merge_request) }
= icon(@merge_request.state_icon_name, class: "hidden-sm hidden-md hidden-lg") = sprite_icon(@merge_request.state_icon_name, size: 16, css_class: 'hidden-sm hidden-md hidden-lg')
%span.hidden-xs %span.hidden-xs
= @merge_request.state_human_name = @merge_request.state_human_name

View file

@ -0,0 +1,5 @@
---
title: Update issuable status icons
merge_request: 15898
author:
type: changed

View file

@ -55,7 +55,7 @@ describe('Issue', function() {
} }
function findElements(isIssueInitiallyOpen) { function findElements(isIssueInitiallyOpen) {
$boxClosed = $('div.status-box-closed'); $boxClosed = $('div.status-box-issue-closed');
expect($boxClosed).toExist(); expect($boxClosed).toExist();
expect($boxClosed).toHaveText('Closed'); expect($boxClosed).toHaveText('Closed');