-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Force LTR layout for FLEX debugging tool to maintain technical readability #723
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
- Force LTR layout for FLEXNetworkTransactionCell - Add LTR semantic content attributes to all labels and views - Apply RTL fixes to FLEXTableViewController base class - Force LTR layout for FLEXExplorerViewController interface
- Added LTR forcing to FLEXKeyboardHelpViewController for technical content - Added LTR forcing to FLEXImagePreviewViewController for UI consistency - Added LTR forcing to FLEXWebViewController for technical content display - Ensures 100% LTR coverage across all FLEX debugging screens
| // Force LTR layout for all FLEX table views | ||
| if (@available(iOS 9.0, *)) { | ||
| self.view.semanticContentAttribute = UISemanticContentAttributeForceLeftToRight; | ||
| self.tableView.semanticContentAttribute = UISemanticContentAttributeForceLeftToRight; | ||
| } | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think FLEX's minimum supported target is iOS 9, is it not?
| self.carousel.items = @[@"A→Z", @"Count", @"Size"]; | ||
| // Use RTL-aware arrow that flips direction in Arabic/RTL layouts | ||
| self.carousel.items = @[@"A\u2192Z", @"Count", @"Size"]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this mean the arrow will always point towards the Z?
|
|
||
| // Force LTR layout for FLEX table view cells | ||
| if (@available(iOS 9.0, *)) { | ||
| cell.semanticContentAttribute = UISemanticContentAttributeForceLeftToRight; | ||
| cell.contentView.semanticContentAttribute = UISemanticContentAttributeForceLeftToRight; | ||
| if (cell.textLabel) { | ||
| cell.textLabel.semanticContentAttribute = UISemanticContentAttributeForceLeftToRight; | ||
| } | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not familiar with these APIs, but are setting these attributes on the parent views/controllers not enough? Is text direction not inherited by subviews?
I'm halfway through this PR and I notice it touches a TON of files. There has got to be a better way, even if it means using the objc runtime to hook every cell class at runtime to behave this way…
NSExceptional
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Per my previous comment, I would like to brainstorm a better solution than setting these attributes on each individual view and view controller
📋 Summary
This PR ensures that the FLEX debugging tool maintains a consistent Left-to-Right (LTR) layout regardless of the host app's language settings. This is crucial for debugging tools as they display technical content like API requests, responses, and system information that should always be presented in LTR format for optimal readability.
🎯 What's Changed
✅ Force LTR Layout: Implemented semantic layout direction forcing to LTR