Fix of wrong alignment with mixed RTL and LTR text#743
Fix of wrong alignment with mixed RTL and LTR text#743sinasadeghi83 wants to merge 3 commits intoSableClient:devfrom
Conversation
There was a problem hiding this comment.
Pull request overview
This PR addresses display issues when message content contains a mix of RTL and LTR text by ensuring text direction is resolved from the actual characters rather than inherited container direction, and by adjusting how the message text block aligns within its layout.
Changes:
- Applied
unicode-bidi: plaintextto message body styling so mixed-direction text is rendered with correct bidirectional behavior. - Applied
unicode-bidi: plaintextto the reply previewTextcomponent to keep reply content directionally correct. - Added
align-self: startto the main message text body recipe to stabilize content alignment in mixed RTL/LTR scenarios.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/app/components/message/Reply.tsx | Adds unicode-bidi: plaintext to reply preview text rendering to improve mixed RTL/LTR display. |
| src/app/components/message/layout/layout.css.ts | Updates the message text body recipe to use unicode-bidi: plaintext and align-self: start for better mixed-direction formatting/alignment. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Hey, thanks for contributing! Could you write a changeset as described here? |
|
Just as a user who needed this feature a lot, first I want to say thank you. |


Description
This PR resolves formatting and alignment issues with mixed RTL (Right-to-Left) and LTR (Left-to-Right) text within messages. Previously, mixed text direction caused display inconsistencies in the main message body and the reply content area.
Changes made:
dir="auto"to the base messageTextcomponent, allowing the browser to automatically determine the base text direction according to the first strongly-typed character of the message.unicode-bidi: plaintextto the message content CSS and theTextcomponent inside the reply content. This ensures the browser dynamically evaluates and handles the text direction based on the actual characters used rather than inheriting the container's direction.align-self: starton the message content. This ensures that even for RTL messages, the content block anchors appropriately to the left side (start) of the view, while still preserving the correct internal text direction.Type of change
Checklist:
AI disclosure: