[codex] Add RTL direction detection helpers #3674
Closedekrako(GitHub profile, opens in a new tab)wants to merge 1 commit into
main fromrefs/pull/3674/headopened View on GitHubgithub-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:unvouched
github-actions[bot](GitHub profile, opens in a new tab) added labelssize:L
- apps/web/src/index.css line 547OutdatedResolvedby macroscopeapp[bot](GitHub profile, opens in a new tab)@@ -537,8 +538,10 @@537538 }538539539540 .chat-markdown blockquote {540- border-left: 2px solid var(--border);541- padding-left: 0.8rem;541+ border-inline-start: 2px solid var(--border);542+ padding-inline-start: 0.8rem;542543 color: var(--muted-foreground);543544 }544545546+/* Bidi: each line resolves its own base direction (UAX#9 plaintext). */547+.bidi-plaintext {@@ -1343,0 +1407,21 @@1407+ return (1408+ <h4 {...props} dir={blockDirForMarkdownNode(text, node, children)}>1409+ {children}1410+ </h4>1411+ );1412+ },1413+ h5({ node, children, ...props }) {1414+ return (1415+ <h5 {...props} dir={blockDirForMarkdownNode(text, node, children)}>1416+ {children}1417+ </h5>1418+ );1419+ },1420+ h6({ node, children, ...props }) {1421+ return (1422+ <h6 {...props} dir={blockDirForMarkdownNode(text, node, children)}>1423+ {children}1424+ </h6>1425+ );1426+ },1427+ ul({ node, children, ...props }) {
- apps/web/src/index.css line 565OutdatedResolvedby macroscopeapp[bot](GitHub profile, opens in a new tab)@@ -544 +545,21 @@544545546+/* Bidi: each line resolves its own base direction (UAX#9 plaintext). */547+.bidi-plaintext {548+ unicode-bidi: plaintext;549+}550+551+/* Per-line direction inside markdown text blocks. */552+.chat-markdown p,553+.chat-markdown li,554+.chat-markdown h1,555+.chat-markdown h2,556+.chat-markdown h3,557+.chat-markdown h4,558+.chat-markdown h5,559+.chat-markdown h6,560+.chat-markdown blockquote {561+ unicode-bidi: plaintext;562+}563+564+/* Source code stays LTR even inside RTL messages. */565+.chat-markdown pre,apps/web/src/components/chat/MessagesTimeline.tsx line 1566OutdatedResolvedby macroscopeapp[bot](GitHub profile, opens in a new tab)@@ -1561,4 +1562,5 @@15611562 }1562156315631564 return (1564- <div className="whitespace-pre-wrap wrap-break-word text-sm leading-relaxed text-foreground">1565+ <div1566+ dir={dirFor(props.text)}
- @@ -1328,2 +1423,2 @@13281423 );13291424 const markdownComponents = useMemo<Components>(
ekrako(GitHub profile, opens in a new tab) changed the title
github-actions[bot](GitHub profile, opens in a new tab) removed labelssize:L
github-actions[bot](GitHub profile, opens in a new tab) added labelssize:M
t3dotgg(GitHub profile, opens in a new tab) closed this
Sign in to join this conversation.
Important
Review skipped#
Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the
.coderabbit.yamlfile in this repository. To trigger a single review, invoke the@coderabbitai reviewcommand.⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID:
e9498cea-1e94-4a2d-ae93-edaedddc9ba7You can disable this status message by setting the
reviews.review_statustofalsein the CodeRabbit configuration file.Use the checkbox below for a quick retry:
✨ Finishing Touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
❤️ Share