message_header: Update legacy unresolve topic button to use icon button.

This commit is part of a series of commits aimed at updating the message
header buttons to use the new icon button component which has consistent
styling across the Web UI and offers a larger clickable area for the
users.

This commit also replaces the legacy font awesome check icon to the
newer "check-x" icon from the Zulip font icons.

Fixes part of #34477.
This commit is contained in:
Sayam Samal
2025-05-28 16:23:37 +05:30
committed by Tim Abbott
parent 9591d05bd7
commit 2db994038f
3 changed files with 3 additions and 4 deletions

View File

@@ -408,7 +408,7 @@ export function initialize(): void {
e.stopPropagation();
const $recipient_row = $(e.target).closest(".recipient_row");
const message_id = rows.id_for_recipient_row($recipient_row);
const topic_name = $(e.target).attr("data-topic-name")!;
const topic_name = $(e.target).closest(".message_header").attr("data-topic-name")!;
message_edit.toggle_resolve_topic(message_id, topic_name, false, $recipient_row);
});

View File

@@ -283,7 +283,6 @@
}
}
.on_hover_topic_unresolve,
.on_hover_topic_resolve {
opacity: 0.2;

View File

@@ -1,5 +1,5 @@
{{#if is_stream}}
<div class="message_header message_header_stream right_part" data-stream-id="{{stream_id}}">
<div class="message_header message_header_stream right_part" data-stream-id="{{stream_id}}" {{#if topic}}data-topic-name="{{topic}}"{{/if}}>
<div class="message-header-contents" style="background: {{recipient_bar_color}};">
{{! stream link }}
<a class="message_label_clickable narrows_by_recipient stream_label tippy-narrow-tooltip"
@@ -52,7 +52,7 @@
{{#if (and user_can_resolve_topic (not is_empty_string_topic))}}
{{#if topic_is_resolved}}
<i class="fa fa-check on_hover_topic_unresolve recipient-bar-control recipient_bar_icon hidden-for-spectators" data-topic-name="{{topic}}" data-tippy-content="{{t 'Mark as unresolved' }}" role="button" tabindex="0" aria-label="{{t 'Mark as unresolved' }}"></i>
{{> components/icon_button icon="check-x" intent="neutral" custom_classes="on_hover_topic_unresolve recipient-bar-control recipient-bar-control-icon hidden-for-spectators" data-tippy-content=(t "Mark as unresolved") aria-label=(t "Mark as unresolved") }}
{{else}}
<i class="fa fa-check on_hover_topic_resolve recipient-bar-control recipient_bar_icon hidden-for-spectators" data-topic-name="{{topic}}" data-tippy-content="{{t 'Mark as resolved' }}" role="button" tabindex="0" aria-label="{{t 'Mark as resolved' }}"></i>
{{/if}}