Repository navigation
Enhance documentation for Mentions and add Report Message feature det… - #161
swayam-cometchat wants to merge 1 commit into
Conversation
| | **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}` | |
There was a problem hiding this comment.
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.
| | **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. |
There was a problem hiding this comment.
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.
| 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" /> |
There was a problem hiding this comment.
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. |
There was a problem hiding this comment.
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"` | |
There was a problem hiding this comment.
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 @.
| | **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}` | |
There was a problem hiding this comment.
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. | |
There was a problem hiding this comment.
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}` | |
There was a problem hiding this comment.
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.
|
Closing: main already has everything this PR adds — the Report Message section, |
…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>
…ails
Description
Related Issue(s)
Type of Change
Checklist
Additional Information
Screenshots (if applicable)