Skip to content

Commit 5edb178

Browse files
authored
Feature [v3] Mention (#137)
Mention * Add isMentionEnabled props to the <App /> and <SendbirdProvider /> * Add userMention into the config props of the <App /> andd <SendbirdProvider /> * <SendbirdProvider config={{ userMention: { maxMentionCount: 10, maxSuggestionCount: 15 } }} /> * maxMentionCount: A maximum count that you can mention in the message input * maxSuggestionCount: A maximum user count that the SuggestedMentionList suggests for user mention * Create SuggestedMentionList component under the Channel smart component * Create SuggestedUserMentionItem component * Create MentionUserLabel ui component * Add string set * MENTION_NAME__NO_NAME: '(No name)' * MENTION_COUNT__OVER_LIMIT: 'You can mention up to %d times per message.'
1 parent 527d9c5 commit 5edb178

File tree

45 files changed

+1598
-290
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+1598
-290
lines changed

.eslintignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ __test__/*/**.js
33
__test__/*/**.jsx
44
*.spec.js
55
*.mock.js
6+
src/ui/MessageInput/index.jsx
67

78
__snapshots__/**/*
89
*.spec.js.snap

.eslintrc.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ module.exports = {
3737
"tsx": "never",
3838
},
3939
],
40-
"react/forbid-prop-types": 0,
40+
"react/forbid-prop-types": 0
4141
},
4242
settings: {
4343
"import/resolver": {

exports.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ export default {
4444
'Channel/components/RemoveMessageModal': 'src/smart-components/Channel/components/RemoveMessageModal.tsx',
4545
'Channel/components/TypingIndicator': 'src/smart-components/Channel/components/TypingIndicator.tsx',
4646
'Channel/components/UnreadCount': 'src/smart-components/Channel/components/UnreadCount/index.tsx',
47+
'Channel/components/SuggestedMentionList': 'src/smart-components/Channel/components/SuggestedMentionList/index.tsx',
4748

4849
// OpenChannel
4950
OpenChannel: 'src/smart-components/OpenChannel/index.tsx',
@@ -108,6 +109,7 @@ export default {
108109
'ui/Label': 'src/ui/Label/index.jsx',
109110
'ui/LinkLabel': 'src/ui/LinkLabel/index.jsx',
110111
'ui/Loader': 'src/ui/Loader/index.jsx',
112+
'ui/MentionUserLabel': 'src/ui/MentionUserLabel/index.tsx',
111113
'ui/MessageContent': 'src/ui/MessageContent/index.tsx',
112114
'ui/MessageInput': 'src/ui/MessageInput/index.jsx',
113115
'ui/MessageItemMenu': 'src/ui/MessageItemMenu/index.tsx',

package-lock.json

Lines changed: 56 additions & 34 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
"clean-release": "rm -rf ./release; rm -rf ./dist",
2424
"build": "npm run clean-release; rollup -c; npm run cp-css",
2525
"start": "rollup -c -w",
26+
"reset": "rm -rf ./node_modules; npm install;",
2627
"prepublishOnly": "npm run build",
2728
"predeploy": "cd example && npm install && npm run build",
2829
"storybook": "start-storybook -p 6006",
@@ -54,7 +55,7 @@
5455
"css-vars-ponyfill": "^2.3.2",
5556
"date-fns": "^2.16.1",
5657
"prop-types": "^15.7.2",
57-
"sendbird": "^3.1.4"
58+
"sendbird": "^3.1.10"
5859
},
5960
"bugs": {
6061
"url": "https://community.sendbird.com"

0 commit comments

Comments
 (0)