Skip to content

docs(react-native): add RTL Support for the React Native UI Kit - #645

Merged
ketanyekale merged 5 commits into
mainfrom
docs/react-native-uikit-rtl-support
Dec 1, 2026
Merged

ketanyekale merged 5 commits into
mainfrom
docs/react-native-uikit-rtl-support

Conversation

@suraj-chauhan-cometchat

Copy link
Copy Markdown
Contributor

Description

Adds RTL (right-to-left) support documentation for the React Native UI Kit v5. It matches the Android (#627) and Flutter (#622) RTL docs.

New page: RTL Support (sidebar: Theming, after Localize). It covers:

  • Layout direction vs language, and how "auto" follows the app's direction (I18nManager.isRTL).
  • Turning RTL on:
    • layoutDirection in UIKitSettings, with no forceRTL and no restart;
    • changing it at runtime with CometChatUIKit.setLayoutDirection.
  • The per-component layoutDirection prop ("ltr" | "rtl"), with the 19 components that take it.
  • Which setting wins when they disagree.
  • Keeping the app's own screens in the same direction: a direction style, or I18nManager.forceRTL.
  • What changes in RTL:
    • layout, and the icon rules per OS;
    • what stays left to right: audio/video players and code (inline, blocks, AI replies);
    • message text, digits and dates;
    • the composer's keyboard-language cursor.
  • Custom views in RTL: start/end styles, and useCometChatLayoutDirection() instead of I18nManager.isRTL.
  • Other RTL languages (Hebrew, Persian, Urdu) via Localize.

Updated pages:

  • 19 component pages: a "Layout Direction" section with an example and the prop's type and default. The pages that list props one by one also get a layoutDirection entry in alphabetical order. The pages are Conversations, Users, Groups, Group Members, Message Header, Message List, Message Composer, Compact Message Composer, Threaded Messages Header, Message Information, Pinned Messages, Saved Messages, Search, Notification Feed, AI Assistant Chat History, Call Buttons, Call Logs, Incoming Call and Outgoing Call.
    • Message List and both composers also explain their RTL behaviour.
  • Methods: layoutDirection in the quick reference and the UIKitSettings table, plus a Layout Direction section.
  • Localize: Arabic (ar) added to both language lists (now 19), and a note that language and layout direction are separate settings.
  • Troubleshooting: a new RTL section.
  • docs.json: page added to the sidebar. llms-react-native-v5.mdx: an RTL rule and the page link.

The TypeScript examples were type-checked against the UI Kit's RTL branch, uikit-react-native PR #1521: 0 errors in the examples.

Related Issue(s)

No GitHub issue. Tracked on Multica:

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

Additional Information

  • Merge timing: release this with the UI Kit version that ships layoutDirection (uikit-react-native PR #1521). The setting isn't in the published UI Kit yet.
    • The note that init() applies layoutDirection only when you pass it depends on a fix still being made in that PR.
  • Link check: done with a script, not mint, which isn't installed here. Every new internal link and #anchor resolves.
    • There are 7 broken components-overview#components anchors, but they already exist on main and this PR doesn't touch them.
    • A mint dev preview hasn't been run yet.
  • Existing issue spotted, not changed: the Methods page's JavaScript init example uses new UIKitSettings({...}). That runs in JavaScript, but TypeScript rejects it, because UIKitSettings is a function, not a class. The new TypeScript examples use a typed object instead.

Screenshots (if applicable)

N/A. Text-only changes. RTL screenshots will follow in a separate update.

🤖 Generated with Claude Code

New page ui-kit/react-native/rtl-support (sidebar: after Localize): layout
direction vs language, auto following I18nManager.isRTL, the global
layoutDirection in UIKitSettings and CometChatUIKit.setLayoutDirection, the
per-component layoutDirection prop and which setting wins, the app's own
screens, what changes in RTL (layout, icon rules per OS, players and code
staying LTR, message text, digits, the composer's keyboard-language cursor),
custom views with start/end styles and useCometChatLayoutDirection(), and
other RTL languages.

Updated: a Layout Direction section on the 19 components that take the prop
(plus a layoutDirection entry where the page lists props one by one),
Methods (UIKitSettings row and a Layout Direction section), Localize (Arabic
in the language lists, a note that language and direction are separate),
Troubleshooting (an RTL section), the LLM index and docs.json.

TypeScript examples type-check against the UI Kit RTL branch
(cometchat-team/uikit-react-native#1521).

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

mintlify Bot commented Nov 30, 2026 •

Copy link
Copy Markdown

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated
cometchat 🟢 Ready View Preview Dec 1, 2026, 6:11 AM

💡 Tip: Enable Automations to automatically generate PRs for you.

- Component snippets for Group Members, Message Information, Threaded
  Messages Header and Incoming Call pass their required props.
- Only audio players stay left to right; video uses the system player.
- After setLayoutDirection, remount the UI Kit screens (e.g. a navigator
  key) instead of 'reopen': mounted components can show a mix.
- Don't wrap UI Kit components in a direction style; the hook is right
  when the direction comes from layoutDirection.
- Precedence rule 3 includes the global value captured at creation.
- The Calls SDK's ongoing-call screen doesn't follow layoutDirection.
- Icon table: bulleted list, reply all, AI send, video call arrows.
- Custom-view sample no longer relies on iOS-only writingDirection.
- Digits-with-mention exception, phone numbers, Expo dev build / Gradle
  rebuild for the keyboard module, CometChatLayoutDirection type.

Examples type-check against the kit (0 errors).

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

@raj-dubey1 raj-dubey1 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.

Automated review (Claude)
Requested by Suraj Chauhan on Slack · commit fa5061d271 · round 1

Verdict: Couldn't complete the review (2 minors, 4 nits (+2 pre-existing)). Every changed file now has a disposition, and no introduced blocker or major was found; the issues are 3 minor and 5 nits. There is still no verdict. No gate ran, because Bash was denied for every non-git command: the docs.json JSON parse, mint broken-links, the review-ledger plan and npm view. The API claims were checked only against the unreleased PR cometchat-team/uikit-react-native#1521, so which UI Kit version ships layoutDirection, and whether it is released, is unknown.

Review not complete — these coverage rows are missing, so this is not a verdict on the PR: chunks: the partition does not cover ui-kit/react-native/ai-assistant-chat-history.mdx, ui-kit/react-native/call-buttons.mdx, ui-kit/react-native/call-logs.mdx, ui-kit/react-native/compact-message-composer.mdx, ui-kit/react-native/conversations.mdx, ui-kit/react-native/group-members.mdx, ui-kit/react-native/groups.mdx, ui-kit/react-native/incoming-call.mdx …; chunks: the partition covers files that are not in the diff: llms-react-native-v5.mdx, localize.mdx, methods.mdx, rtl-support.mdx, the 19 component pages, troubleshooting.mdx

Introduced by this PR

  1. 🟡 F1 minor ui-kit/react-native/rtl-support.mdx:210: No minimum UI Kit version for layoutDirection, setLayoutDirection, useCometChatLayoutDirection or the native cursor module
    The page says 'rebuild the app after upgrading' (line 210) but never names a version. The new layoutDirection row in the methods.mdx UIKitSettings table (around line 551) and llms-react-native-v5.mdx:66 have no version either. The offline row next to it does name one: 'UI Kit 5.6.0 and Chat SDK 4.2.1 or later'. The only source evidence is the unmerged PR cometchat-team/uikit-react-native#1521 (base dev-v5). Fix: add 'Requires UI Kit X.Y.Z or later' to the Quick Reference, the methods row and the composer note, and merge only once that release is published.
    class: introduced — file added by this PR
  2. 🟡 F3 minor ui-kit/react-native/rtl-support.mdx:186: Per-icon RTL flip table is unverified against the UI Kit source
    rtl-support.mdx:184-190 lists which icons flip on iOS versus Android, 'following Apple's guidelines', and says the numbered list 'swaps to a drawing'. The only source read, layoutDirection.ts from PR #1521, covers direction resolution and no icon mapping. Fix: have the UI Kit author confirm the table against the icon-mirroring code.
    class: introduced — file added by this PR
  3. ⚪ F4 nit ui-kit/react-native/rtl-support.mdx:25: 'mirrors every component' contradicts the later exceptions
    Line 25 says the UI Kit mirrors every component. Lines 141 and 194-198 exclude the ongoing-call screen, audio players, video and code. Suggest 'mirrors the UI Kit components'.
    class: introduced — file added by this PR
  4. ⚪ F5 nit ui-kit/react-native/rtl-support.mdx:141: Ongoing Call's layoutDirection exception is not mentioned on ongoing-call.mdx
    rtl-support.mdx:141 and the methods.mdx row say the ongoing-call screen ignores layoutDirection, but ongoing-call.mdx has no matching note. Optionally add one there.
    class: introduced — file added by this PR
  5. ⚪ F6 nit ui-kit/react-native/message-information.mdx:344: Missing --- separator before the new Layout Direction section
    message-information.mdx:342-344 runs straight from the style prop table into '## Layout Direction' with no '---'. Every other prop is separated by one, for example line 333. threaded-messages-header.mdx:206 has the same gap.
    class: introduced — line is in the PR diff
  6. ⚪ F8 nit ui-kit/react-native/search.mdx:946: New section appended after a stray trailing paragraph
    The Layout Direction section is added after an orphan text-formatters paragraph at the end of the file, with no Next Steps. Checked against the diff only, not the rendered page.
    class: introduced — line is in the PR diff

Pre-existing / not touched by this PR

Informational: these are not from this PR and do not block it. Worth a ticket where they matter.

  1. 🟡 F2 minor ui-kit/react-native/localize.mdx:272: Language count still says 18 after this PR adds Arabic
    The PR changes localize.mdx:19 to '19: en, ar, …' and adds Arabic to the table, but line 272 still reads 'set a language out of the 18 supported languages'. Line 223 also says 18, and whether the offline strings exist in Arabic is unverified. Fix: change line 272 to 19, and either clarify line 223 or confirm the Arabic offline strings.
    class: pre_existing — blame df299ed predates the PR
  2. ⚪ F7 nit ui-kit/react-native/call-buttons.mdx:1: Copy-pasted 'sheets, menus and dialogs it opens' is inaccurate for some components
    The new Layout Direction sections in call-buttons, call-logs, incoming-call, outgoing-call, search and threaded-messages-header copy this sentence, but those components open none of these. Trim it per component. The line number is approximate; it applies to the added section in each listed file.
    class: pre_existing — blame 5151b51 predates the PR
Coverage
Row State
Files dispositioned 25
Chunks 2
Interactions All 19 components in the rtl-support table have a Layout Direction section, with type and default consistent across pages. The troubleshooting, methods and llms pages agree with rtl-support. Inconsist
Tests prove Not applicable: docs-only PR.
Commits 4145199 (adds the RTL docs), fa5061d (review fixes)
Claims Holds against layoutDirection.ts from unmerged PR cometchat-team/uikit-react-native#1521 (head 83dd56f2): the type, the prop values, the auto default, the precedence order, the hook's return values, a
Public surface Documents a new public API: the layoutDirection setting and prop, setLayoutDirection, useCometChatLayoutDirection and the CometChatLayoutDirection type. Not confirmed in any published package.
Acceptance No acceptance criteria were given.
Frozen findings None; this is round 1.
Checks run
Command Exit Result
git diff --stat origin/main...HEAD 0 25 files changed, 787 insertions(+), 1 deletion(-)
git diff origin/main...HEAD (all files, read by me and by the js-code-reviewer) 0 All 25 files read
python3 ~/.claude/skills/cometchat-review/scripts/review-ledger.py plan --repo . --base origin/main --md -1 Not run: Bash permission denied
python3 -c "import json;json.load(open('docs.json'))" -1 Not run: Bash permission denied
npm view @cometchat/chat-uikit-react-native -1 Not run: Bash permission denied
Glob/Grep: every linked page and anchor in the changed files 0 All targets exist; anchors resolve to headings
Grep localize.mdx for '18 supported languages' 0 Line 272 still says 18 (F2 confirmed)

- Name the minimum version (UI Kit 5.7.0) for layoutDirection, the
  composer cursor module, the methods row and the llms note.
- localize: 19 supported languages; Arabic includes the offline strings.
- Overview: 'mirrors its components' (exceptions listed below it).
- ongoing-call: note that the Calls SDK screen ignores layoutDirection.
- Add missing --- separators in message-information and thread header.
- Drop the copied 'sheets, menus and dialogs' clause where the component
  opens none; call logs says 'the menu it opens'.

Icon flip table verified against shared/icons/Icon.tsx (no change).

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

@raj-dubey1 raj-dubey1 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.

Automated review (Claude)
Requested by Suraj Chauhan on Slack · commit 28b0574685 · round 2

Verdict: No verdict yet (the review could not finish) · from this PR: 3 minors, 4 nits; 3 in older code, not blocking; 1 outside this round's scope, not blocking

Why no approve or request changes: some required review steps were not finished. Nothing here is a decision on the PR yet; the findings below are real and worth fixing either way.

This PR adds a thorough, well-structured RTL Support page for the React Native UI Kit and short "Layout Direction" sections on 19 component pages, Methods, Localize and Troubleshooting. I checked the API claims against the merged UI Kit RTL PR (cometchat-team/uikit-react-native#1521, head cea86e3f), and they all match the source: the UIKitSettings.layoutDirection setting, CometChatUIKit.setLayoutDirection, the useCometChatLayoutDirection and CometChatLayoutDirection exports, the 19 components that take the prop, the precedence order, init applying the direction only when it is passed, the Arabic locale and version 5.7.0. Links and anchors pass, and docs.json is valid. Two things before merging: only merge once UI Kit 5.7.0 is published on npm (it isn't yet; latest is 5.6.0), and update the stale "18 locales" sentence in offline-support.mdx.

Introduced by this PR

  1. 🟡 F9 minor ui-kit/react-native/rtl-support.mdx:11: Documents UI Kit 5.7.0, which is not yet published on npm: merge only with the release
    The new page says Requires UI Kit 5.7.0 or later, and the RTL sections on every component page, plus methods.mdx, localize.mdx (ar) and llms-react-native-v5.mdx, describe the 5.7.0 API. npm view @cometchat/chat-uikit-react-native versions / dist-tags shows latest = 5.6.0 and next = 5.2.10. A grep of the installed 5.6.0 package finds no layoutDirection and no ar locale. The source does exist and matches the docs: uikit-react-native#1521 is MERGED into dev-v5 and bumps packages/ChatUiKit/package.json to 5.7.0. It adds layoutDirection?: CometChatLayoutDirection to UIKitSettings.ts, static setLayoutDirection to CometChatUIKit.ts, and in index.ts export { useCometChatLayoutDirection } and export type { CometChatLayoutDirection }. It also adds layoutDirection?: "ltr" | "rtl" on exactly the 19 listed components and resources/ar/translation.json. The page states the version requirement, so the content is correct. If it goes live before 5.7.0 ships, though, developers will copy settings and hooks that don't exist in the package they can install. Fix: merge this together with the 5.7.0 release, as the PR's own 'Merge timing' note says. Nothing in the text needs to change.
    class: introduced — file added by this PR
  2. 🟡 F1 minor ui-kit/react-native/rtl-support.mdx:210: No minimum UI Kit version for layoutDirection, setLayoutDirection, useCometChatLayoutDirection or the native cursor module
    The page says 'rebuild the app after upgrading' (line 210) but never names a version. The new layoutDirection row in the methods.mdx UIKitSettings table (around line 551) and llms-react-native-v5.mdx:66 have no version either. The offline row next to it does name one: 'UI Kit 5.6.0 and Chat SDK 4.2.1 or later'. The only source evidence is the unmerged PR cometchat-team/uikit-react-native#1521 (base dev-v5). Fix: add 'Requires UI Kit X.Y.Z or later' to the Quick Reference, the methods row and the composer note, and merge only once that release is published.
    class: introduced — file added by this PR
  3. 🟡 F3 minor ui-kit/react-native/rtl-support.mdx:186: Per-icon RTL flip table is unverified against the UI Kit source
    rtl-support.mdx:184-190 lists which icons flip on iOS versus Android, 'following Apple's guidelines', and says the numbered list 'swaps to a drawing'. The only source read, layoutDirection.ts from PR #1521, covers direction resolution and no icon mapping. Fix: have the UI Kit author confirm the table against the icon-mirroring code.
    class: introduced — file added by this PR
  4. ⚪ F4 nit ui-kit/react-native/rtl-support.mdx:25: 'mirrors every component' contradicts the later exceptions
    Line 25 says the UI Kit mirrors every component. Lines 141 and 194-198 exclude the ongoing-call screen, audio players, video and code. Suggest 'mirrors the UI Kit components'.
    class: introduced — file added by this PR
  5. ⚪ F5 nit ui-kit/react-native/rtl-support.mdx:141: Ongoing Call's layoutDirection exception is not mentioned on ongoing-call.mdx
    rtl-support.mdx:141 and the methods.mdx row say the ongoing-call screen ignores layoutDirection, but ongoing-call.mdx has no matching note. Optionally add one there.
    class: introduced — file added by this PR
  6. ⚪ F6 nit ui-kit/react-native/message-information.mdx:344: Missing --- separator before the new Layout Direction section
    message-information.mdx:342-344 runs straight from the style prop table into '## Layout Direction' with no '---'. Every other prop is separated by one, for example line 333. threaded-messages-header.mdx:206 has the same gap.
    class: introduced — line is in the PR diff
  7. ⚪ F8 nit ui-kit/react-native/search.mdx:946: New section appended after a stray trailing paragraph
    The Layout Direction section is added after an orphan text-formatters paragraph at the end of the file, with no Next Steps. Checked against the diff only, not the rendered page.
    class: introduced — line is in the PR diff

Pre-existing / not touched by this PR

Informational: these are not from this PR and do not block it. Worth a ticket where they matter.

  1. 🟡 F10 minor ui-kit/react-native/offline-support.mdx:281: Offline page still says the texts are translated in 'all 18 locales', but this PR makes it 19
    offline-support.mdx:281 reads 'They are translated in all 18 locales of the UI Kit.' This PR changes localize.mdx to 19 languages and adds Arabic, and says Arabic includes the offline strings (localize.mdx:223). The source agrees: uikit-react-native#1521 offlineCore.test.ts requires resources/ar/translation.json for the offline keys. Once this merges, the two pages give different locale counts. Fix: reword offline-support.mdx:281 the same way as localize.mdx:223, e.g. 'translated in all 18 languages of UI Kit 5.6.0; Arabic, added in 5.7.0, includes them too'.
    class: pre_existing — file not touched by this PR
  2. 🟡 F2 minor ui-kit/react-native/localize.mdx:272: Language count still says 18 after this PR adds Arabic
    The PR changes localize.mdx:19 to '19: en, ar, …' and adds Arabic to the table, but line 272 still reads 'set a language out of the 18 supported languages'. Line 223 also says 18, and whether the offline strings exist in Arabic is unverified. Fix: change line 272 to 19, and either clarify line 223 or confirm the Arabic offline strings.
    class: pre_existing — blame df299ed predates the PR
  3. ⚪ F7 nit ui-kit/react-native/call-buttons.mdx:1: Copy-pasted 'sheets, menus and dialogs it opens' is inaccurate for some components
    The new Layout Direction sections in call-buttons, call-logs, incoming-call, outgoing-call, search and threaded-messages-header copy this sentence, but those components open none of these. Trim it per component. The line number is approximate; it applies to the added section in each listed file.
    class: pre_existing — blame 5151b51 predates the PR

Outside the agreed scope

Not a carried finding and not in the fix diff, so it does not block this round.

  1. 🟡 minor ui-kit/react-native/expo-integration.mdx:70: Pre-existing broken anchor methods#how-to-login-a-user-with-auth-token (also at :278, and react-native-cli-integration.mdx:67, :294)
    docs-linkcheck warns that the anchor has no matching heading. The heading is '### Login using Auth Token' at methods.mdx:123 on base origin/main too, and this PR doesn't rename it. The fix is to link #login-using-auth-token. File a ticket.
Coverage
Row State
Files dispositioned 26
Chunks 1
Interactions Single chunk with no cross-chunk pairs. Cross-page consistency was checked: the 19-component list in rtl-support matches the 19 per-component sections and the 19 layoutDirection props in #1521. Prec
Tests prove Docs-only PR with no tests to prove. Claims were proven against source instead: uikit-react-native#1521 (merged, head cea86e3f) for UIKitSettings.ts, CometChatUIKit.ts, index.ts, helper/layoutDirectio
Commits 3 commits, all docs(react-native): 4145199 (add RTL page), fa5061d (review fixes), 28b0574 (address RTL review feedback). All reviewed as the combined diff.
Claims Verified against #1521: the layoutDirection setting on UIKitSettings; CometChatUIKit.setLayoutDirection and that it applies to components created afterwards; init and initFromSettings apply it only wh
Public surface Docs only: one new page, ui-kit/react-native/rtl-support, added to the docs.json nav. No URLs removed or renamed, so no redirects are needed.
Acceptance No formal acceptance criteria. The PR goal is to document RN RTL to match the Android/Flutter RTL docs, and it is met.
Frozen findings Round 1: none carried.
Checks run
Command Exit Result
git diff --stat origin/main...HEAD 0 26 files, +798 −3
python3 ~/.claude/skills/cometchat-review/scripts/review-ledger.py plan --repo . --base origin/main --md 0 1 chunk (C1, 26 files), no interaction pairs
~/.multica/bin/docs-linkcheck . --base origin/main 0 PASS: 72 links and 34 anchors; 4 WARNs are a pre-existing methods anchor mismatch
python3 -c "import json;json.load(open('docs.json'))" 0 valid JSON (run by the js-code-reviewer subagent)
npx --no-install mint validate (head) 1 OpenAPI /docs.json warning; same on the base checkout (exit 1), so pre-existing (run by the subagent)
npm view @cometchat/chat-uikit-react-native versions / dist-tags 0 latest 5.6.0; no 5.7.0 (run by the subagent)
gh pr view 645 --repo cometchat/docs --json body,headRefOid,state,isDraft,labels,comments 0 head 28b0574, OPEN; the description cites uikit-react-native#1521
gh pr view 1521 --repo cometchat-team/uikit-react-native --json title,state,headRefOid,... 0 MERGED into dev-v5, head cea86e3f
gh pr diff 1521 --repo cometchat-team/uikit-react-native / grep/sed (UIKitSettings.ts, CometChatUIKit.ts, index.ts, layo 0 All documented API claims confirmed in the source

offline-support.mdx still said the offline texts are translated in all
18 locales; Arabic (added in UI Kit 5.7.0) includes them too, matching
localize.mdx. Round-2 review finding F10 on #645.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@suraj-chauhan-cometchat

Copy link
Copy Markdown
Contributor Author

Reply to the round-2 automated review (head now 0d546b7c).

# Finding Status
F9 Documents 5.7.0, which wasn't published yet Resolved. UI Kit 5.7.0 is now live on npm (latest = 5.7.0), so the merge-timing condition is met.
F1 No minimum version Fixed in 28b05746: "Requires UI Kit 5.7.0 or later" in the quick reference, the Methods layoutDirection row, the composer native-module note and the LLM index.
F3 Icon table not checked against the source Verified against packages/ChatUiKit/src/shared/icons/Icon.tsx (uikit-react-native, merged): MIRROR_ALWAYS (back, forward, chevrons, send / AI send, reply / reply all, forward, reply in thread, call-direction arrows including video, bulleted list, logout); MIRROR_ANDROID_ONLY (videocam, copy, chat, sticker); and RTL_DRAWINGS (the numbered list swaps to a drawing with the numbers on the right). The table matches.
F4 "mirrors every component" Fixed in 28b05746: now "mirrors its components".
F5 Ongoing Call page has no note Fixed in 28b05746: a note on ongoing-call.mdx.
F6 Missing --- separators Fixed in 28b05746: both message-information.mdx and threaded-messages-header.mdx.
F7 "sheets, menus and dialogs it opens" copied where it doesn't apply Fixed in 28b05746: trimmed on Call Buttons, Call Logs ("the menu it opens"), Incoming Call, Outgoing Call, Search and Thread Header. The pages that keep the sentence do open sheets or menus.
F8 Section appended after a stray paragraph in search.mdx Left as is. That paragraph predates this PR, and the new section sits after a ---, so it renders as its own section.
F10 Offline page still says "18 locales" Fixed in 0d546b7c: now "all 18 languages of UI Kit 5.6.0; Arabic, added in UI Kit 5.7.0, includes them too", matching localize.mdx.
F2 Localize still says 18 Fixed in 28b05746: 19 supported languages, and line 223 says Arabic includes the offline texts.
— Broken anchor methods#how-to-login-a-user-with-auth-token in the Expo and CLI integration pages Out of scope. It predates this PR; it gets a separate fix.

…opens

Message Information and Notification Feed open no sheets, menus or
dialogs, so drop 'including the sheets, menus and dialogs it opens' from
their Layout Direction sections. Round-2 review finding F7 on #645.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@suraj-chauhan-cometchat

Copy link
Copy Markdown
Contributor Author

@raj-dubey1 round 2 is fully addressed at head 3e0c092e. Please review again.

One correction to my earlier reply: I said the pages that kept the "sheets, menus and dialogs it opens" sentence all open one. That was wrong for two pages. In 3e0c092e I removed the phrase from message-information.mdx and notification-feed.mdx, which open no sheets, menus or dialogs. The other pages that keep it (Message List, Conversations, Users, Groups, Group Members, Message Header, both composers, Pinned, Saved and AI Assistant Chat History) do open one, which I checked against the kit source.

@raj-dubey1 raj-dubey1 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.

Automated review (Claude)
Requested by Suraj Chauhan on Slack · commit 3e0c092e28 · round 3

Verdict: Approved · from this PR: 4 minors, 4 nits; 2 in older code, not blocking; 1 outside this round's scope, not blocking

The new RTL Support page and the 26 page updates are accurate and well structured. I checked the API names, types, defaults, setting order, icon rules, the 19 components that take layoutDirection, and the Arabic locale against the merged UI Kit PR (uikit-react-native#1521), which shipped as 5.7.0 on npm. The sentence about init() that the description flagged as depending on a pending fix now matches the merged code. Two small things to fix: in localize.mdx, say that Arabic has extra plural forms (_ZERO, _TWO, _FEW, _MANY) that must be overridden too, and remove the duplicated "forward" in the RTL icon table.

Introduced by this PR

  1. 🟡 F1 minor ui-kit/react-native/localize.mdx:223: Plural-override guidance is incomplete for the newly added Arabic locale
    This PR edits the Offline Strings paragraph to say Arabic includes the offline texts. The same line still says that keys ending in _ONE and _OTHER are the singular and plural forms, "so override both forms". For Arabic, the merged UI Kit picks a form per CLDR plural category. uikit-react-native#1521 rewrites packages/ChatUiKit/src/shared/offline/notices.ts so localizedPlural delegates to pluralCountLabel, which reads "_ONE / _OTHER everywhere, plus _ZERO / _TWO / _FEW / _MANY where the language has them". Its ar/translation.json ships OFFLINE_MESSAGES_NOT_SENT_{ZERO,TWO,FEW,MANY} and OFFLINE_UNSENT_MESSAGES_LOST_{ZERO,TWO,FEW,MANY}. A developer who overrides only _ONE and _OTHER for ar, as the docs say, still sees the built-in Arabic text for counts 0, 2, 3–10 and 11–99. Suggested fix: add "Languages with more plural forms, such as Arabic, also use _ZERO, _TWO, _FEW and _MANY; override those too." Consider adding the same to the RTL page's "Arabic plural forms" bullet (rtl-support.mdx:206).
    class: introduced — line is in the PR diff
  2. 🟡 F2 minor ui-kit/react-native/rtl-support.mdx:187: "forward" is listed twice in the mirrored-icons row
    The row reads "back, forward, chevrons, send …, reply, reply all, forward, reply in thread …". In the source these are two different icons: the forward arrow and the forward-message icon, both in Icon.tsx MIRROR_ALWAYS. A reader sees a duplicate. Suggested fix: "back and forward arrows … reply, reply all, forward message, reply in thread".
    class: introduced — file added by this PR
  3. 🟡 F3 minor ui-kit/react-native/rtl-support.mdx:186: Per-icon RTL flip table is unverified against the UI Kit source
    rtl-support.mdx:184-190 lists which icons flip on iOS versus Android, 'following Apple's guidelines', and says the numbered list 'swaps to a drawing'. The only source read, layoutDirection.ts from PR #1521, covers direction resolution and no icon mapping. Fix: have the UI Kit author confirm the table against the icon-mirroring code.
    class: introduced — file added by this PR
  4. 🟡 F9 minor ui-kit/react-native/rtl-support.mdx:11: Documents UI Kit 5.7.0, which is not yet published on npm: merge only with the release
    The new page says Requires UI Kit 5.7.0 or later, and the RTL sections on every component page, plus methods.mdx, localize.mdx (ar) and llms-react-native-v5.mdx, describe the 5.7.0 API. npm view @cometchat/chat-uikit-react-native versions / dist-tags shows latest = 5.6.0 and next = 5.2.10. A grep of the installed 5.6.0 package finds no layoutDirection and no ar locale. The source does exist and matches the docs: uikit-react-native#1521 is MERGED into dev-v5 and bumps packages/ChatUiKit/package.json to 5.7.0. It adds layoutDirection?: CometChatLayoutDirection to UIKitSettings.ts, static setLayoutDirection to CometChatUIKit.ts, and in index.ts export { useCometChatLayoutDirection } and export type { CometChatLayoutDirection }. It also adds layoutDirection?: "ltr" | "rtl" on exactly the 19 listed components and resources/ar/translation.json. The page states the version requirement, so the content is correct. If it goes live before 5.7.0 ships, though, developers will copy settings and hooks that don't exist in the package they can install. Fix: merge this together with the 5.7.0 release, as the PR's own 'Merge timing' note says. Nothing in the text needs to change.
    class: introduced — file added by this PR
  5. ⚪ F4 nit ui-kit/react-native/rtl-support.mdx:25: 'mirrors every component' contradicts the later exceptions
    Line 25 says the UI Kit mirrors every component. Lines 141 and 194-198 exclude the ongoing-call screen, audio players, video and code. Suggest 'mirrors the UI Kit components'.
    class: introduced — file added by this PR
  6. ⚪ F5 nit ui-kit/react-native/rtl-support.mdx:141: Ongoing Call's layoutDirection exception is not mentioned on ongoing-call.mdx
    rtl-support.mdx:141 and the methods.mdx row say the ongoing-call screen ignores layoutDirection, but ongoing-call.mdx has no matching note. Optionally add one there.
    class: introduced — file added by this PR
  7. ⚪ F6 nit ui-kit/react-native/message-information.mdx:344: Missing --- separator before the new Layout Direction section
    message-information.mdx:342-344 runs straight from the style prop table into '## Layout Direction' with no '---'. Every other prop is separated by one, for example line 333. threaded-messages-header.mdx:206 has the same gap.
    class: introduced — line is in the PR diff
  8. ⚪ F8 nit ui-kit/react-native/search.mdx:946: New section appended after a stray trailing paragraph
    The Layout Direction section is added after an orphan text-formatters paragraph at the end of the file, with no Next Steps. Checked against the diff only, not the rendered page.
    class: introduced — line is in the PR diff

Pre-existing / not touched by this PR

Informational: these are not from this PR and do not block it. Worth a ticket where they matter.

  1. 🟡 F10 minor ui-kit/react-native/offline-support.mdx:281: Offline page still says the texts are translated in 'all 18 locales', but this PR makes it 19
    offline-support.mdx:281 reads 'They are translated in all 18 locales of the UI Kit.' This PR changes localize.mdx to 19 languages and adds Arabic, and says Arabic includes the offline strings (localize.mdx:223). The source agrees: uikit-react-native#1521 offlineCore.test.ts requires resources/ar/translation.json for the offline keys. Once this merges, the two pages give different locale counts. Fix: reword offline-support.mdx:281 the same way as localize.mdx:223, e.g. 'translated in all 18 languages of UI Kit 5.6.0; Arabic, added in 5.7.0, includes them too'.
    class: pre_existing — file not touched by this PR
  2. ⚪ F7 nit ui-kit/react-native/call-buttons.mdx:1: Copy-pasted 'sheets, menus and dialogs it opens' is inaccurate for some components
    The new Layout Direction sections in call-buttons, call-logs, incoming-call, outgoing-call, search and threaded-messages-header copy this sentence, but those components open none of these. Trim it per component. The line number is approximate; it applies to the added section in each listed file.
    class: pre_existing — blame 5151b51 predates the PR

Outside the agreed scope

Not a carried finding and not in the fix diff, so it does not block this round.

  1. 🟡 minor ui-kit/react-native/expo-integration.mdx:70: Pre-existing broken anchor #how-to-login-a-user-with-auth-token (4 places)
    expo-integration.mdx:70 and :278, and react-native-cli-integration.mdx:67 and :294, link to methods#how-to-login-a-user-with-auth-token. The heading on main is already "Login using Auth Token" (base methods.mdx:123, anchor #login-using-auth-token), and these lines are the same on base. This PR does not touch them. Pre-existing and does not block; file a ticket to fix the anchors.
Coverage
Row State
Files dispositioned 27
Chunks 1
Interactions There is one chunk, so the planner found no cross-chunk pairs. Combining pass: (1) docs.json nav entry ↔ rtl-support.mdx exists. (2) Every cross-page link and anchor in the added lines resolves: docs-
Tests prove Docs-only PR with no executable tests. Proof is the link checker plus checking each technical claim against the UI Kit source as merged in uikit-react-native#1521 (merge 8b71dcf3) and published as @co
Commits 5 commits reviewed: 4145199, fa5061d, 28b0574, 0d546b7, 3e0c092 (head). Reviewed as the merged three-dot diff origin/main...HEAD.
Claims PR description claims checked: the 19 component pages with layoutDirection hold (the merged #1521 adds layoutDirection?: to exactly these 19 plus UIKitSettings). Arabic (ar) is added, making 19 lang
Public surface Docs only. Adds one nav page (ui-kit/react-native/rtl-support) and no renames or removals, so no redirects are needed. It documents additive, optional UI Kit 5.7.0 API: UIKitSettings.layoutDirection,
Acceptance No acceptance criteria were given. Implicit criteria: the docs match the shipped UI Kit 5.7.0 behaviour and links and nav are intact. Met, apart from minor F1 (incomplete plural-override guidance for
Frozen findings Round 1: none carried.
Checks run
Command Exit Result
python3 ~/.claude/skills/cometchat-review/scripts/review-ledger.py plan --repo . --base origin/main --md 0 1 chunk (C1), 27 files, 803 changed lines, 0 interaction pairs
~/.multica/bin/docs-linkcheck . 0 PASS: 26 changed pages, 73 links, 47 anchors checked. 4 WARNs for a pre-existing #how-to-login-a-user-with-auth-token anchor that is the same on base
python3 -c "import json;json.load(open('docs.json'));print('ok')" 0 ok
gh pr view 1521 --repo cometchat-team/uikit-react-native --json headRefName,headRefOid,state,updatedAt,baseRefName 0 MERGED into dev-v5, head cea86e3f (the local clone was stale at 34ff8e89)
gh pr diff 1521 --repo cometchat-team/uikit-react-native (filtered with grep/awk) 0 init() applies layoutDirection only when !== undefined. package.json 5.6.0→5.7.0. 19 components + UIKitSettings gain layoutDirection. index exports useCometChatLayoutDirection and the CometChatLayoutD
npm view @cometchat/chat-uikit-react-native dist-tags --json / versions / time 0 latest = 5.7.0, published 2026-11-30T15:58:16Z (PR #1521 merged 13:01:40Z)
grep on base methods.mdx / expo-integration.mdx / react-native-cli-integration.mdx 0 Confirms the auth-token anchor mismatch exists on origin/main (pre-existing)
npx --yes mint@latest broken-links (run by the js-code-reviewer subagent) 0 Subagent reported 'success no broken links found'. Exit code inferred, not captured, so not counted as a gate

@ketanyekale
ketanyekale merged commit ea6c638 into main Dec 1, 2026
5 checks passed
hritika-cometchat added a commit that referenced this pull request Dec 1, 2026
)

- RTL page: "mirrors its components" (exceptions follow), and the
  mirrored-icons row adds message privately (checked against the
  autoMirrored drawables in v6.4.0).
- Methods and the 18 component Layout Direction sections name the
  version: needs / available since UI Kit 6.4.0.
- Incoming, Outgoing and Ongoing Call: the call screen the UI Kit opens
  follows the global setting; the component's own direction applies in
  your own screen.
- Offline Support: plurals overrides replace the whole element; Arabic
  needs zero, one, two, few, many and other.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
hritika-cometchat added a commit that referenced this pull request Dec 1, 2026
AI Assistant Chat History, Pinned Messages, Saved Messages and Search
now have a --- before the section, like the other component pages
(same finding as F6 in the React Native review, #645).

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

This branch was successfully deployed

1 active deployment
staging — 3e0c092e Deployed Dec 1, 2026 by mintlify[bot]
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.

4 participants