narrow_banner: Drop empty action line from empty `dm-including:` views.

Previously, when a user enters a empty dm-including view, they'll notice
the "Why not start the conversation" action line and click on the link.
When this happens, the compose box would open but the receipent box is
never populated.

Since the dm-including view is a search view, we should drop that phrase
from dm-including views altogether. It also isn't super natural to
have a button that starts the conversation with the user anyways.

Fixes: #25524.
This commit is contained in:
Joelute 2023-05-10 19:25:20 -04:00 committed by Tim Abbott
parent 1514d651f4
commit 99dbea3331
2 changed files with 2 additions and 17 deletions

View File

@ -414,15 +414,6 @@ function pick_empty_narrow_banner() {
},
{person: person_in_dms.full_name},
),
html: $t_html(
{
defaultMessage: "Why not <z-link>start the conversation</z-link>?",
},
{
"z-link": (content_html) =>
`<a href="#" class="empty_feed_compose_private">${content_html}</a>`,
},
),
};
}
}

View File

@ -441,10 +441,7 @@ run_test("show_empty_narrow_message", ({mock_template}) => {
narrow_banner.show_empty_narrow_message();
assert.equal(
$(".empty_feed_notice_main").html(),
empty_narrow_html(
"translated: You have no direct messages including Example Bot yet.",
'translated HTML: Why not <a href="#" class="empty_feed_compose_private">start the conversation</a>?',
),
empty_narrow_html("translated: You have no direct messages including Example Bot yet."),
);
// sending direct messages enabled
@ -454,10 +451,7 @@ run_test("show_empty_narrow_message", ({mock_template}) => {
narrow_banner.show_empty_narrow_message();
assert.equal(
$(".empty_feed_notice_main").html(),
empty_narrow_html(
"translated: You have no direct messages including Alice Smith yet.",
'translated HTML: Why not <a href="#" class="empty_feed_compose_private">start the conversation</a>?',
),
empty_narrow_html("translated: You have no direct messages including Alice Smith yet."),
);
set_filter([["dm-including", me.email]]);