summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwinniehell <git@winniehell.de>2016-07-20 14:01:29 +0200
committerwinniehell <git@winniehell.de>2016-08-16 23:34:23 +0200
commitbd02aa193d890baf15fc18d67ac3d471333d0e1c (patch)
treeec3c37a7de60ad1014690594d7a0f3e3bbbdbbcf
parent7dde4ed26b27fb4524687cfc73c4bf765300bfa3 (diff)
downloadgitlab-ce-bd02aa193d890baf15fc18d67ac3d471333d0e1c.tar.gz
Add hover state to todos (!5361)
-rw-r--r--CHANGELOG1
-rw-r--r--app/assets/stylesheets/pages/todos.scss47
-rw-r--r--app/views/dashboard/todos/_todo.html.haml15
3 files changed, 49 insertions, 14 deletions
diff --git a/CHANGELOG b/CHANGELOG
index a92c85873c4..5fdb4c2ec3a 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -41,6 +41,7 @@ v 8.11.0 (unreleased)
- Update `timeago` plugin to use multiple string/locale settings
- Remove unused images (ClemMakesApps)
- Get issue and merge request description templates from repositories
+ - Add hover state to todos !5361 (winniehell)
- Limit git rev-list output count to one in forced push check
- Show deployment status on merge requests with external URLs
- Clean up unused routes (Josef Strzibny)
diff --git a/app/assets/stylesheets/pages/todos.scss b/app/assets/stylesheets/pages/todos.scss
index cf16d070cfe..0340526a53a 100644
--- a/app/assets/stylesheets/pages/todos.scss
+++ b/app/assets/stylesheets/pages/todos.scss
@@ -20,10 +20,43 @@
}
}
-.todo {
+.todos-list > .todo {
+ // workaround because we cannot use border-colapse
+ border-top: 1px solid transparent;
+ display: -webkit-flex;
+ display: flex;
+ -webkit-flex-direction: row;
+ flex-direction: row;
+
&:hover {
+ background-color: $row-hover;
+ border-color: $row-hover-border;
cursor: pointer;
}
+
+ // overwrite border style of .content-list
+ &:last-child {
+ border-bottom: 1px solid transparent;
+
+ &:hover {
+ border-color: $row-hover-border;
+ }
+ }
+
+ .todo-actions {
+ display: -webkit-flex;
+ display: flex;
+ -webkit-justify-content: center;
+ justify-content: center;
+ -webkit-flex-direction: column;
+ flex-direction: column;
+ margin-left: 10px;
+ }
+
+ .todo-item {
+ -webkit-flex: auto;
+ flex: auto;
+ }
}
.todo-item {
@@ -43,8 +76,6 @@
}
.todo-body {
- margin-right: 174px;
-
.todo-note {
word-wrap: break-word;
@@ -90,6 +121,12 @@
}
@media (max-width: $screen-xs-max) {
+ .todo {
+ .avatar {
+ display: none;
+ }
+ }
+
.todo-item {
.todo-title {
white-space: normal;
@@ -98,10 +135,6 @@
margin-bottom: 10px;
}
- .avatar {
- display: none;
- }
-
.todo-body {
margin: 0;
border-left: 2px solid #ddd;
diff --git a/app/views/dashboard/todos/_todo.html.haml b/app/views/dashboard/todos/_todo.html.haml
index 98f302d2f93..b40395c74de 100644
--- a/app/views/dashboard/todos/_todo.html.haml
+++ b/app/views/dashboard/todos/_todo.html.haml
@@ -1,6 +1,7 @@
%li{class: "todo todo-#{todo.done? ? 'done' : 'pending'}", id: dom_id(todo), data:{url: todo_target_path(todo)} }
+ = author_avatar(todo, size: 40)
+
.todo-item.todo-block
- = image_tag avatar_icon(todo.author_email, 40), class: 'avatar s40', alt:''
.todo-title.title
- unless todo.build_failed?
= todo_target_state_pill(todo)
@@ -19,13 +20,13 @@
&middot; #{time_ago_with_tooltip(todo.created_at)}
- - if todo.pending?
- .todo-actions.pull-right
- = link_to [:dashboard, todo], method: :delete, class: 'btn btn-loading done-todo' do
- Done
- = icon('spinner spin')
-
.todo-body
.todo-note
.md
= event_note(todo.body, project: todo.project)
+
+ - if todo.pending?
+ .todo-actions
+ = link_to [:dashboard, todo], method: :delete, class: 'btn btn-loading done-todo' do
+ Done
+ = icon('spinner spin')