feat(rtl): add end-to-end RTL and bidirectional text support#7011
Open
kuanglijun312 wants to merge 1 commit into
Open
feat(rtl): add end-to-end RTL and bidirectional text support#7011kuanglijun312 wants to merge 1 commit into
kuanglijun312 wants to merge 1 commit into
Conversation
Adds right-to-left (RTL) and bidirectional (bidi) text support across the document and spreadsheet rendering stack. - core: text-direction helpers, worksheet implicit/explicit direction resolution, and centralized createDocumentModelWithStyle / extractOtherStyle cell-style utilities - engine-render: bidi reordering (bidi-js), Arabic/Thai/Tibetan language rulers, sub-glyph caret metrics (charAdvances), per-line right-flush line adjustment, and RTL default cell alignment - docs-ui / sheets-ui: RTL-aware caret and selection geometry, arrow-key visual<->logical mapping, clipboard direction preservation on copy/paste, cell-edit alignment, and formula bar/editor pinned to LTR Adds the bidi-js dependency to engine-render. New tests cover bidi reordering, the Arabic language ruler, and RTL line adjustment.
9c5801c to
cc65c8d
Compare
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.
Summary
Adds right-to-left (RTL) and bidirectional (bidi) text support across the document and spreadsheet rendering stack.
createDocumentModelWithStyle/extractOtherStylecell-style utilities.bidi-js), Arabic/Thai/Tibetan language rulers, sub-glyph caret metrics (charAdvances), and per-line right-flush line adjustment.Adds the
bidi-jsdependency to@univerjs/engine-render.Test plan
pnpm typecheckpasses for all touched packages (core, engine-render, docs-ui, sheets-ui, sheets-formula-ui, sheets, ui).pnpm testpasses for the touched packages.eslintreports 0 errors on changed files.