Skip to content

Free, Open Source, Self-Hosted WhatsApp API Gateway

fix(dashboard): keep the start of a long session name in RTL

Yudhi Armyndharisb7195477839a
diff --git a/dashboard/src/bidi.test.ts b/dashboard/src/bidi.test.ts
index 29bf9a8c6..a09d5482e 100644
--- a/dashboard/src/bidi.test.ts
+++ b/dashboard/src/bidi.test.ts
@@ -54,6 +54,7 @@ test('text cut with an ellipsis takes its direction from its own characters', ()
'.chats-page .quote-body',
'.chats-page .replying-to-body',
'.chats-page .group-info-member .name',
+ '.chats-page .session-name',
];
for (const selector of cut) {
const rule = body('pages/Chats.css', selector);
@@ -79,6 +80,7 @@ test('cut text that a flex column stretches hugs the start edge, where its sibli
'.chats-page .room-contact-name',
'.chats-page .preview-filename',
'.chats-page .replying-to-body',
+ '.chats-page .session-name',
];
for (const selector of hugging) {
const rule = body('pages/Chats.css', selector);
diff --git a/dashboard/src/pages/Chats.css b/dashboard/src/pages/Chats.css
index 91d9d02f4..76bd53b22 100644
--- a/dashboard/src/pages/Chats.css
+++ b/dashboard/src/pages/Chats.css
@@ -283,6 +283,7 @@
line-height: 1.3;
}
+/* Cut by its own direction and hugging the start edge, as a chat name is (see .chat-item-name). */
.chats-page .session-name {
font-size: 1rem;
font-weight: 500;
@@ -290,6 +291,9 @@
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
+ unicode-bidi: plaintext;
+ align-self: flex-start;
+ max-width: 100%;
}
.chats-page .session-phone {