diff --git a/web/src/narrow_banner.ts b/web/src/narrow_banner.ts index cc32085593..158a65a4a1 100644 --- a/web/src/narrow_banner.ts +++ b/web/src/narrow_banner.ts @@ -44,6 +44,23 @@ const MENTIONS_VIEW_EMPTY_BANNER = { ), }; +const STARRED_MESSAGES_VIEW_EMPTY_BANNER = { + title: $t({defaultMessage: "You have no starred messages."}), + html: $t_html( + { + defaultMessage: + "Starring messages is a good way to keep track of important messages, such as tasks you need to go back to, or useful references. To star a message, hover over a message and click the . Learn more", + }, + { + "star-icon": () => ``, + "z-link": (content_html) => + `${content_html.join( + "", + )}`, + }, + ), +}; + function retrieve_search_query_data(): SearchData { // when search bar contains multiple filters, only retrieve search queries const current_filter = narrow_state.filter(); @@ -208,22 +225,7 @@ function pick_empty_narrow_banner(): NarrowBannerData { case "is": switch (first_operand) { case "starred": - // You currently have no starred messages. - return { - title: $t({defaultMessage: "You have no starred messages."}), - html: $t_html( - { - defaultMessage: - "Learn more about starring messages here.", - }, - { - "z-link": (content_html) => - `${content_html.join( - "", - )}`, - }, - ), - }; + return STARRED_MESSAGES_VIEW_EMPTY_BANNER; case "mentioned": return MENTIONS_VIEW_EMPTY_BANNER; case "dm": diff --git a/web/tests/message_view.test.js b/web/tests/message_view.test.js index db863fd8d7..9106ec5033 100644 --- a/web/tests/message_view.test.js +++ b/web/tests/message_view.test.js @@ -284,7 +284,7 @@ run_test("show_empty_narrow_message", ({mock_template}) => { $(".empty_feed_notice_main").html(), empty_narrow_html( "translated: You have no starred messages.", - 'translated HTML: Learn more about starring messages here.', + 'translated HTML: Starring messages is a good way to keep track of important messages, such as tasks you need to go back to, or useful references. To star a message, hover over a message and click the . Learn more', ), );