Skip to content

docs(ios): add RTL Support for the iOS UI Kit - #623

Merged
ketanyekale merged 8 commits into
cometchat:mainfrom
anshuman-cometchat:docs/ENG-57483-ios-rtl-support
Dec 1, 2026
Merged

ketanyekale merged 8 commits into
cometchat:mainfrom
anshuman-cometchat:docs/ENG-57483-ios-rtl-support

Conversation

@anshuman-cometchat

@anshuman-cometchat anshuman-cometchat commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

Description

Adds the RTL Support page for the iOS UI Kit (CometChatUIKitSwift 5.4.0), modelled on the Android and React Native RTL pages.

  • New page ui-kit/ios/rtl-support.mdx: kit-level, start-up and component-level set(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.
  • Navigation: the page sits under Features → Chat, after Offline Support (not under Theming, where the Android and React Native pages are).
  • 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-ios master-v5, 5.4.0).

Related Issue(s)

ENG-57483

Type of Change

  • Documentation correction/update
  • New documentation
  • Improvement to existing documentation
  • Typo fix
  • Other (please specify)

Checklist

  • I have read the CONTRIBUTING document
  • My branch name follows the naming convention
  • My changes follow the documentation style guide
  • I have checked for spelling and grammar errors
  • All links in my changes are valid and working
  • My changes are accurately described in this pull request

anshuman-cometchat and others added 2 commits November 18, 2026 17:23
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>
@mintlify

mintlify Bot commented Nov 18, 2026 •

Copy link
Copy Markdown

Preview approval required

This pull request comes from a fork, so Mintlify won't build a preview until someone with write access approves commit 87fba32.

Approve preview

@ashfaqcometchat ashfaqcometchat changed the title Docs/eng 57483 ios rtl support docs(ios): add RTL Support for the iOS UI Kit Dec 1, 2026
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
ashfaqcometchat
ashfaqcometchat previously approved these changes Dec 1, 2026

@ashfaqcometchat ashfaqcometchat left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 the nil default 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.backButtonIcon and messageList.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, CometChatMessagePreview and 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 aanshisingh-cometchat left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 init succeeds silently ignores the start-up direction (see inline).

Blocking at merge

  1. rtl-support.mdx:100: say to build kit screens after init succeeds. See inline.

Draft-stage flags (not merge-gating)

  • methods.mdx doesn't list the new API, but the quick reference links there for it.
    • The UIKitSettings table under Init has no set(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) |

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 to Locale.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 out en-GB and zh-TW, which the table has.

Questions for the author

  1. Is RTL Support under Features → Chat on purpose, or should it match React and Angular (directly under Features)?
  2. 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-158 matches the kit exactly. That's the 24 types with a public set(layoutDirection:), plus the CometChatListBase subclasses (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 take UIUserInterfaceLayoutDirection?.
  • Resolution order (:168-172): matches CometChatLayoutDirection.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 after init is called wins either way.
  • API names:
    • CometChatLocalize.set(locale: .arabic) exists.
    • MessageHeaderStyle.backButtonIcon is a var on the static CometChatMessageHeader.style.
    • The kit's own default back icon already uses imageFlippedForRightToLeftLayoutDirection().
  • Composer (:251): the description matches GrowingTextView.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.

Comment thread ui-kit/ios/rtl-support.mdx Resolved
Comment thread ui-kit/ios/rtl-support.mdx Resolved
Comment thread ui-kit/ios/rtl-support.mdx Resolved
Comment thread docs.json Resolved
Comment thread ui-kit/ios/localize.mdx Resolved
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@ashfaqcometchat
ashfaqcometchat dismissed stale reviews from adityagokula2210 and themself via ddfdf1f December 1, 2026 17:26
…ce toolkit

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ashfaqcometchat

Copy link
Copy Markdown
Contributor

Thanks for the review. Addressed in ddfdf1fe:

  • Init timing: added the note on creating the kit's screens after initialization succeeds.
  • Methods page: added the set(layoutDirection:) row to the UIKitSettings table and a short section for CometChatUIKit.set(layoutDirection:).
  • Localize: the quick reference now lists all the codes.

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.

@ashfaqcometchat ashfaqcometchat mentioned this pull request Dec 1, 2026
7 of 11 tasks

@jitvarpatil jitvarpatil left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread ui-kit/ios/overview.mdx Resolved
Comment thread ui-kit/ios/rtl-support.mdx Resolved
Comment thread ui-kit/ios/overview.mdx Resolved
Comment thread docs.json Resolved
- 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>
ashfaqcometchat added a commit that referenced this pull request Dec 1, 2026
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 jitvarpatil left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread ui-kit/ios/rtl-support.mdx Resolved
@ketanyekale
ketanyekale merged commit 8d2e6a4 into cometchat:main Dec 1, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

6 participants