-
Notifications
You must be signed in to change notification settings - Fork 434
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Redesign notifications view to be more compact
A notification has now a more compact aspect. Specially useful on small screens. Using icons, colors and avatars makes it easier to understand at a glance. - An icon represents each kind of notification: request or comment. - Review notifications are going to be replaced by requests notifications with "in review" state. - Display the state of the request clearly. - Link to the comments box and not the comment itself. - Display all users involved in notifications - In case of request's notifications, it also displays all the reviewers including groups, projects and packages. Co-authored-by: David Kang <dkang@suse.com> Co-authored-by: Eduardo Navarro <enavarro@suse.com>
- Loading branch information
1 parent
adb3b4f
commit 15e226a
Showing
18 changed files
with
156 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
The icons used are a mixture of the [Silk Icons set](http://www.famfamfam.com/lab/icons/silk/) | ||
Some of the icons used are a mixture of the [Silk Icons set](http://www.famfamfam.com/lab/icons/silk/) | ||
by Mark James licensed [CC BY 2.5](https://creativecommons.org/licenses/by/2.5/) and | ||
[Tango Icon Library](http://tango.freedesktop.org) from the public domain and images/logos | ||
that are all rights reserved. | ||
|
||
`request-icon.svg` icon is MIT licensed, taken from https://github.com/primer/octicons |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,7 @@ | |
grid-area: build-results; | ||
} | ||
|
||
.comments { | ||
#comments-list { | ||
grid-area: comments; | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 0 additions & 1 deletion
1
src/api/app/assets/stylesheets/webui/responsive_ux/_layout.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 35 additions & 0 deletions
35
src/api/app/assets/stylesheets/webui/responsive_ux/_notifications.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
.avatars-counter, .simulated-avatar { | ||
display: inline-block; | ||
text-align: center; | ||
width: 1.4375rem; | ||
height: 1.4375rem; | ||
line-height: 1.4rem; | ||
cursor: default; | ||
} | ||
|
||
.avatars-counter { font-size: 0.6rem; } | ||
|
||
ul.avatars{ | ||
li { | ||
margin-right: 0; | ||
&:not(:first-child) { margin-right: -.25rem; } | ||
} | ||
} | ||
|
||
.grid-container { | ||
display: grid; | ||
grid-template-columns: 1fr auto; | ||
grid-template-rows: auto; | ||
grid-template-areas: | ||
"notifiable notifiable" | ||
"content content" | ||
"who-when action"; | ||
column-gap: 0.5rem; | ||
row-gap: 0.25rem; | ||
align-items: start; | ||
|
||
.notifiable { grid-area: notifiable; } | ||
.who-when { grid-area: who-when; } | ||
.action { grid-area: action; } | ||
.content { grid-area: content; } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 9 additions & 0 deletions
9
src/api/app/views/webui/users/notifications/_notification_avatar.html.haml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
%li.list-inline-item | ||
- case avatar_object.class.name | ||
- when 'User', 'Group' | ||
= image_tag_for(avatar_object, size: 23, custom_class: 'rounded-circle bg-light border border-gray-400') | ||
- when 'Package' | ||
- title = "Package #{avatar_object.project}/#{avatar_object}" | ||
%span.fa.fa-archive.text-warning.rounded-circle.bg-light.border.border-gray-400.simulated-avatar{ title: title } | ||
- when 'Project' | ||
%span.fa.fa-cubes.text-secondary.rounded-circle.bg-light.border.border-gray-400.simulated-avatar{ title: "Project #{avatar_object}" } |
7 changes: 7 additions & 0 deletions
7
src/api/app/views/webui/users/notifications/_notification_avatars.html.haml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
%ul.list-inline.d-flex.flex-row-reverse.avatars.m-0 | ||
- if avatar_objects.size > 6 | ||
%li.list-inline-item | ||
- hidden = (avatar_objects.size - 6) | ||
%span.rounded-circle.bg-light.border.border-gray-400.avatars-counter{ title: "#{hidden} more users involved" } | ||
+#{hidden} | ||
= render partial: 'notification_avatar', collection: avatar_objects.first(6).reverse, as: :avatar_object |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters