Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
move_topic: Show "general chat" placeholder when mandatory_topics=false.
Prakhar Pratyush2416fec4689d
diff --git a/web/src/stream_popover.ts b/web/src/stream_popover.tsindex 163aa6a8167..27d5251e0ce 100644--- a/web/src/stream_popover.ts+++ b/web/src/stream_popover.ts@@ -322,11 +322,12 @@ export async function build_move_topic_to_stream_popover(const current_stream_name = sub_store.get(current_stream_id)!.name;const stream = sub_store.get(current_stream_id);const topic_display_name = util.get_final_topic_display_name(topic_name);+ const empty_string_topic_display_name = util.get_final_topic_display_name("");const is_empty_string_topic = topic_name === "";const args: {topic_name: string;- topic_display_name: string;- is_empty_string_topic: boolean;+ empty_string_topic_display_name: string;+ realm_mandatory_topics: boolean;current_stream_id: number;notify_new_thread: boolean;notify_old_thread: boolean;@@ -337,8 +338,8 @@ export async function build_move_topic_to_stream_popover(stream: sub_store.StreamSubscription | undefined;} = {topic_name,- topic_display_name,- is_empty_string_topic,+ empty_string_topic_display_name,+ realm_mandatory_topics: realm.realm_mandatory_topics,current_stream_id,stream,notify_new_thread: message_edit.notify_new_thread_default,diff --git a/web/styles/zulip.css b/web/styles/zulip.cssindex 2693649c578..4bb358eacde 100644--- a/web/styles/zulip.css+++ b/web/styles/zulip.css@@ -2045,6 +2045,7 @@ body:not(.hide-left-sidebar) {}}-.empty-topic-display {+.empty-topic-display,+.empty-topic-placeholder-display::placeholder {font-style: italic;}diff --git a/web/templates/move_topic_to_stream.hbs b/web/templates/move_topic_to_stream.hbsindex 7251d4733e4..65896863922 100644--- a/web/templates/move_topic_to_stream.hbs+++ b/web/templates/move_topic_to_stream.hbs@@ -8,7 +8,7 @@{{/unless}}<div class="input-group"><label for="move-topic-new-topic-name" class="modal-field-label">New topic</label>- <input id="move-topic-new-topic-name" name="new_topic_name" type="text" class="move_messages_edit_topic modal_text_input" autocomplete="off" {{#if is_empty_string_topic}}placeholder="{{topic_display_name}}"{{/if}} value="{{topic_name}}" {{#if disable_topic_input}}disabled{{/if}} />+ <input id="move-topic-new-topic-name" name="new_topic_name" type="text" class="move_messages_edit_topic modal_text_input {{#unless realm_mandatory_topics}}empty-topic-placeholder-display{{/unless}}" autocomplete="off" {{#unless realm_mandatory_topics}}placeholder="{{empty_string_topic_display_name}}"{{/unless}} value="{{topic_name}}" {{#if disable_topic_input}}disabled{{/if}} /></div><input name="old_topic_name" type="hidden" value="{{topic_name}}" /><input name="current_stream_id" type="hidden" value="{{current_stream_id}}" />