docs(android-uikit): reframe thread subscription coverage - #521
hritika-cometchat wants to merge 15 commits into
Conversation
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Automations to automatically generate PRs for you. |
…guide Matches the structure Android (#521) and React Native (#516) landed on: thread subscription is a behaviour of threads, not a separate feature, so it reads better in one place. - Delete guide-thread-subscription.mdx, merging it into guide-threaded-messages.mdx as a "Thread Subscription" section with its subsections demoted a level. - Drop the nav entry and add a docs.json redirect to the new anchor. - Repoint the 8 inbound links; the three deep links keep their #turning-the-feature-off anchor. - Remove the "Copy and Localization" string table for parity — no other platform documents per-feature localization keys in a guide, and ios/localize.mdx already points at the repo as the key list. The VoiceOver-only label it documented is kept as a Behavior bullet. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
…ntrols Drops the app-wide CometChatThreadSubscriptionConfig gate from the docs, matching React Native (#516, which removes its equivalent ThreadSubscriptionConfig) and Android (#521, which removes setEnableThreadSubscription without documenting the replacement). The per-surface hide flags are the documented control surface on every kit. - Remove the "Turning the Feature Off" section. - State on-by-default and the not-a-dashboard-flag caveat under "The Surfaces", where the hide flags are introduced. - Drop the gate line from the kit's-gate code comment, keeping the parentMessageId == 0 rule the snippet exists to explain. - Repoint core-features, message-list and message-header at the per-surface flags. The app-wide path was never documented for iOS, so no published integration relies on it; UIKitSettings.enable(threadSubscription:) and CometChatUIKit.isThreadSubscriptionEnabled() appear nowhere on main. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
Following this PR's structure on iOS in #519 — the standalone guide is now folded into One thing I'd like to confirm rather than assume, because iOS has now matched it and I want to be sure we all meant to land here. After this PR, uikit-android#913 removes So an integrator has no documented way to turn the feature off app-wide. The visibility methods are per-instance: to remove it everywhere they'd set flags on every Worth noting Android is the platform where this actually bites. Same situation on React Native in #516, which removes So the question is just: is "per-surface flags are the documented control surface, the global gate is deliberately undocumented" the intended position across all three kits? If yes — fine, iOS is aligned and nothing needs to change here. If no, all three PRs need a short "turning the feature off" note and I'm happy to restore the iOS one. |
Docs review: request changesMechanically this PR is clean — the deleted guide has a correct anchored redirect, the build is safe, and every link and image resolves. Two content problems matter, and both trace back to the premise in the description being wrong about what the paired kit PR actually did. There is also roughly 700 lines of undisclosed scope. What passed (checked, not assumed):
P0 — these pages describe behaviour no released kit hasThe description says to land this "with or after uikit-android#913". #913 is merged (2026-09-18) — but into
So for every reader on the current stable release, "Enabled by default" in Suggest holding this until 6.1.0 ships stable, or version-gating the wording ("from v6.1.0 …"). P1 — the only global opt-out is now undocumentedThe description says these rows document "API that #913 deletes". #913 does not delete them — it deprecates the setter and keeps both. From #913's own diff: @Deprecated(
…
fun setEnableThreadSubscription(enable: Boolean): UIKitSettingsBuilder// Deprecated, but it must keep working — it is the only global opt-out.
Deleting both rows from P1 — undisclosed scope (~700 lines)The branch is
The content reads fine on its own, but none of it is described for review. Either split it out or extend the description so reviewers know what they are approving. P2 — nits
Happy to push the concrete edits if useful: the restored deprecated Review produced with Claude Code. Structural checks (redirects, navigation, orphans, link rot) were run against the PR head; the release-version claims were verified by reading |
…precated opt-out Review feedback on #521. The paired kit PR (uikit-android#913) deprecates setEnableThreadSubscription rather than deleting it, and is merged to ENG-38644/enterprise-merge, not a release line. Verified against the tags: v6.0.8 (latest stable) still reads `enableThreadSubscription == true` (default OFF), while v6.1.0-citest.20 reads `?: true` (default ON). - Gate the "enabled by default" wording on v6.1.0 in core-features, message-list, guide-threaded-messages and threaded-messages-header, noting the v6.0.x opt-in. - Restore both methods.mdx rows: setEnableThreadSubscription marked deprecated with the corrected default, and isThreadSubscriptionEnabled() in the feature flags table. The setter is the only app-wide opt-out, so dropping it left integrators with no documented way to turn the feature off. - Rename the new colour guide to "Color Selected Text" so it no longer collides with the Custom Text Formatter base-class page in the sidebar. - Point the methods link at #init; there is no #uikitsettings heading. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
- Android: drop the `setEnableThreadSubscription` / `isThreadSubscriptionEnabled` init-time gate from the UI Kit settings docs; the feature is documented as available out of the box. - Android: fold the standalone Thread Subscription guide into the Threaded Messages guide as a `Thread Subscription` section, remove the nav entry and add a redirect to the new anchor. - Android: keep a separate Thread Subscription entry in core features next to Threaded Conversations, pointing at the merged guide section. - React: add a Thread Subscription subsection under Threaded Conversations in core features, linking the message list option and thread header bell. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
- message-list: `setThreadSubscriptionOptionVisibility()` no longer footnoted as depending on a thread-subscription feature gate. - threaded-messages-header: same for the subscription bell row in the XML/Compose parity table. - core-features: restore the blank line before `## Threaded Conversations` so the heading renders after the Rich Text Formatting table. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
…tions Demote the core-features `Thread Subscription` heading from `##` to `###` so it reads as a subsection of Threaded Conversations, matching how the React UI Kit core-features page is structured. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
…ct Native Mirror the landed React Native wording from PR #516 across the Android docs: - conversations: replace the "Built-in Pin Conversation Option" subsection with a top-level "Pinning Conversations" section using RN's framing, and move the setPinnedBy builder snippet under Filtering Conversations. Keep Android's own ConversationListener pin callbacks rather than RN's no-real-time-channel warning. - threaded-messages-header: replace the Subscription Bell callback subsection with a "Thread Subscription" section parallel to RN's, noting the bell lives in CometChatThreadHeader and can be hosted in the thread screen's top bar via ThreadSubscriptionBell. - pinned-messages / saved-messages: trim the overviews to RN's minimal shape and add the pin and save screenshots. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
… toolbar Mirrors the React Native text color guide from #516 for Android, adapted to what the Android UI Kit actually ships. React Native colors text through a built-in rich-text format (applyInlineStyle("color", ...)), so its guide has nothing to render. Android's RichTextFormat has no color entry, so the Android path is a two-part one: a swatch row in the rich-text toolbar's trailing slot writes a {color:#rrggbb}...{/color} token through ComposerInputController, and a CometChatTextFormatter renders that token - applyComposerSpans() on XML and composerVisualTransformation() on Compose for the live input, prepare*Span() on bubbles, conversation subtitles and previews. Every API in the guide was read from the shipped source: the trailing slot (RichTextToolbarTrailingViewListener / trailingToolbarContent), the controller members, the null tracking-character idiom used by CometChatRichTextFormatter, and the formatter hooks whose KDoc documents this exact colour-token case. Also follows the RN naming: the new guide takes the "Custom Text Formatter" title and the base-class guide becomes "Text Formatter Base Class" in the sidebar, so the group has no two identical entries. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
…te marker divergence
Two gaps found by comparing against the React guide
(ui-kit/react/guide-custom-text-formatter.mdx):
React's "Render It Everywhere" step registers the formatter on the pinned
and saved panels, which the Android step omitted. Both Android components
take formatters (setTextFormatters on the XML pair, a textFormatters param
on the Compose pair), so the same message would have rendered a raw token
in those panels.
The three kits also do not agree on the marker, which the guide now states
outright instead of implying the token is portable. Android has no built-in
color and uses {color:#hex} per its own CometChatTextFormatter examples;
React's guide uses {color=#hex}; React Native has color built into its
rich-text format and emits <color=#hex> with no formatter at all. A mixed
Android + React Native app therefore has to standardise on the React Native
form, since that one is produced by the UI Kit itself.
The React Native guide is not linked because it ships in an unmerged PR and
the link would 404 if this lands first.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
…n code with the master apps
Structure now mirrors ui-kit/react/guide-custom-text-formatter.mdx section
for section: Goal, Prerequisites, Steps 1-4, How It Round-Trips, Next Steps.
Step 3 registers the formatter on the composer and mounts the button (the
two wiring snippets move out of Step 2), Step 4 covers the read-only
surfaces. The standalone Token, What to Expect, ComposerInputController and
cross-platform marker sections are gone; the token is introduced in one line
at the top of Step 1, where React introduces its own.
No other platform is named anywhere in the page.
The sample code now follows the working colour formatter in the
uikit-android master apps (stash 5e35cd94f, ENG-37569-thread), which the
hand-written version got wrong in several places:
- Private-use U+E000 tracking char so suggestions never trigger, plus the
getDisableSuggestions() override and the identity getOriginalText().
- XML hides the markers with a zero-width ReplacementSpan rather than
RelativeSizeSpan(0f), which only scaled the text down.
- Compose removes the marker characters and supplies a real OffsetMapping.
The previous zero-font-size plus OffsetMapping.Identity let the caret sit
inside invisible markers.
- render() walks matches right-to-left so in-place deletes keep earlier
offsets valid.
- The button skips links as well as mentions, because replaceSelection()
deletes and re-inserts and would strip a mention's non-editable span. An
empty selection seeds a placeholder token.
- Each surface gets its own formatter instances; the built-in mentions
formatter is stateful per rendered message.
The token stays {color:#hex}...{/color}, confirmed as the agreed form, and
the regex accepts 3-6 hex digits to match it. Step 3's XML snippet carries
the imports it needs, since it is a different file from Step 2's.
Every API in the page was checked against the shipped source: the trailing
slot and its listener signature, all seven ComposerInputController members,
the formatter hooks in both toolkits, and setTextFormatters on the composer,
message list, conversations, pinned and saved messages.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
…precated opt-out Review feedback on #521. The paired kit PR (uikit-android#913) deprecates setEnableThreadSubscription rather than deleting it, and is merged to ENG-38644/enterprise-merge, not a release line. Verified against the tags: v6.0.8 (latest stable) still reads `enableThreadSubscription == true` (default OFF), while v6.1.0-citest.20 reads `?: true` (default ON). - Gate the "enabled by default" wording on v6.1.0 in core-features, message-list, guide-threaded-messages and threaded-messages-header, noting the v6.0.x opt-in. - Restore both methods.mdx rows: setEnableThreadSubscription marked deprecated with the corrected default, and isThreadSubscriptionEnabled() in the feature flags table. The setter is the only app-wide opt-out, so dropping it left integrators with no documented way to turn the feature off. - Rename the new colour guide to "Color Selected Text" so it no longer collides with the Custom Text Formatter base-class page in the sidebar. - Point the methods link at #init; there is no #uikitsettings heading. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
…tem-pin error code, move the redirect - Revert ui-kit/react/core-features.mdx to main; this PR is Android-only. - Name ERR_SYSTEM_PINNED_CONVERSATION as the rejection for unpinning an admin pin. - Move the guide-thread-subscription redirect next to the other Android redirects so it no longer collides with #519 at the head of the array. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2fbb0dc to
5b9d638
Compare
- Core Features: app-settings tables for Pin & Save and Pin Conversations, system-pin note, server-side auto-subscription for threads. - Pin & Save guide: App Settings and Limits section plus an error-code table (ERR_PERMISSION_DENIED, ERR_SYSTEM_PINNED_CONVERSATION, limit codes). - Threaded Messages: auto-subscription is done by the server, not the kit. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…n section, scope the live-updates caveat to messages Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… and text color - threaded-messages-header: make the reply-count row the default bell placement, top bar as an option - guide-threaded-messages: drop the Figma reference - conversations: use React's app-setting wording for the pin-conversation flag - guide-text-color: add React's cross-platform raw-token warning, register the formatter on all Compose surfaces, restrict to six-digit hex, document the empty-selection placeholder - guide-pin-and-save-messages: align ERR_SYSTEM_PINNED_CONVERSATION with the error guide and stop claiming the error guide lists every code Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…d-messages menu - conversations: add Compose hidePinOption to the functionality table and the Pinning Conversations section - message-list, guide-threaded-messages: add Compose hideThreadSubscriptionOption, matching React's coverage - pinned-messages: the row menu offers Translate and has no thread subscription option (by design in the kit) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… message-list hideDeleteOption, hideEditOption, hideTranslateOption and showMarkAsUnreadOption don't exist on the Compose CometChatMessageList. Use hideDeleteMessageOption, hideEditMessageOption and hideTranslateMessageOption, and note that Mark as unread is shown by default in Compose (hideMarkAsUnreadOption), unlike the XML view where it is hidden. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
raj-dubey1
left a comment
There was a problem hiding this comment.
Looks good. I checked the documented APIs, params and defaults against uikit-android master-v6 and everything lines up: the deprecated setEnableThreadSubscription (default true), the Compose message-list param renames, the thread-header and bell params, pin-conversation APIs, the pinned-messages menu (Translate added, subscribe deliberately absent), and everything guide-text-color uses (ComposerInputController, RichTextToolbarTrailingViewListener, trailingToolbarContent, applyComposerSpans / composerVisualTransformation, setTextFormatters on all four surfaces). v6.1.0 is already the latest release, so the version gating is accurate. Nav refs resolve, the redirect covers the removed page, and no internal links are broken.
A couple of small non-blocking notes inline.
… wording and setting keys
ketanyekale
left a comment
There was a problem hiding this comment.
Docs review: approve
Reviewed at head 89f0afd. Structurally clean, and every API, parameter and default I spot-checked matches the released kit (cometchat/cometchat-uikit-android tag v6.1.0, published 2026-09-29). The earlier blockers on this PR (version-gating, the dropped app-wide opt-out) are resolved. Nothing below blocks merge.
What passed
- Redirects — 1 page removed, 1 redirect added (
/ui-kit/android/guide-thread-subscription→/ui-kit/android/guide-threaded-messages#thread-subscription). 0 404s, 0 chained 404s. No remaining links to the removed page. - Navigation — 0 unresolved
pagesrefs (build is safe), 0 pages de-listed but kept.guide-text-coloris registered in nav. - Links and anchors — 0 broken internal links across 69 scanned files. Hand-checked the new anchors:
methods#init,message-composer#rich-text-toolbar-trailing-buttons,conversations#pinning-conversations,conversations#filtering-conversations,sdk/android/v5/thread-subscription#notification-preferences. - Images —
images/pin.pngandimages/save.pngexist, render the right screens, and have descriptive alt text. - Version gating — v6.1.0 is the current stable release, and
isThreadSubscriptionEnabled()there isenableThreadSubscription ?: true, so "enabled by default from v6.1.0, opt-in on v6.0.x" is accurate everywhere it appears. - App-wide opt-out —
setEnableThreadSubscriptionis@Deprecatedbut kept in v6.1.0 as the global opt-out, exactly asmethods.mdxand the guide now say.CometChatThreadSubscriptionConfigdoes not exist in the v6.1.0 source, so there is no undocumented replacement class (this closes the question raised earlier in the thread). - API names against v6.1.0 source — Compose message-list params (
hideDeleteMessageOption,hideEditMessageOption,hideTranslateMessageOption,hideMarkAsUnreadOption,hideThreadSubscriptionOption); thread header (hideThreadSubscription,isSubscribed,onSubscriptionToggle,threadSubscriptionView,ThreadSubscriptionBell,app:cometchatThreadSubscriptionVisibility); conversations (hidePinOption,setPinConversationOptionVisibility); the pinned-messages long-press menu (Message info, Copy, Translate, Unpin, Delete — no thread option); and everything the text-color guide uses (ComposerInputControllermembers,RichTextToolbarTrailingViewListener.createView,trailingToolbarContentas aRowScopelambda,applyComposerSpans,composerVisualTransformation,preparePreviewSpan,setTextFormatters/textFormatterson all five surfaces). - Defaults — XML Mark as unread defaults hidden and Compose defaults shown, as documented. Compose
enableRichTextFormattingdefaults tofalse, and the Step 3 snippet now sets it. - Error codes — all six pin/save codes in the new table are present in
/articles/error-guide, and the system-pin wording ("can neither pin nor unpin") is now the same inconversations.mdx,core-features.mdx,guide-pin-and-save-messages.mdxand the Error Guide.
Nits (non-blocking, fine as a follow-up)
ui-kit/android/llms-android-v6.mdx:122-127— the commented-out block says Pinned Messages, Saved Messages and the Pin & Save guide are "not yet on main". They are on main now, so the block can be uncommented. The same page doesn't list the new Color Selected Text guide and still labels the formatter page "Custom Text Formatter" (line 119).ui-kit/android/custom-text-formatter-guide.mdx—sidebarTitleis now "Text Formatter Base Class" buttitleis still "Custom Text Formatter", so the sidebar label and the page heading disagree.ui-kit/android/guide-text-color.mdx, Step 4 Compose tab —formatters()usescontext, which is only declared in the Step 3 snippet. Addingval context = LocalContext.currentmakes the block copy-pasteable on its own.- Enablement wording varies: "in the CometChat Dashboard" (
pinned-messages.mdx:45,saved-messages.mdx:40), "app setting" (conversations.mdx:438), "Dashboard flag" (conversations.mdx:441). Worth settling on one term. - The PR title and the empty Description section cover only the thread-subscription reframe; the PR also adds the Color Selected Text guide and the pin/save updates. A one-line description update would help anyone reading the history later.
Review produced with Claude Code. Structural checks were run against the PR head; API names and defaults were read from the v6.1.0 tag of cometchat/cometchat-uikit-android.
Description
Type of Change
Checklist
Additional Information
Screenshots (if applicable)
New images/pin.png and images/save.png on the Pinned Messages and Saved Messages pages.
🤖 Generated with Claude Code