Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

topic_actions_popover: Show realm_empty_topic_display_name for topic="".

Prakhar Pratyush569bf3102763
diff --git a/web/src/popover_menus_data.ts b/web/src/popover_menus_data.ts
index f5b86a857f9..8d7ff8def54 100644
--- a/web/src/popover_menus_data.ts
+++ b/web/src/popover_menus_data.ts
@@ -28,6 +28,7 @@ import * as user_status from "./user_status.ts";
import type {UserStatusEmojiInfo} from "./user_status.ts";
import * as user_topics from "./user_topics.ts";
import type {AllVisibilityPolicies} from "./user_topics.ts";
+import * as util from "./util.ts";
type ActionPopoverContext = {
message_id: number;
@@ -50,7 +51,8 @@ type TopicPopoverContext = {
stream_name: string;
stream_id: number;
stream_muted: boolean;
- topic_name: string;
+ topic_display_name: string;
+ is_empty_string_topic: boolean;
topic_unmuted: boolean;
is_spectator: boolean;
is_topic_empty: boolean;
@@ -255,7 +257,8 @@ export function get_topic_popover_content_context({
stream_name: sub.name,
stream_id: sub.stream_id,
stream_muted: sub.is_muted,
- topic_name,
+ topic_display_name: util.get_final_topic_display_name(topic_name),
+ is_empty_string_topic: topic_name === "",
topic_unmuted,
is_spectator,
is_topic_empty,
diff --git a/web/templates/popovers/left_sidebar/left_sidebar_topic_actions_popover.hbs b/web/templates/popovers/left_sidebar/left_sidebar_topic_actions_popover.hbs
index 1edad92e2fe..844c1bb9d72 100644
--- a/web/templates/popovers/left_sidebar/left_sidebar_topic_actions_popover.hbs
+++ b/web/templates/popovers/left_sidebar/left_sidebar_topic_actions_popover.hbs
@@ -1,7 +1,7 @@
<div class="popover-menu" id="topic-actions-menu-popover" data-simplebar data-simplebar-tab-index="-1">
<ul role="menu" class="popover-menu-list">
<li role="none" class="popover-topic-header text-item popover-menu-list-item">
- <span class="popover-topic-name">{{topic_name}}</span>
+ <span class="popover-topic-name {{#if is_empty_string_topic}}empty-topic-display{{/if}}">{{topic_display_name}}</span>
</li>
{{!-- Group 1 --}}
{{#unless is_spectator}}