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
0
Merge Requests
0
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
Léo-Paul Géneau
gitlab-ce
Commits
b9ad4ecc
Commit
b9ad4ecc
authored
Oct 23, 2018
by
Kushal Pandya
Committed by
Annabel Dunstone Gray
Oct 23, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update Todo icons in collapsed sidebar for Issues and MRs
parent
d16ef877
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
17 additions
and
8 deletions
+17
-8
app/helpers/issuables_helper.rb
app/helpers/issuables_helper.rb
+2
-2
app/views/shared/issuable/_sidebar_todo.html.haml
app/views/shared/issuable/_sidebar_todo.html.haml
+2
-2
changelogs/unreleased/32959-update-todo-icon.yml
changelogs/unreleased/32959-update-todo-icon.yml
+5
-0
spec/javascripts/collapsed_sidebar_todo_spec.js
spec/javascripts/collapsed_sidebar_todo_spec.js
+8
-4
No files found.
app/helpers/issuables_helper.rb
View file @
b9ad4ecc
...
...
@@ -386,8 +386,8 @@ module IssuablesHelper
{
todo_text:
"Add todo"
,
mark_text:
"Mark todo as done"
,
todo_icon:
(
is_collapsed
?
icon
(
'plus-square
'
)
:
nil
),
mark_icon:
(
is_collapsed
?
icon
(
'check-square'
,
class:
'todo-undone'
)
:
nil
),
todo_icon:
(
is_collapsed
?
sprite_icon
(
'todo-add
'
)
:
nil
),
mark_icon:
(
is_collapsed
?
sprite_icon
(
'todo-done'
,
css_
class:
'todo-undone'
)
:
nil
),
issuable_id:
issuable
.
id
,
issuable_type:
issuable
.
class
.
name
.
underscore
,
url:
project_todos_path
(
@project
),
...
...
app/views/shared/issuable/_sidebar_todo.html.haml
View file @
b9ad4ecc
-
is_collapsed
=
local_assigns
.
fetch
(
:is_collapsed
,
false
)
-
mark_content
=
is_collapsed
?
icon
(
'check-square'
,
class:
'todo-undone'
)
:
_
(
'Mark todo as done'
)
-
todo_content
=
is_collapsed
?
icon
(
'plus-square
'
)
:
_
(
'Add todo'
)
-
mark_content
=
is_collapsed
?
sprite_icon
(
'todo-done'
,
css_
class:
'todo-undone'
)
:
_
(
'Mark todo as done'
)
-
todo_content
=
is_collapsed
?
sprite_icon
(
'todo-add
'
)
:
_
(
'Add todo'
)
%button
.issuable-todo-btn.js-issuable-todo
{
type:
'button'
,
class:
(
is_collapsed
?
'btn-blank sidebar-collapsed-icon dont-change-state has-tooltip'
:
'btn btn-default issuable-header-btn float-right'
),
...
...
changelogs/unreleased/32959-update-todo-icon.yml
0 → 100644
View file @
b9ad4ecc
---
title
:
Update Todo icons in collapsed sidebar for Issues and MRs
merge_request
:
22534
author
:
type
:
changed
spec/javascripts/collapsed_sidebar_todo_spec.js
View file @
b9ad4ecc
...
...
@@ -45,8 +45,10 @@ describe('Issuable right sidebar collapsed todo toggle', () => {
expect
(
document
.
querySelector
(
'
.js-issuable-todo.sidebar-collapsed-icon
'
)).
not
.
toBeNull
();
expect
(
document
.
querySelector
(
'
.js-issuable-todo.sidebar-collapsed-icon .fa-plus-square
'
),
).
not
.
toBeNull
();
document
.
querySelector
(
'
.js-issuable-todo.sidebar-collapsed-icon svg use
'
)
.
getAttribute
(
'
xlink:href
'
),
).
toContain
(
'
todo-add
'
);
expect
(
document
.
querySelector
(
'
.js-issuable-todo.sidebar-collapsed-icon .todo-undone
'
),
...
...
@@ -68,8 +70,10 @@ describe('Issuable right sidebar collapsed todo toggle', () => {
).
not
.
toBeNull
();
expect
(
document
.
querySelector
(
'
.js-issuable-todo.sidebar-collapsed-icon .fa-check-square
'
),
).
not
.
toBeNull
();
document
.
querySelector
(
'
.js-issuable-todo.sidebar-collapsed-icon svg.todo-undone use
'
)
.
getAttribute
(
'
xlink:href
'
),
).
toContain
(
'
todo-done
'
);
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