Skip to content

docs(android): add RTL Support for the Android UI Kit - #627

Merged
ketanyekale merged 8 commits into
mainfrom
docs/android-uikit-rtl-support
Dec 1, 2026
Merged

ketanyekale merged 8 commits into
mainfrom
docs/android-uikit-rtl-support

Conversation

@hritika-cometchat

@hritika-cometchat hritika-cometchat commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

Right-to-left (RTL) docs for the Android UI Kit v6 (Kotlin XML Views and Jetpack Compose), and the other changes in UI Kit 6.4.0. Matches the release PR uikit-android #1037, merged to master-v6 in #1038 (tag v6.4.0 @ 2e2f6be70), which includes the RTL work from #984, and the RTL developer-experience doc (D-RTL-2). Task: ENG-41248 (X1, one RTL page per UI Kit). The other kits: #618 (React, Angular), #622 (Flutter), #623 (iOS), #645 (React Native).

UI Kit 6.4.0 is published on Maven (chatuikit-kotlin-android, chatuikit-compose-android and chatuikit-core-android; latest = 6.4.0), so this can merge now.

New page

ui-kit/android/rtl-support, under Theming after Localize, available from UI Kit 6.4.0. Same outline as the Flutter page:

  • layout direction vs language, and the android:supportsRtl requirement;
  • the global setting (UIKitSettingsBuilder.setLayoutDirection, CometChatUIKit.setLayoutDirection);
  • the per-component setting: Compose layoutDirection, Views setCometChatLayoutDirection / app:cometchatLayoutDirection, and the components that take it;
  • base components (they follow their parent, or the global setting on their own);
  • which setting wins, and common scenarios;
  • what the kit does for you: overlays, viewers, snackbars;
  • what mirrors and what doesn't, and text, digits and dates (including file sizes, recorder timers and media durations); text with no letters, such as 123 + 456 = 579, reads left to right in bubbles and in the composer;
  • custom views and your own overlays;
  • upgrading notes, including the Views bubble-margin parameters (left/right → start/end).

Updated pages

  • 18 component pages: a Functionality row and a "Layout Direction" section (XML element, Views setter, Compose parameter), marked Available since v6.4.0, with a --- separator before it on every page. Incoming, Outgoing and Ongoing Call add that the call screen the UI Kit opens follows the global setting; the component's own direction applies when you host it in your own screen.
  • Overview: an RTL row in the quick reference and an "Upgrading from 6.3.0" section, including the bubble-margin change: calls that pass the values by position compile unchanged, and left = / right = named arguments become start = / end =.
  • Localize: setLocale changes the language only. New "Group Action Messages" section: the lines are translated and say "You" for the logged-in user, with all 25 string keys. isRtl stays in the API table, marked deprecated in 6.4.0 (it is kept, not removed).
  • Methods: setLayoutDirection in the UIKitSettings table (needs UI Kit 6.4.0 or later), and a Layout Direction section.
  • Offline Support: notices are snackbars in the component's layout direction. The two <plurals> keys: an override replaces the whole element, and Arabic needs zero, one, two, few, many and other.
  • Message Bubble Styling: the file bubble subtitle shows the sent date and the file size.
  • Troubleshooting: a new RTL section.
  • View Slots: start/end values in RTL.
  • Version 6.3.0 → 6.4.0 in the install snippets: Getting Started (all three pages), Calling Integration, Offline Support, Upgrading from v5, and the llms index. Sentences such as "6.3.0 or later" and "the first version with offline support" are unchanged.
  • llms index: an entry for the new page.
  • Kit behaviour wording: "toast" → "snackbar" where the kit shows a message (the kit now shows snackbars that follow the component's direction). Toasts in sample app code are unchanged.

Main is merged in (the 6.3.0 offline docs); the two conflicts in Conversations and Message List keep both the offline rows and the layout-direction row.

Checks

  • Every API name, class path, string key and default checked against tag v6.4.0 @ 2e2f6be70.
  • Compose components keep their 6.3.0 signatures, so the upgrading notes say no rebuild is needed. The one source change is the Views bubble-margin named arguments, which the notes cover.
  • Icon mirroring table checked against the autoMirrored drawables in v6.4.0.
  • Published artifacts: the 6.4.0 POMs resolve on Maven.
  • mint broken-links: no broken links. All new anchors resolve.

Carried over from the React Native review (#645)

PR #645 had three automated review rounds and was approved. Each finding was checked against this PR:

#645 finding Here
Merge only with the published release 6.4.0 is published on Maven
No minimum version named Methods and all 18 Layout Direction sections say 6.4.0
Icon table not checked against the source Checked against the autoMirrored drawables; added "message privately"
"Mirrors every component" contradicts the exceptions Now "mirrors its components"
Ongoing Call exception not on its page On Android, Ongoing Call takes its own direction; the three call pages say the screen the kit opens follows the global setting
Missing --- before Layout Direction Added on AI Assistant Chat History, Pinned Messages, Saved Messages and Search
Arabic plural forms Offline Support lists all six quantities for a values-ar override
Duplicate "forward", stray paragraph on Search, language counts, auth-token anchor Not applicable to the Android pages

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

Screenshots (if applicable)

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

🤖 Generated with Claude Code

New page ui-kit/android/rtl-support: layout direction vs language,
android:supportsRtl, the global setting (UIKitSettingsBuilder /
CometChatUIKit.setLayoutDirection) and the per-component setting (Compose
layoutDirection, Views setCometChatLayoutDirection / app:cometchatLayoutDirection),
which setting wins, base components, what mirrors and what doesn't, digits
and dates, custom views and overlays, and upgrading notes.

Also: a Layout Direction section and Functionality row on 18 component pages;
Localize (setLocale is language-only, isRtl removed), Methods, Troubleshooting,
View Slots and the llms index; kit "toast" wording changed to snackbar;
nav entry after Localize. Matches uikit-android PR #984 @ a4b44a10c.

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

mintlify Bot commented Nov 20, 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, 11:22 AM

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

hritika-cometchat and others added 2 commits November 25, 2026 11:39
…l-support

# Conflicts:
#	ui-kit/android/conversations.mdx
#	ui-kit/android/message-list.mdx
- Bump the UI Kit version to 6.3.1 in the setup and upgrade pages.
- Localize: group action message keys, isRtl deprecated (kept, not removed).
- RTL Support: available from 6.3.1, digits for file sizes, timers and
  durations, upgrade table matches the release.
- Message bubble styling: file subtitle shows the sent date and size.
- Overview: RTL row in the quick reference and an "Upgrading from 6.3.0"
  section.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Since uikit-android d0d7c7f17 both kits show offline notices with the
kit snackbar, which follows the component's layout direction. Update the
Conversations, Message List and Offline Support pages to match.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Overview and RTL upgrading notes: bubble-margin named arguments
  (left/right -> start/end) are the one source change; positional calls
  and Compose calls compile unchanged.
- Text with no letters reads left to right in bubbles and the composer
  (ENG-58494).
- Code blocks join audio/video players as always left to right.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Install snippets, the llms index, "available since", "deprecated in"
and the overview/RTL page now say 6.4.0 (tag v6.4.0). "Upgrading from
6.3.0" and "6.3.0 or later" are unchanged.

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

- 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>
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>

@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 Hritika Naik on Slack · commit d6d2989deb · round 1

Verdict: Approved · from this PR: 3 nits; 2 in older code, not blocking

This PR adds a thorough RTL Support page for the Android UI Kit, consistent Layout Direction sections on all 18 component pages, and the 6.3.0 → 6.4.0 version bump. The pages agree with one another on API names, precedence rules, the version label and the upgrade notes. Nav, links and anchors are clean. The remaining items are small polish:

  • add the CometChatLayoutDirection import to the short snippets;
  • name the receiver in the RTL upgrade table (CometChatUIKit.setLayoutDirection);
  • mention AUTO in the component rows;
  • add a layout-direction bullet to the Pinned and Saved Messages Functionality lists.

This review did not check the API names and the binary-compatibility claim against the uikit-android v6.4.0 source, because that source was not available here. They rest on the author's stated check against tag v6.4.0.

Introduced by this PR

  1. ⚪ F1 nit ui-kit/android/rtl-support.mdx:269: Upgrade table calls setLayoutDirection without naming the receiver
    rtl-support.mdx:269 says "call setLayoutDirection(CometChatLayoutDirection.RTL)" with no receiver. The same page has two methods with that name: UIKitSettings.UIKitSettingsBuilder().setLayoutDirection (line 89, at init) and CometChatUIKit.setLayoutDirection (line 110, at runtime). overview.mdx:109 says it explicitly: CometChatUIKit.setLayoutDirection(CometChatLayoutDirection.RTL). Fix: write CometChatUIKit.setLayoutDirection(CometChatLayoutDirection.RTL) (or UIKitSettingsBuilder().setLayoutDirection(...) at init), to match overview.mdx:109.
    class: introduced — file added by this PR
  2. ⚪ F2 nit ui-kit/android/conversations.mdx:1013: Layout Direction snippets use CometChatLayoutDirection without its import
    The new Views/Compose snippets use CometChatLayoutDirection.RTL without an import. Examples: conversations.mdx:1013 and :1020, the same pattern on all 18 component pages, and rtl-support.mdx:110-113, which also uses CometChatUIKit and activity undeclared. Only rtl-support.mdx:81-83 shows import com.cometchat.uikit.core.CometChatLayoutDirection. Someone copying a component-page snippet gets an unresolved reference with no hint of the package. Fix: add import com.cometchat.uikit.core.CometChatLayoutDirection to the Kotlin snippets, or a one-line note naming the package.
    class: introduced — line is in the PR diff
  3. ⚪ F3 nit ui-kit/android/conversations.mdx:491: Component method rows list only LTR/RTL, not AUTO
    The new row on every component page lists the values as "LTR or RTL ... unset inherits it": conversations.mdx:491, incoming-call.mdx:219 and the matching rows elsewhere. rtl-support.mdx:14, :99 and :152 document CometChatLayoutDirection.AUTO as the default and say you can "leave it unset, or pass AUTO". The row is not wrong, but a reader of a component page can't tell that AUTO is an accepted value. Fix: write "AUTO (default, inherits), LTR or RTL".
    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. 🟡 F5 minor ui-kit/android/troubleshooting.mdx:84: Pre-existing broken anchor #upgrading-from-62x (rendered id is upgrading-from-6-2-x)
    docs-linkcheck --base origin/main . (exit 0, WARN) checked the rendered pages and reports that /ui-kit/android/overview has no heading id upgrading-from-62x; the rendered id is upgrading-from-6-2-x. The same link is on origin/main:ui-kit/android/troubleshooting.mdx:84, and the heading ## Upgrading from 6.2.x was not renamed by this PR (origin/main:overview.mdx:103). It does not block this PR. Fix: change the link to #upgrading-from-6-2-x; a one-line fix can ride along here, or file a ticket.
    class: pre_existing — blame e63e3b3 predates the PR
  2. ⚪ F4 nit ui-kit/android/pinned-messages.mdx:139: Pinned/Saved Messages Functionality lists don't mention layout direction
    The PR description says each of the 18 component pages gains a Functionality row. pinned-messages.mdx (## Functionality at :139, a bullet list) and saved-messages.mdx (## Functionality at :130) gain only the ## Layout Direction section at :153 and :144. Neither Functionality list nor callback table mentions setCometChatLayoutDirection / layoutDirection. The section is present and correct, so nothing is missing for a reader who scrolls to it. Fix: add a "Layout direction" bullet linking to the section, or correct the PR description.
    class: pre_existing — blame 3bc6449 predates the PR
Coverage
Row State
Files dispositioned 36
Chunks 1
Interactions One chunk, so the plan printed no cross-chunk pairs. Combining pass checked:
  • API names (setLayoutDirection, setCometChatLayoutDirection, app:cometchatLayoutDirection, the layoutDirection parameter, |
    | Tests prove | Docs-only PR: no unit tests apply. The proof is the rendered link/anchor check: docs-linkcheck checked 89 links on added lines, 65 incoming anchors and 72 rendered anchors, with result PASS. |
    | Commits | 8 commits on origin/main..d6d2989: 1f96a83, d0e7dfb (merge of main), d78276b, 63c9bc2, 4908b34, e93d480, 1af94e7, d6d2989. All are docs(android)/docs(ENG-41248) and in scope. The merge-confli |
    | Claims | Verified against the diff:
  • The new page sits under Customization after Localize in docs.json.
  • All 18 component pages have a --- separator before ## Layout Direction.
  • Localize lists 25 group- |
    | Public surface | Docs only. Adds one new page URL (/ui-kit/android/rtl-support) and new headings: Layout Direction on 18 pages, Upgrading from 6.3.0 in overview, Group Action Messages in localize, and an RTL section i |
    | Acceptance | No ticket acceptance criteria were supplied. Judged against the PR's stated scope (ENG-41248 X1: one RTL page for the Android UI Kit plus component-page sections). Met, apart from the nit on the Pinne |
    | Frozen findings | Round 1: none carried. |
Checks run
Command Exit Result
git log --oneline origin/main..HEAD; git diff --stat origin/main...HEAD 0 8 commits, 36 files, +1031/-39
python3 ~/.claude/skills/cometchat-review/scripts/review-ledger.py plan --repo . --base origin/main --md 0 One chunk C1, 36 files, no cross-chunk pairs
python3 -c "import json;d=json.load(open('docs.json'));print('ok')" 0 ok
~/.multica/bin/docs-linkcheck --base origin/main . 0 PASS: 35 changed pages, 89 links, 65 incoming anchors, 72 rendered anchors. 1 WARN, the pre-existing troubleshooting.mdx:84 link to #upgrading-from-62x
git grep -n "upgrading-from-62x\/Upgrading from 6.2" origin/main -- ui-kit/android/overview.mdx ui-kit/android/troublesh 0 The same link and heading exist on origin/main, so the WARN is pre-existing
git grep -n -i "layoutDirection\/Layout Direction" HEAD -- ui-kit/android/{conversations,pinned-messages,saved-messages, 0 Names and versions consistent; findings confirmed at the cited lines
git grep -n "setLocale(\/Language\.ARABIC\/isRtl" HEAD -- ui-kit/android 0 setLocale signature and isRtl deprecation consistent across pages
git grep -n "presentation\.(pinnedmessages/savedmessages/incomingcall/...)" HEAD -- ui-kit/android 0 New XML tags match the package paths already used on those pages
gh api repos/cometchat-team/uikit-android/git/refs/tags/v6.4.0 1 Denied by the permission policy. Android source not reachable, so API claims are marked unverified

@DhruvKushvaha2004
DhruvKushvaha2004 self-requested a review December 1, 2026 11:59
@ketanyekale
ketanyekale merged commit aaa8fa6 into main Dec 1, 2026
5 checks passed

This branch was successfully deployed

1 active deployment
staging — d6d2989d 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