compose_box: Fix order of group pm recipient pills on focus.

Earlier when compose box was opened or narrowed to pm, the recipient
pills were sorted according to user email strings instead of their
full names which was inconsistent with compose box placeholder text,
recipient row and message header.

This commit fixes the behaviour by introducing a `sort_email`
function to sort emails according to their full names and display
sorted pills.

Fixes: zulip#27375.

Co-authored-by: richardshaju <richardshaju66@gmail.com>
This commit is contained in:
Pratik Chanda
2024-06-10 23:44:45 +05:30
committed by Tim Abbott
parent c180b25a68
commit 64a9f83473
7 changed files with 29 additions and 12 deletions

View File

@@ -212,7 +212,7 @@ async function test_restore_private_message_draft_via_draft_overlay(page: Page):
page,
common.fullname.hamlet,
);
await common.pm_recipient.expect(page, `${hamlet_internal_email},${cordelia_internal_email}`);
await common.pm_recipient.expect(page, `${cordelia_internal_email},${hamlet_internal_email}`);
assert.strictEqual(
await common.get_text_from_selector(page, "title"),
"Cordelia, Lear's daughter, King Hamlet - Zulip Dev - Zulip",