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.

narrow: Expand informative text in empty mentioned messages view.

Lauryn Menard89a3c290dbe7
diff --git a/web/src/narrow_banner.ts b/web/src/narrow_banner.ts
index 6f9ff429794..cc320855939 100644
--- a/web/src/narrow_banner.ts
+++ b/web/src/narrow_banner.ts
@@ -28,6 +28,22 @@ const SPECTATOR_STREAM_NARROW_BANNER = {
),
};
+const MENTIONS_VIEW_EMPTY_BANNER = {
+ title: $t({defaultMessage: "This view will show messages where you are mentioned."}),
+ html: $t_html(
+ {
+ defaultMessage:
+ "To call attention to a message, you can mention a user, a group, topic participants, or all subscribers to a stream. Type @ in the compose box, and choose who you'd like to mention from the list of suggestions. <z-link>Learn more</z-link>",
+ },
+ {
+ "z-link": (content_html) =>
+ `<a target="_blank" rel="noopener noreferrer" href="/help/mention-a-user-or-group">${content_html.join(
+ "",
+ )}</a>`,
+ },
+ ),
+};
+
function retrieve_search_query_data(): SearchData {
// when search bar contains multiple filters, only retrieve search queries
const current_filter = narrow_state.filter();
@@ -209,20 +225,7 @@ function pick_empty_narrow_banner(): NarrowBannerData {
),
};
case "mentioned":
- return {
- title: $t({defaultMessage: "You haven't been mentioned yet!"}),
- html: $t_html(
- {
- defaultMessage: "Learn more about mentions <z-link>here</z-link>.",
- },
- {
- "z-link": (content_html) =>
- `<a target="_blank" rel="noopener noreferrer" href="/help/mention-a-user-or-group">${content_html.join(
- "",
- )}</a>`,
- },
- ),
- };
+ return MENTIONS_VIEW_EMPTY_BANNER;
case "dm":
// You have no direct messages.
if (
diff --git a/web/styles/zulip.css b/web/styles/zulip.css
index 3f887af7793..d0fe3860853 100644
--- a/web/styles/zulip.css
+++ b/web/styles/zulip.css
@@ -1619,6 +1619,8 @@ div.toggle_resolve_topic_spinner .loading_indicator_spinner {
}
.empty_feed_notice {
+ max-width: 600px;
+ margin: 0 auto;
padding: 3em 1em;
text-align: center;
}
diff --git a/web/tests/message_view.test.js b/web/tests/message_view.test.js
index 640e0e386b1..db863fd8d77 100644
--- a/web/tests/message_view.test.js
+++ b/web/tests/message_view.test.js
@@ -293,8 +293,8 @@ run_test("show_empty_narrow_message", ({mock_template}) => {
assert.equal(
$(".empty_feed_notice_main").html(),
empty_narrow_html(
- "translated: You haven't been mentioned yet!",
- 'translated HTML: Learn more about mentions <a target="_blank" rel="noopener noreferrer" href="/help/mention-a-user-or-group">here</a>.',
+ "translated: This view will show messages where you are mentioned.",
+ 'translated HTML: To call attention to a message, you can mention a user, a group, topic participants, or all subscribers to a stream. Type @ in the compose box, and choose who you\'d like to mention from the list of suggestions. <a target="_blank" rel="noopener noreferrer" href="/help/mention-a-user-or-group">Learn more</a>',
),
);