UX: Simplify merged reviewable table

This commit is contained in:
Kris 2019-04-10 13:22:28 -04:00
parent abf4ca9774
commit 1b6f18396b
3 changed files with 51 additions and 30 deletions

View File

@ -1,12 +1,4 @@
<tr class='reviewable-score'> <tr class='reviewable-score'>
<td>
{{format-date rs.created_at}}
</td>
<td>
{{d-icon rs.score_type.icon}}
{{title}}
<span class="badge-notification new-posts score">{{format-score rs.score}}</span>
</td>
<td class='user'> <td class='user'>
{{#user-link user=rs.user}} {{#user-link user=rs.user}}
{{avatar rs.user imageSize="tiny"}} {{avatar rs.user imageSize="tiny"}}
@ -18,19 +10,39 @@
ignored=rs.agree_stats.ignored}} ignored=rs.agree_stats.ignored}}
</td> </td>
<td> <td>
{{reviewable-status rs.status}} {{d-icon rs.score_type.icon}}
{{title}}
<span class="badge-notification new-posts score">{{format-score rs.score}}</span>
</td> </td>
<td>
{{format-date rs.created_at}}
</td>
<td class="reviewable-score-spacer">
{{d-icon "angle-double-right"}}
</td>
<td class='reviewed-by'> <td class='reviewed-by'>
{{#if rs.reviewed_by}} {{#if rs.reviewed_by}}
{{#user-link user=rs.reviewed_by}} {{#user-link user=rs.reviewed_by}}
{{avatar rs.reviewed_by imageSize="tiny"}} {{avatar rs.reviewed_by imageSize="tiny"}}
{{rs.reviewed_by.username}} {{rs.reviewed_by.username}}
{{/user-link}} {{/user-link}}
{{format-date rs.reviewed_at}}
{{else}} {{else}}
&mdash; &mdash;
{{/if}} {{/if}}
</td> </td>
<td>
{{reviewable-status rs.status}}
</td>
<td>
{{#if rs.reviewed_by}}
{{format-date rs.reviewed_at format="tiny"}}
{{/if}}
</td>
</tr> </tr>
{{#if rs.reviewable_conversation}} {{#if rs.reviewable_conversation}}
<tr> <tr>

View File

@ -1,14 +1,5 @@
{{#if reviewable.reviewable_scores}} {{#if reviewable.reviewable_scores}}
<table class='reviewable-scores'> <table class='reviewable-scores'>
<thead>
<tr>
<th>{{i18n "review.scores.date"}}</th>
<th>{{i18n "review.scores.type"}}</th>
<th>{{i18n "review.scores.submitted_by"}}</th>
<th>{{i18n "review.scores.status"}}</th>
<th>{{i18n "review.scores.reviewed_by"}}</th>
</tr>
</thead>
<tbody> <tbody>
{{#each reviewable.reviewable_scores as |rs|}} {{#each reviewable.reviewable_scores as |rs|}}
{{reviewable-score rs=rs reviewable=reviewable}} {{reviewable-score rs=rs reviewable=reviewable}}

View File

@ -3,9 +3,15 @@
color: $primary-medium; color: $primary-medium;
span.approved { span.approved {
color: $success; color: $success;
.d-icon {
color: currentColor;
}
} }
span.rejected { span.rejected {
color: $danger; color: $danger;
.d-icon {
color: currentColor;
}
} }
} }
@ -148,9 +154,15 @@
margin-right: 0.25em; margin-right: 0.25em;
&.agreed { &.agreed {
color: $success; color: $success;
+ .d-icon {
color: $success;
}
} }
&.disagreed { &.disagreed {
color: $danger; color: $danger;
+ .d-icon {
color: $danger;
}
} }
&.ignored { &.ignored {
color: $primary-medium; color: $primary-medium;
@ -224,9 +236,9 @@
margin-top: 1em; margin-top: 1em;
} }
.reviewable-scores, .reviewable-scores {
.reviewable-histories {
min-width: 50%; min-width: 50%;
color: $primary-high;
.reviewed-by { .reviewed-by {
.date { .date {
@ -245,25 +257,27 @@
.d-icon { .d-icon {
font-size: $font-down-1; font-size: $font-down-1;
color: $primary-medium;
} }
.badge-notification { .badge-notification {
line-height: $line-height-medium; line-height: $line-height-medium;
vertical-align: text-top;
} }
thead {
th {
white-space: nowrap;
}
}
tbody { tbody {
border-width: 1px; border-width: 1px;
td { td {
white-space: nowrap; white-space: nowrap;
vertical-align: baseline;
&.user a,
&.reviewed-by a {
max-width: 150px;
overflow: hidden;
text-overflow: ellipsis;
} }
td:first-of-type {
padding-right: 1em;
} }
td:last-of-type { td:last-of-type {
width: 100%; width: 100%;
white-space: normal; white-space: normal;
@ -273,7 +287,11 @@
} }
> tr > th, > tr > th,
> tr > td { > tr > td {
padding: 0.5em 1em 0.5em 0.5em; padding: 0.5em 1em 0.5em 0;
}
.reviewable-score-spacer {
padding-left: 0.5em;
padding-right: 1.5em;
} }
} }
} }