Skip to content

Commit 47cb7d2

Browse files
committed
topic index design improvements
1 parent 17d538d commit 47cb7d2

2 files changed

Lines changed: 16 additions & 11 deletions

File tree

‎app/assets/stylesheets/components/topics.css‎

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -176,8 +176,9 @@ a.topic-icon {
176176
}
177177
}
178178

179-
.topic-title-ignore {
180-
margin-left: var(--spacing-2);
179+
/* specificity beats the mobile .topic-icon margin reset */
180+
.topic-title-text .topic-title-ignore {
181+
margin: 0 var(--spacing-2) 0 0;
181182
vertical-align: middle;
182183
}
183184

@@ -347,18 +348,19 @@ a.topic-icon {
347348
}
348349
}
349350

351+
/* hidden but keeps its slot, so the title never shifts under the cursor on hover */
350352
.activity-ignore {
351-
display: none;
353+
visibility: hidden;
352354
color: var(--color-text-secondary);
353355
}
354356

355357
.activity-ignore.is-ignored {
356-
display: inline-block;
358+
visibility: visible;
357359
background-color: var(--color-bg-activity-team);
358360
}
359361

360362
.topic-row:hover .activity-ignore {
361-
display: inline-block;
363+
visibility: visible;
362364
}
363365

364366
.is-hidden {
@@ -1106,8 +1108,8 @@ a.topic-icon {
11061108
color: var(--color-text-muted);
11071109
}
11081110

1109-
/* 1385px = old 1400px viewport breakpoint minus a scrollbar, i.e. sidebar closed */
1110-
@container topics (min-width: 1385px) {
1111+
/* icons on the left only when the table is very wide: ~1920px viewport, sidebar closed */
1112+
@container topics (min-width: 1900px) {
11111113
/* strip width = cell pad 8 + icons pad 8 + slots * 28 + gaps * 8 + icons pad 16 + 18 diagonal */
11121114
.topics-table table {
11131115
--topic-new-replies-strip-width: 150px;
@@ -1172,7 +1174,7 @@ a.topic-icon {
11721174

11731175
/* media guard keeps the mobile card layout untouched below 1025px */
11741176
@media (min-width: 1025px) {
1175-
@container topics (max-width: 1384.98px) {
1177+
@container topics (max-width: 1899.98px) {
11761178
.topic-title-main {
11771179
display: flex;
11781180
flex-direction: column;
@@ -1198,7 +1200,10 @@ a.topic-icon {
11981200
.status-border.has-new-replies::before {
11991201
display: none;
12001202
}
1203+
}
12011204

1205+
/* own breakpoint: the column only has to go once the table is actually narrow */
1206+
@container topics (max-width: 1384.98px) {
12021207
.topics-table th.mailing-lists-header,
12031208
.topics-table td.topic-mailing-lists {
12041209
display: none;

‎app/views/topics/_status_cell.html.slim‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,16 +38,16 @@ td.topic-title.status-border class=status_class id=dom_id(topic, "status_cell")
3838
.topic-title-icons
3939
== icons_html
4040
span.topic-title-text
41+
- if user_signed_in?
42+
= ignore_icon_html(topic: topic, ignored: ignored)
4143
= link_to topic.title, topic_title_link(topic), class: "topic-link"
4244
- if topic_lists.any?
4345
= mailing_list_badges_html(topic_lists, extra_class: "topic-inline-lists")
44-
- if user_signed_in?
45-
= ignore_icon_html(topic: topic, ignored: ignored)
4646
.topic-title-mobile
4747
.topic-title-text
48-
= link_to topic.title, topic_title_link(topic), class: "topic-link"
4948
- if user_signed_in?
5049
= ignore_icon_html(topic: topic, ignored: ignored)
50+
= link_to topic.title, topic_title_link(topic), class: "topic-link"
5151
- if creator || last_sender
5252
.topic-byline
5353
- if creator

0 commit comments

Comments
 (0)