diff --git a/web/src/topic_list.ts b/web/src/topic_list.ts index 53c83506be..71392c18e2 100644 --- a/web/src/topic_list.ts +++ b/web/src/topic_list.ts @@ -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; diff --git a/web/src/topic_popover.js b/web/src/topic_popover.js index 5d4833138a..d3ca4215f9 100644 --- a/web/src/topic_popover.js +++ b/web/src/topic_popover.js @@ -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); } diff --git a/web/styles/left_sidebar.css b/web/styles/left_sidebar.css index b1a7961e2d..b353ce9e03 100644 --- a/web/styles/left_sidebar.css +++ b/web/styles/left_sidebar.css @@ -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; diff --git a/web/templates/more_topics.hbs b/web/templates/more_topics.hbs index b639a466f9..eca1e34581 100644 --- a/web/templates/more_topics.hbs +++ b/web/templates/more_topics.hbs @@ -2,7 +2,7 @@ {{#unless more_topics_unreads}}zero-topic-unreads{{/unless}} {{#if more_topics_unread_count_muted}}more_topic_unreads_muted_only{{/if}}">