left_sidebar: Flatten renamed .sidebar-topic-name selector.

This commit is contained in:
Karl Stolley 2024-05-17 15:06:52 -05:00 committed by Tim Abbott
parent d1bcac0822
commit 50a7e3cf2c
5 changed files with 27 additions and 27 deletions

View File

@ -337,7 +337,7 @@ export function initialize({
}): void {
$("#stream_filters").on(
"click",
".sidebar-topic-check, .topic-name, .topic-markers-and-controls",
".sidebar-topic-check, .sidebar-topic-name, .topic-markers-and-controls",
(e) => {
if (e.metaKey || e.ctrlKey || e.shiftKey) {
return;

View File

@ -41,7 +41,7 @@ export function initialize() {
.expectOne();
const $stream_li = $elt.closest(".narrow-filter").expectOne();
topic_name = $elt.closest("li").expectOne().attr("data-topic-name");
url = $elt.closest("li").find(".topic-name").expectOne().prop("href");
url = $elt.closest("li").find(".sidebar-topic-name").expectOne().prop("href");
stream_id = stream_popover.elem_to_stream_id($stream_li);
}

View File

@ -924,35 +924,35 @@ li.top_left_scheduled_messages {
grid-template-columns:
25px $topic_resolve_width minmax(0, 1fr) minmax(0, max-content)
30px 0;
.topic-name {
cursor: pointer;
grid-area: row-content;
padding: 1px $before_unread_count_padding 1px 0;
/* TODO: We should figure out how to remove this without changing the spacing */
line-height: 1.1;
/* TODO: Consolidate these styles with conversation partners and stream name
once grid rewrite is complete on all sidebar rows.
Also: note that these styles will be moot for topic names once we allow
for multiline topics. If we hold multiline topics to a certain number
of lines, we'll likely need a JavaScript-based solution like Clamp.js
to display an ellipsis on the final visible line. */
white-space: nowrap;
/* Both `hidden` and `clip` are shown for the sake
of older browsers that do not support `clip`. */
overflow-x: hidden;
overflow-x: clip;
text-overflow: ellipsis;
}
}
.topic-box .zero_count {
display: none;
}
.sidebar-topic-name {
cursor: pointer;
grid-area: row-content;
padding: 1px $before_unread_count_padding 1px 0;
/* TODO: We should figure out how to remove this without changing the spacing */
line-height: 1.1;
/* TODO: Consolidate these styles with conversation partners and stream name
once grid rewrite is complete on all sidebar rows.
Also: note that these styles will be moot for topic names once we allow
for multiline topics. If we hold multiline topics to a certain number
of lines, we'll likely need a JavaScript-based solution like Clamp.js
to display an ellipsis on the final visible line. */
white-space: nowrap;
/* Both `hidden` and `clip` are shown for the sake
of older browsers that do not support `clip`. */
overflow-x: hidden;
overflow-x: clip;
text-overflow: ellipsis;
}
.sidebar-topic-check {
grid-area: starting-anchor-element;
font-size: 15px;

View File

@ -2,7 +2,7 @@
{{#unless more_topics_unreads}}zero-topic-unreads{{/unless}}
{{#if more_topics_unread_count_muted}}more_topic_unreads_muted_only{{/if}}">
<div class="topic-box">
<a class="topic-name" tabindex="0">{{t "more topics" }}</a>
<a class="sidebar-topic-name" tabindex="0">{{t "more topics" }}</a>
<div class="topic-markers-and-controls">
{{#if more_topics_have_unread_mention_messages}}
<span class="unread_mention_info">

View File

@ -3,7 +3,7 @@
<span class="sidebar-topic-check">
{{topic_resolved_prefix}}
</span>
<a href="{{url}}" class="topic-name" title="{{topic_name}}">
<a href="{{url}}" class="sidebar-topic-name" title="{{topic_name}}">
{{topic_display_name}}
</a>
<div class="topic-markers-and-controls">