Skip to content

Commit

Permalink
left_sidebar: Flatten renamed .sidebar-topic-name selector.
Browse files Browse the repository at this point in the history
  • Loading branch information
karlstolley authored and timabbott committed May 23, 2024
1 parent d1bcac0 commit 50a7e3c
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 26 deletions.
2 changes: 1 addition & 1 deletion web/src/topic_list.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion web/src/topic_popover.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down
44 changes: 22 additions & 22 deletions web/styles/left_sidebar.css
Original file line number Diff line number Diff line change
Expand Up @@ -924,33 +924,33 @@ 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;
.topic-box .zero_count {
display: none;
}

/* TODO: We should figure out how to remove this without changing the spacing */
line-height: 1.1;
.sidebar-topic-name {
cursor: pointer;
grid-area: row-content;
padding: 1px $before_unread_count_padding 1px 0;

/* TODO: Consolidate these styles with conversation partners and stream name
once grid rewrite is complete on all sidebar rows.
/* TODO: We should figure out how to remove this without changing the spacing */
line-height: 1.1;

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;
}
}
/* TODO: Consolidate these styles with conversation partners and stream name
once grid rewrite is complete on all sidebar rows.
.topic-box .zero_count {
display: none;
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 {
Expand Down
2 changes: 1 addition & 1 deletion web/templates/more_topics.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -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">
Expand Down
2 changes: 1 addition & 1 deletion web/templates/topic_list_item.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -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">
Expand Down

0 comments on commit 50a7e3c

Please sign in to comment.