Repository navigation
docs(ios): add RTL Support for the iOS UI Kit - #623
ketanyekale merged 8 commits into
Conversation
Add ui-kit/ios/rtl-support.mdx covering set(layoutDirection:) at kit, start-up and component level, how the direction is resolved, and the parts that stay left to right. Add the page to the iOS Theming group and link it from the localization page. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Split the quick-reference type row for the start-up setter, name Arabic only, open the component list to all CometChatListBase list screens, and add video tiles to the parts that stay left to right. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Preview approval requiredThis pull request comes from a fork, so Mintlify won't build a preview until someone with write access approves commit |
… behaviour Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
ashfaqcometchat
left a comment
There was a problem hiding this comment.
Reviewed at 2621035c against the released iOS UI Kit 5.4.0 source (master-v5). No blockers.
Checked and passing
- Structure: no removed or renamed URLs, no dangling navigation refs, no broken internal links in
ui-kit/ios/. - Navigation: the page sits under Features → Chat, after Offline Support.
- API: the three
set(layoutDirection:)forms, their optional and non-optional types and thenildefault match the source. - Init: the direction is applied only when init succeeds, and the before/after-init ordering table matches the code.
- Components: every listed component has the setter; the nine list screens all inherit from
CometChatListBase. - Behaviour: what stays left to right, the voice recorder's row order, swipe to reply, sent and received sides, per-paragraph message direction, Arabic digits, the U+2068/U+2069 isolates, composer direction and the mirrored icons all match the source.
- Code samples:
CometChatMessageHeader.style.backButtonIconandmessageList.set(user:)exist as written.
Changed during review
- Moved the page from Theming to Features → Chat (
d736138b). - Added the 5.4.0 requirement and the sections on what mirrors, names, numbers and dates, the composer, and custom views (
d736138b). - Added Arabic (
ar) to the supported languages on the Localize page and corrected the count from 17 to 18 (2621035c). The RTL page tells readers to use.arabic, and the Localize page did not list it. - Added the missing period to the RTL page description (
2621035c).
Left as is (cosmetic)
CometChatMessageInformation,CometChatMessagePreviewand the three AI views are plain code in the component table because they have no page of their own.- The Next Steps cards have no icons, unlike the Android and React Native pages.
Not checked
- Rendered output. The Mintlify preview for this fork PR still needs approval from someone with write access.
aanshisingh-cometchat
left a comment
There was a problem hiding this comment.
Review: iOS RTL Support docs at 2621035c
Context. This is a docs PR for the RTL support in iOS UI Kit 5.4.0 (uikit-ios#1478, merged; not the offline work). It's open and not a draft. It needs no unreleased SDK: 5.4.0 is the released master-v5.
I checked every API name and behaviour claim against the kit at 78d80079 (the merged #1478, including #1481). I checked parity against the React (#647) and Angular (#646) RTL pages.
Verdict
🟢 Accurate and well structured. Add one sentence before merge.
- Every API name, the component list and the resolution order match the code.
- The one gap is the init timing: a screen built before
initsucceeds silently ignores the start-up direction (see inline).
Blocking at merge
rtl-support.mdx:100: say to build kit screens afterinitsucceeds. See inline.
Draft-stage flags (not merge-gating)
methods.mdxdoesn't list the new API, but the quick reference links there for it.- The
UIKitSettingstable under Init has noset(layoutDirection:)row. CometChatUIKit.set(layoutDirection:)isn't listed.- The React and Angular PRs added both to their Methods pages.
- Suggested row:
| **set(layoutDirection:)** | UIUserInterfaceLayoutDirection | Lays the UI Kit out right to left or left to right. Leave it out to follow the app. Needs UI Kit 5.4.0 or later. See [RTL Support](/ui-kit/ios/rtl-support) |
- The
Optional / polish
- Navigation: on #646 and #647, RTL Support now sits directly under Features, after Campaigns. Here it's under Features → Chat (
docs.json:1416). Pick one placement for all kits. See inline. - Setting the app's own direction from the language: React and Angular document
CometChatLocalize.getDirection(language). iOS has no kit helper, but the "Language and Direction Are Separate" section could point toLocale.characterDirection(forLanguage:)for apps that want to flip their own UI. - Arabic counts: see inline on
:247. - The navigation bar when the kit and the app differ: see inline on
:185. localize.mdx:15: the quick reference says 18 languages but lists 17 codes. It leaves outen-GBandzh-TW, which the table has.
Questions for the author
- Is RTL Support under Features → Chat on purpose, or should it match React and Angular (directly under Features)?
- Should the Arabic plural-count limitation go on the page now, or wait for the kit fix raised on uikit-ios#1478?
Checked and correct
- Components: the table at
:154-158matches the kit exactly. That's the 24 types with a publicset(layoutDirection:), plus theCometChatListBasesubclasses (Conversations, Users, Groups, GroupMembers, CallLogs, SavedMessages, PinnedMessages, NotificationFeed, MessageInformation). - Start-up setter:
UIKitSettings.set(layoutDirection:)takes a non-optional value (UIKitSettings.swift:69). The kit-level and component setters takeUIUserInterfaceLayoutDirection?. - Resolution order (
:168-172): matchesCometChatLayoutDirection.swift:370-386. So do "overlays take the opener's direction", "read once at creation" and "a component-level value takes effect at once". - Order of calls around init (
:200-207): matches the runtime-set counter (apply(_:unlessRuntimeSetSince:)). A pre-init set is replaced on success; a set afterinitis called wins either way. - API names:
CometChatLocalize.set(locale: .arabic)exists.MessageHeaderStyle.backButtonIconis avaron the staticCometChatMessageHeader.style.- The kit's own default back icon already uses
imageFlippedForRightToLeftLayoutDirection().
- Composer (
:251): the description matchesGrowingTextView.applyKeyboardDirection. A line with no letters takes the keyboard's direction; a line with letters keeps its first letter's. - Links: all 24 internal links resolve, and the branch is up to date with
main.
Mintlify hasn't built a preview yet, because the PR is from a fork. Someone with write access needs to approve the preview build.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
ddfdf1f
…ce toolkit Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Thanks for the review. Addressed in
On your two questions: the placement under Features → Chat is on purpose, and the Arabic plural-count note waits for the kit fix. Details are in the inline replies. |
jitvarpatil
left a comment
There was a problem hiding this comment.
Please fix the v6 overview link and align the iOS setup guidance with the 5.4.0 RTL requirement before merging. I also left two smaller follow-ups on the v5 overview copy and the v5 docs index.
The navigation and redirect checks passed. All four changed MDX files parsed, and the three layout-direction setters match the 5.4.0 SDK source. Mintlify's link checker confirmed the new v6 link is broken. The hosted preview is pending approval.
- Require UI Kit 5.4.0 wherever the docs name the current version or the SPM minimum, and tell existing projects to update before using the RTL APIs. - Key Features: v5 ships UIKit components, not SwiftUI. - List RTL Support in the v5 LLM index. - Move the v6 SwiftUI note to cometchat#652, which adds the page it links to. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Moved here from #623 so the note goes live with the v6 page it links to. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
jitvarpatil
left a comment
There was a problem hiding this comment.
All four findings from my earlier review are resolved. The v6 callout moved to #652, the setup docs now specify 5.4.0, the v5 overview says UIKit, and the v5 docs index links to RTL Support. The iOS link, navigation, and redirect checks passed, and all nine changed MDX files parsed.
Description
Adds the RTL Support page for the iOS UI Kit (
CometChatUIKitSwift5.4.0), modelled on the Android and React Native RTL pages.ui-kit/ios/rtl-support.mdx: kit-level, start-up and component-levelset(layoutDirection:), how the direction is resolved, the order of calls around init, what mirrors and what stays left to right, message text, names, numbers and dates, the composer, directional icons, and custom views.ui-kit/ios/localize.mdx: a note that setting a language does not change the layout direction, with a link to the new page.Checked against the released source (
cometchat-team/uikit-iosmaster-v5, 5.4.0).Related Issue(s)
ENG-57483
Type of Change
Checklist