Fix of wrong alignment with mixed RTL and LTR text#743
Open
sinasadeghi83 wants to merge 3 commits intoSableClient:devfrom
Open
Fix of wrong alignment with mixed RTL and LTR text#743sinasadeghi83 wants to merge 3 commits intoSableClient:devfrom
sinasadeghi83 wants to merge 3 commits intoSableClient:devfrom
Conversation
Contributor
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.
Member
|
Hey, thanks for contributing! Could you write a changeset as described here? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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: