Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
message_header: Remove unresolve topic button from message header.
Sayam Samal23ac87606a3c
diff --git a/web/src/click_handlers.ts b/web/src/click_handlers.tsindex f5fdccae908..a8da3a70355 100644--- a/web/src/click_handlers.ts+++ b/web/src/click_handlers.ts@@ -404,14 +404,6 @@ export function initialize(): void {message_edit.toggle_resolve_topic(message_id, topic_name, false, $recipient_row);});- $("body").on("click", ".message_header .on_hover_topic_unresolve", (e) => {- 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).closest(".message_header").attr("data-topic-name")!;- message_edit.toggle_resolve_topic(message_id, topic_name, false, $recipient_row);- });-// RECIPIENT BARSfunction get_row_id_for_narrowing(narrow_link_elem: HTMLElement): number {diff --git a/web/src/message_edit.ts b/web/src/message_edit.tsindex 7a5cf89f5a4..6c2d4292f83 100644--- a/web/src/message_edit.ts+++ b/web/src/message_edit.ts@@ -787,12 +787,12 @@ export function start($row: JQuery, edit_box_open_callback?: () => void): void {}function show_toggle_resolve_topic_spinner($row: JQuery): void {- const $button = $row.find(".on_hover_topic_resolve, .on_hover_topic_unresolve").expectOne();+ const $button = $row.find(".on_hover_topic_resolve").expectOne();$button.addClass("loading-resolve-topic-state");// While we call the show_button_loading_indicator method to// show the spinner, we don't need to call the corresponding// hide_button_loading_indicator method later in the code- // for a successful resolve/unresolve request, as that results+ // for a successful resolve request, as that results// in a rerender of the message feed which replaces the button.buttons.show_button_loading_indicator($button);}@@ -961,7 +961,7 @@ function do_toggle_resolve_topic(data: request,error(xhr) {if ($row) {- const $button = $row.find(".on_hover_topic_resolve, .on_hover_topic_unresolve");+ const $button = $row.find(".on_hover_topic_resolve");buttons.hide_button_loading_indicator($button);$button.removeClass("loading-resolve-topic-state");// Remove any existing tippy instance on the button.@@ -973,15 +973,9 @@ function do_toggle_resolve_topic(trigger: "manual",appendTo: () => document.body,onShow(instance) {- if ($button.hasClass("on_hover_topic_resolve")) {- instance.setContent(- $t({defaultMessage: "Error: Could not resolve topic."}),- );- } else if ($button.hasClass("on_hover_topic_unresolve")) {- instance.setContent(- $t({defaultMessage: "Error: Could not unresolve topic."}),- );- }+ instance.setContent(+ $t({defaultMessage: "Error: Could not resolve topic."}),+ );},});// Manually trigger the error tooltip, and remove it after 2 seconds.diff --git a/web/templates/recipient_row.hbs b/web/templates/recipient_row.hbsindex 14cf01fe9eb..75b024cdb7e 100644--- a/web/templates/recipient_row.hbs+++ b/web/templates/recipient_row.hbs@@ -55,11 +55,9 @@{{/if}}{{#if (and user_can_resolve_topic (not is_empty_string_topic))}}- {{#if topic_is_resolved}}- {{> 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}}+ {{#unless topic_is_resolved}}{{> components/icon_button icon="check" intent="neutral" custom_classes="on_hover_topic_resolve recipient-bar-control recipient-bar-control-icon hidden-for-spectators" data-tippy-content=(t "Mark as resolved") aria-label=(t "Mark as resolved") }}- {{/if}}+ {{/unless}}{{/if}}{{! visibility policy menu }}