Repository navigation
Right to left round 2: editing, keys, window frame, copies, fallbacks and edit cost - #812
Merged
Merged
Conversation
… and edit cost - Fields step words by UAX #29 (paths, brackets, Persian ZWNJ words), and a word forward stops at the next word's start in right-to-left text too. - Ctrl+Left Shift and Ctrl+Right Shift set a field's direction on Windows and Linux; a shortcut with them never does. - Left and Right swap in right-to-left focus groups, sliders and Kit trees; right-to-left table rows copy as tab-separated cells. - Tab titles fade at their own end; Luau UI text reads the way its words do. - In a right-to-left app the Windows caption buttons sit at the top-left, tooltips read from the right, and inline icons keep their gap beside their word. - Rich HTML copies say each block's direction; a right-to-left locale's missing message is the English one, isolated. - A keystroke in a long plain draft keys only the paragraphs it touched; spell checking hashes each line once. - Tooling: --tree lists a focused field's selection; scripts press single modifier keys.
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.
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.
Round 2 of right-to-left support: editing, keys, the window frame, copies, fallbacks and the cost of a keystroke in a long draft.
Before and after (Arabic interface, 1.5x)
Editing
edit/caret_motion.rs):src/util/format.tsstepssrc,util,format.ts; Ctrl+Backspace afterمرحبا(اختبار)keeps(;میشودis one word.edit/input.rs,space_ahead): Ctrl+Left from an Arabic line's start lands past the space, as Chrome 152 on Windows does (offset 6 inمرحبا مرحبا).edit/direction_keys.rs): sets a field's direction, as Notepad and Word do. The runtime steps the chord on every physical key; any logical key disarms it, so Ctrl+Shift+P never sets it.Keys, frame and overlays
Tree::right_to_left).Caption::mirroredfollowslabels::set_direction: the buttons sit at the top-left with Close first, hit-testing andChromeInsets::leadingwith them.runtime/input/help.rs).El::inline_iconin right-to-left text takes the far side of its room, so the gap stays between icon and word (text/pill_chips.rs).Copies and fallbacks
serialize_htmladdsdirper block when the copy holds right-to-left text; a left-to-right copy is byte-identical.rune-i18ncodegen: a right-to-left locale's missing message isLRI + source + PDI; plural categories keep their own fallback.Cost of a keystroke in a 2,000-line draft
TextSystem::lay_out_paragraphsnow keys only the paragraphs between the old and new text's common start and end (reuse_keys, compared 16 bytes at a time) and keeps kept paragraphs' measures (Paragraph::widths).spell::by_wordshashes each line once.layout_textper keystrokeTooling
--treelists a focused field'sselection(UTF-8 anchor and focus).{"modifier": "ShiftRight", "down": true, "mods": "ctrl+shift"}.