Skip to content

Conversation

@Mahmoud-Abdelwahab
Copy link

@Mahmoud-Abdelwahab Mahmoud-Abdelwahab commented Sep 11, 2025

📋 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

MahmoudaElziany and others added 3 commits September 10, 2025 09:39
- 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
Comment on lines +235 to +240
// Force LTR layout for all FLEX table views
if (@available(iOS 9.0, *)) {
self.view.semanticContentAttribute = UISemanticContentAttributeForceLeftToRight;
self.tableView.semanticContentAttribute = UISemanticContentAttributeForceLeftToRight;
}

Copy link
Collaborator

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?

Comment on lines -41 to +42
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"];
Copy link
Collaborator

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?

Comment on lines +75 to +83

// 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;
}
}
Copy link
Collaborator

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…

Copy link
Collaborator

@NSExceptional NSExceptional left a 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants