feat(app): RTL layout interactions - #40410
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes RTL (right-to-left) interaction and layout issues across the app and shared UI packages by replacing left/right physical geometry with logical inline properties, adding RTL-aware transforms, and adjusting keyboard/navigation behavior to match RTL expectations.
Changes:
- Replace physical CSS properties (left/right/padding-left, etc.) with logical equivalents (inline-start/inline-end, padding-inline, text-align: start) across key UI components.
- Add RTL-specific transforms/overrides for directional UI elements (switch thumbs, chevrons, tab fades) and correct drag/resize behavior in RTL.
- Improve bidi safety for filenames in mirrored hierarchies (notably in the v2 file tree) and keep titlebar portal mounting stable across direction changes.
Reviewed changes
Copilot reviewed 21 out of 21 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| packages/ui/src/v2/components/text-input-v2.css | Uses logical padding/margins for RTL-correct text input geometry. |
| packages/ui/src/v2/components/switch-v2.css | Adds RTL thumb translation overrides for checked/hover states. |
| packages/ui/src/v2/components/select-v2.css | Converts paddings/text alignment to logical properties; ensures selected indicator visibility. |
| packages/ui/src/v2/components/file-tree-v2.css | Switches to logical alignment and adds RTL chevron rotation behavior. |
| packages/ui/src/components/text-field.css | Replaces right padding with logical inline-end padding for RTL. |
| packages/ui/src/components/tabs.tsx | Sets a default dir on tab triggers to improve bidi behavior. |
| packages/ui/src/components/tabs.css | Migrates multiple rules to logical properties and adds RTL gradient variants. |
| packages/ui/src/components/switch.css | Adds RTL thumb translation override for checked state. |
| packages/ui/src/components/select.css | Converts trigger paddings/margins to logical properties for RTL. |
| packages/ui/src/components/scroll-view.css | Uses logical positioning for scrollbar thumb alignment. |
| packages/ui/src/components/resize-handle.tsx | Adjusts horizontal drag delta math to respect RTL directionality. |
| packages/ui/src/components/resize-handle.css | Uses logical positioning and adds RTL-specific transforms for handle placement/hit zones. |
| packages/ui/src/components/icon.tsx | Expands “directional icon” detection to include arrow icons for RTL mirroring behavior. |
| packages/ui/src/components/dropdown-menu.css | Converts padding/right positioning to logical inline-end properties. |
| packages/session-ui/src/v2/components/session-review-v2.tsx | Makes diff navigation arrow-key behavior RTL-aware and updates displayed key hints. |
| packages/session-ui/src/v2/components/session-review-v2.css | Converts sidebar/tooling layout to logical properties and adds RTL fade variants. |
| packages/app/src/components/titlebar.tsx | Keeps titlebar portal mount synced across direction changes; adjusts Windows titlebar alignment behavior. |
| packages/app/src/components/titlebar-tab-nav.css | Converts close button/divider geometry to logical properties; adds RTL overflow mask variant. |
| packages/app/src/components/settings-v2/settings-v2.css | Switches various paddings/text alignment/positioning to logical properties for RTL. |
| packages/app/src/components/file-tree.tsx | Uses logical indentation and text alignment for RTL mirroring. |
| packages/app/src/components/file-tree-v2.tsx | Uses logical indentation/guide positioning, removes forced LTR, and wraps filenames in <bdi dir="auto"> for bidi safety. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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
Verification