Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
bfdde96f
Commit
bfdde96f
authored
Jan 17, 2018
by
Simon Knox
Committed by
Douwe Maan
Jan 17, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Resolve "Closed issue label in todo's styling is difficult to read"
parent
f2b7da8a
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
25 additions
and
13 deletions
+25
-13
app/assets/javascripts/merge_request.js
app/assets/javascripts/merge_request.js
+5
-4
app/assets/javascripts/vue_merge_request_widget/components/states/mr_widget_ready_to_merge.js
...uest_widget/components/states/mr_widget_ready_to_merge.js
+1
-1
app/assets/stylesheets/framework/issue_box.scss
app/assets/stylesheets/framework/issue_box.scss
+3
-5
app/helpers/issues_helper.rb
app/helpers/issues_helper.rb
+1
-1
app/helpers/todos_helper.rb
app/helpers/todos_helper.rb
+9
-1
changelogs/unreleased/41874-closed-todo.yml
changelogs/unreleased/41874-closed-todo.yml
+5
-0
spec/javascripts/vue_mr_widget/components/states/mr_widget_ready_to_merge_spec.js
...widget/components/states/mr_widget_ready_to_merge_spec.js
+1
-1
No files found.
app/assets/javascripts/merge_request.js
View file @
bfdde96f
/* eslint-disable func-names, space-before-function-paren, no-var, prefer-rest-params, wrap-iife, quotes, no-underscore-dangle, one-var, one-var-declaration-per-line, consistent-return, dot-notation, quote-props, comma-dangle, object-shorthand, max-len, prefer-arrow-callback */
import
'
vendor/jquery.waitforimages
'
;
import
{
__
}
from
'
~/locale
'
;
import
TaskList
from
'
./task_list
'
;
import
MergeRequestTabs
from
'
./merge_request_tabs
'
;
import
IssuablesHelper
from
'
./helpers/issuables_helper
'
;
...
...
@@ -110,12 +111,12 @@ MergeRequest.prototype.initCommitMessageListeners = function() {
});
};
MergeRequest
.
updateStatusText
=
function
(
classToRemove
,
classToAdd
,
newStatusText
)
{
MergeRequest
.
setStatusBoxToMerged
=
function
(
)
{
$
(
'
.detail-page-header .status-box
'
)
.
removeClass
(
classToRemove
)
.
addClass
(
classToAdd
)
.
removeClass
(
'
status-box-open
'
)
.
addClass
(
'
status-box-mr-merged
'
)
.
find
(
'
span
'
)
.
text
(
newStatusText
);
.
text
(
__
(
'
Merged
'
)
);
};
MergeRequest
.
decreaseCounter
=
function
(
by
=
1
)
{
...
...
app/assets/javascripts/vue_merge_request_widget/components/states/mr_widget_ready_to_merge.js
View file @
bfdde96f
...
...
@@ -166,7 +166,7 @@ export default {
// If state is merged we should update the widget and stop the polling
eventHub
.
$emit
(
'
MRWidgetUpdateRequested
'
);
eventHub
.
$emit
(
'
FetchActionsContent
'
);
MergeRequest
.
updateStatusText
(
'
status-box-open
'
,
'
status-box-merged
'
,
'
Merged
'
);
MergeRequest
.
setStatusBoxToMerged
(
);
MergeRequest
.
hideCloseButton
();
MergeRequest
.
decreaseCounter
();
stopPolling
();
...
...
app/assets/stylesheets/framework/issue_box.scss
View file @
bfdde96f
...
...
@@ -24,15 +24,13 @@
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
{
&
.status-box-issue-closed
,
&
.status-box-mr-merged
{
background-color
:
$gl-primary
;
}
...
...
app/helpers/issues_helper.rb
View file @
bfdde96f
...
...
@@ -72,7 +72,7 @@ module IssuesHelper
if
item
.
try
(
:expired?
)
'status-box-expired'
elsif
item
.
try
(
:merged?
)
'status-box-merged'
'status-box-m
r-m
erged'
elsif
item
.
closed?
'status-box-mr-closed'
elsif
item
.
try
(
:upcoming?
)
...
...
app/helpers/todos_helper.rb
View file @
bfdde96f
...
...
@@ -54,8 +54,16 @@ module TodosHelper
def
todo_target_state_pill
(
todo
)
return
unless
show_todo_state?
(
todo
)
type
=
case
todo
.
target
when
MergeRequest
'mr'
when
Issue
'issue'
end
content_tag
(
:span
,
nil
,
class:
'target-status'
)
do
content_tag
(
:span
,
nil
,
class:
"status-box status-box-
#{
todo
.
target
.
state
.
dasherize
}
"
)
do
content_tag
(
:span
,
nil
,
class:
"status-box status-box-
#{
t
ype
}
-
#{
t
odo
.
target
.
state
.
dasherize
}
"
)
do
todo
.
target
.
state
.
capitalize
end
end
...
...
changelogs/unreleased/41874-closed-todo.yml
0 → 100644
View file @
bfdde96f
---
title
:
Fix closed text for issues on Todos page
merge_request
:
author
:
type
:
fixed
spec/javascripts/vue_mr_widget/components/states/mr_widget_ready_to_merge_spec.js
View file @
bfdde96f
...
...
@@ -404,7 +404,7 @@ describe('MRWidgetReadyToMerge', () => {
setTimeout
(()
=>
{
const
statusBox
=
document
.
querySelector
(
'
.status-box
'
);
expect
(
statusBox
.
classList
.
contains
(
'
status-box-merged
'
)).
toBeTruthy
();
expect
(
statusBox
.
classList
.
contains
(
'
status-box-m
r-m
erged
'
)).
toBeTruthy
();
expect
(
statusBox
.
textContent
).
toContain
(
'
Merged
'
);
done
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment