Skip to content

docs(ui-kit/ios): document per-entity link, phone and email colors - #484

Open
shreeyajoshi-cometchat wants to merge 1 commit into
mainfrom
docs/ios-per-entity-link-colors
Open

docs(ui-kit/ios): document per-entity link, phone and email colors#484
shreeyajoshi-cometchat wants to merge 1 commit into
mainfrom
docs/ios-per-entity-link-colors

Conversation

@shreeyajoshi-cometchat

Copy link
Copy Markdown

Description

Documents the per-entity link colours added to the iOS UI Kit in cometchat-team/uikit-ios#957 (ENG-38546). Before this change textHighlightColor was the single value applied to URLs, phone numbers and email addresses alike, so integrators could not colour them differently. Three new optional properties — textLinkColor, textPhoneNumberColor and textEmailColor — now exist on both TextBubbleStyle and LinkPreviewBubbleStyle, and none of them were documented.

Two sections are added to ui-kit/ios/message-bubble-styling.mdx:

  • Link, Phone Number and Email Colors — nested under ## Text Bubble. A properties table covering the three new UIColor? properties plus textHighlightColor as the documented fallback, followed by global and per-instance Swift examples.
  • Link Colors in the Preview Bubble (with a Preview card labels sub-table) — nested under ## Link Preview Bubble. Covers how preview bubbles inherit the colours from textBubbleStyle, and separates the tappable in-text link from the preview card's own labels.

Behaviour was verified against the implementation rather than the PR description, which surfaced two things worth noting for review:

  • The fallback chain is textLinkColor ?? textHighlightColor, with defaults set in TextBubbleStyle.init(styleType:) — the theme's info colour for incoming bubbles, white for outgoing.
  • The source PR's description covers two commits, but a third (2b8df826b) adds didSet-driven inheritance from textBubbleStyle to linkPreviewBubbleStyle. It only fills values still unset and re-runs on every write to textBubbleStyle, so assignment order is observable. This is documented as a Note so integrators do not hit it as a surprise.

linkTextColor and textLinkColor are easy to confuse — the first styles the static URL caption printed beneath the preview card, the second the tappable link in the message text. Both are called out explicitly, with the Android attribute equivalents (cometchatTextBubbleLinkPreviewTitleColor, ...DescriptionColor, ...LinkColor) cross-referenced.

Related Issue(s)

ENG-38546 · Source PR: cometchat-team/uikit-ios#957

Type of Change

  • New documentation

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

iOS is the first CometChat platform to expose per-entity link colours, so there was no cross-platform doc pattern to mirror and these sections are iOS-original. For reviewer context, a survey of the other platforms found:

Platform Capability
iOS Per-entity: textLinkColor / textPhoneNumberColor / textEmailColor
Android A single cometchatTextBubbleTextLinkColor
React Native A single linkTextColor, explicitly shared across URL, phone and email
Flutter URL/email/phone detectors exist, but no colour API
React / Angular Only a global --cometchat-text-color-highlight token or hand-written CSS
Vue None

One naming collision is worth flagging but is not addressed here, since it is an API-level concern rather than a docs one: iOS uses linkTextColor for the preview card's URL caption, whereas React Native uses linkTextColor for the tappable link — the opposite meaning. The iOS docs disambiguate the two names in prose, but if cross-platform parity work follows, that is the collision to resolve.

No screenshots included — the change is text and tables only, with no new images.

Covers the new textLinkColor, textPhoneNumberColor and textEmailColor
properties on TextBubbleStyle and LinkPreviewBubbleStyle, their fallback
to textHighlightColor, and the inheritance from textBubbleStyle to
linkPreviewBubbleStyle.

Also clarifies linkTextColor (the static URL caption on the preview card)
versus textLinkColor (the tappable link in the message text), with the
Android attribute equivalents.

Ref: cometchat-team/uikit-ios#957 [ENG-38546]

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@mintlify

mintlify Bot commented Aug 25, 2026

Copy link
Copy Markdown

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

Project Status Preview Updated (UTC)
cometchat 🟢 Ready View Preview Aug 25, 2026, 2:24 PM

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

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.

1 participant