Skip to content

Commit

Permalink
Merge pull request mozilla#6178 from escattone/improved-distinction-o…
Browse files Browse the repository at this point in the history
…f-read-unread-messages

improve differentiation of read/unread inbox messages
  • Loading branch information
akatsoulas authored Aug 9, 2024
2 parents 7b2b199 + a2fb1ee commit dfba8d4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion kitsune/messages/jinja2/messages/inbox.html
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ <h1 class="sumo-page-heading">{{ title }}</h1>
</li>
<!-- Repeat the following div for each email message -->
{% for message in msgs.object_list %}
<li class="email-row{% if message.read %} read{% endif %}">
<li class="email-row{% if not message.read %} unread{% endif %}">
<div class="email-cell check">
<input class="field checkbox no-label" type="checkbox" aria-label="Select this message" name="id" value="{{ message.id }}" id="id_checkbox_{{ message.id }}">
</div>
Expand Down
8 changes: 4 additions & 4 deletions kitsune/sumo/static/sumo/scss/components/_messages.scss
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
display: flex;
width: 100%;
box-sizing: border-box; // Include padding and border in width calculations
background-color: #fff;

.email-cell {
padding: 8px;
Expand All @@ -21,6 +22,7 @@
text-overflow: ellipsis; // Add ellipsis for overflowing text
white-space: nowrap; // Prevent text from wrapping
flex-shrink: 0; // Prevent columns from shrinking
font-weight: normal;

&:first-child { width: 5%; } // Checkbox cell
&:nth-child(2) { width: 10%; } // Avatar cell
Expand All @@ -37,11 +39,9 @@
}
}

&.read {
background-color: #f9f9f9; // Set white background for the whole row if read

&.unread {
.email-cell {
background-color: #f9f9f9; // Ensure each cell in a read message also has a white background
font-weight: bold; // Differentiate unread messages with a bold font
}
}
}
Expand Down

0 comments on commit dfba8d4

Please sign in to comment.