Update issuable status icons

Fix https://gitlab.com/gitlab-org/gitlab-ce/issues/33926

Changed file icons already addressed in
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/15367
This commit is contained in:
Eric Eastwood 2017-12-12 21:44:59 -06:00
parent 31fa931399
commit a5439897d2
9 changed files with 32 additions and 15 deletions

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -14,12 +14,12 @@
.detail-page-header
.detail-page-header-body
.issuable-status-box.status-box.status-box-closed{ class: issue_button_visibility(@issue, false) }
= icon('check', class: "hidden-sm hidden-md hidden-lg")
.issuable-status-box.status-box.status-box-issue-closed{ class: issue_button_visibility(@issue, false) }
= sprite_icon('mobile-issue-close', size: 16, css_class: 'hidden-sm hidden-md hidden-lg')
%span.hidden-xs
Closed
.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
.issuable-meta

View file

@ -7,7 +7,7 @@
.detail-page-header
.detail-page-header-body
.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
= @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) {
$boxClosed = $('div.status-box-closed');
$boxClosed = $('div.status-box-issue-closed');
expect($boxClosed).toExist();
expect($boxClosed).toHaveText('Closed');