Skip to content

Enhance documentation for Mentions and add Report Message feature det… - #161

Closed
swayam-cometchat wants to merge 1 commit into
mainfrom
feature/react-native-flag-and-channel
Closed

swayam-cometchat wants to merge 1 commit into
mainfrom
feature/react-native-flag-and-channel

Conversation

@swayam-cometchat

Copy link
Copy Markdown
Contributor

…ails

Description

Related Issue(s)

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

Screenshots (if applicable)

| **hideGroupActionMessages** | used to toggle visibility of hide group action info option in MessageList | `hideGroupActionMessages={true}` |
| **hideTimestamp** | used to toggle visibility of hide timestamp in MessageList | `hideTimestamp={true}` |
| **hideFlagMessageOption** | Hides the "Report Message" option from message actions menu. | `hideFlagMessageOption={true}` |
| **hideFlagMessageOption** | Hides the remark text area in the flag message dialog. | `hideFlagRemarkField={true}` |

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.

Bug: duplicate prop name. This row is named hideFlagMessageOption again, but it describes the remark field and its example uses hideFlagRemarkField, which is the real prop (CometChatMessageList.tsx:538). A reader who copies the bold name will hide the whole Report option instead of just the remark field.

Suggested change
| **hideFlagMessageOption** | Hides the remark text area in the flag message dialog. | `hideFlagRemarkField={true}` |
| **hideFlagRemarkField** | Hides the remark text area in the flag message dialog. | `hideFlagRemarkField={true}` |


Mentions is a robust feature provided by CometChat that enhances the interactivity and clarity of group or 1-1 chats by allowing users to directly address or refer to specific individuals in a conversation.

Mentions is a robust feature provided by CometChat that enhances the interactivity and clarity of group or 1-1 chats by allowing users to directly address or refer to specific individuals in a conversation. The feature also supports group mentions like @all, enabling users to quickly notify all members in a group chat simultaneously.

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.

MDX: the blank line before <Frame> was removed. Without it, MDX treats <Frame> as a lazy continuation of the paragraph and nests a block <div> inside a <p>. That is invalid HTML and can cause hydration warnings and layout glitches. Every other section on this page keeps the blank line.

Suggested change
Mentions is a robust feature provided by CometChat that enhances the interactivity and clarity of group or 1-1 chats by allowing users to directly address or refer to specific individuals in a conversation. The feature also supports group mentions like @all, enabling users to quickly notify all members in a group chat simultaneously.
Mentions is a robust feature provided by CometChat that enhances the interactivity and clarity of group or 1-1 chats by allowing users to directly address or refer to specific individuals in a conversation. The feature also supports group mentions like @all, enabling users to quickly notify all members in a group chat simultaneously.

The Report Message feature allows users to report inappropriate or harmful messages within the chat. Users can choose from predefined reasons and provide additional remarks for detailed context. This feature helps maintain a safe and respectful chat environment.

<Frame>
<img src="/images/android-flag-message.png" />

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.

Wrong-platform screenshot. /images/android-flag-message.png is the Android UI Kit screenshot (copied from ui-kit/android/core-features.mdx:143). React Native renders CometChatReportDialog, which looks different. Please swap in an RN capture.


## Report Message

The Report Message feature allows users to report inappropriate or harmful messages within the chat. Users can choose from predefined reasons and provide additional remarks for detailed context. This feature helps maintain a safe and respectful chat environment.

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.

Missing visibility conditions. The Report option only appears on other users' messages: MessageDataSource.tsx:1138 gates it on !isSentByMe. The list also force-hides it for agentic (AI) users. Without a note, developers testing on their own messages will think the feature is missing.

| **hideAuxiliaryButtons** | toggle visibility of Auxiliary button option. | `hideAuxiliaryButtons={true}` |
| **disableMentions** | Sets whether mentions in text should be disabled. Processes the text formatters If there are text formatters available and the disableMentions flag is set to true, it removes any formatters that are instances of CometChatMentionsFormatter. | `disableMentions={true}` |
| **disableMentionAll** | Controls whether group mentions like @all appear in suggestions. | `disableMentionAll={true}` |
| **mentionAllLabel** | Allows setting a custom alias label for group mentions (@channel, @everyone, etc.). | `mentionAllLabel="all"` |

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.

Example uses the default value. "all" is already the default (CometChatMessageComposer.tsx:518), so this snippet shows no customization. Use a label like "channel", which also makes clear the label goes in without a leading @.

Suggested change
| **mentionAllLabel** | Allows setting a custom alias label for group mentions (@channel, @everyone, etc.). | `mentionAllLabel="all"` |
| **mentionAllLabel** | Allows setting a custom alias label for group mentions (@channel, @everyone, etc.). Defaults to `all`. | `mentionAllLabel="channel"` |

| **hideSendButton** | toggle visibility of send button option. | `hideSendButton={true}` |
| **hideAuxiliaryButtons** | toggle visibility of Auxiliary button option. | `hideAuxiliaryButtons={true}` |
| **disableMentions** | Sets whether mentions in text should be disabled. Processes the text formatters If there are text formatters available and the disableMentions flag is set to true, it removes any formatters that are instances of CometChatMentionsFormatter. | `disableMentions={true}` |
| **disableMentionAll** | Controls whether group mentions like @all appear in suggestions. | `disableMentionAll={true}` |

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.

Missing caveats. The @ALL suggestion only appears in group conversations: buildGroupMentionItem returns null without a group. It also has no effect when disableMentions={true}. Consider noting both here.


| Components | Functionality |
| ----------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [Message List](/ui-kit/react-native/message-list) | [Message List](/ui-kit/react-native/message-list) provides the "Report Message" option in the message actions menu, allowing users to initiate the reporting process for inappropriate messages. |

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.

Nit: this table uses 'Message List' (with a space), while every other table on this page uses MessageList. The column padding also doesn't line up with the header.

| **hideMessageInfoOption** | used to toggle visibility of hide message info option in MessageList | `hideMessageInfoOption={true}` |
| **hideGroupActionMessages** | used to toggle visibility of hide group action info option in MessageList | `hideGroupActionMessages={true}` |
| **hideTimestamp** | used to toggle visibility of hide timestamp in MessageList | `hideTimestamp={true}` |
| **hideFlagMessageOption** | Hides the "Report Message" option from message actions menu. | `hideFlagMessageOption={true}` |

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.

Nit: the prop is hideFlag* and the source calls the option "Flag Message", but the docs call it "Report Message". Consider saying "Report (flag) Message" once, so readers searching for either name land here.

@suraj-chauhan-cometchat

Copy link
Copy Markdown
Contributor

Closing: main already has everything this PR adds — the Report Message section, hideFlagMessageOption / hideFlagRemarkField (with the correct names), and disableMentionAll / mentionAllLabel. The review points that still apply to main (own-message and AI-agent visibility for Report, @ALL being group-only, the @ALL sentence under Mentions) are being fixed in #524. Thanks @swayam-cometchat!

suraj-chauhan-cometchat added a commit that referenced this pull request Oct 16, 2026
…39154

Carries over the review points from the closed #161 that
still applied to main, checked against UI Kit 5.5.2 (master-v5):

- core-features: Report option shows only on other users' messages
  (MessageDataSource !isSentByMe) and is hidden for AI agents.
- core-features: mention @ALL under Mentions (group chats only).
- message-composer: @ALL is group-only, label has no leading @,
  default "all", no effect with disableMentions.
- TODO marker: Report screenshot is the Android one, needs an RN capture.

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

This branch was successfully deployed

1 active deployment
staging — 03a12cf3 Deployed Dec 2, 2025 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.

2 participants