-
Notifications
You must be signed in to change notification settings - Fork 11
Feat/mention trigger #62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
6b58306
0def182
56bca98
e47c232
b798905
bfd36bc
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
// slash command | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is this necessary? It seems that these should be passed from the user. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It might not be necessary, but idk how to do it properly, so I just followed the example from https://matechat.gitcode.com/components/mention/demo.html There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
All contributors to MateChat React were interfered with by Vue's documentation in their judgment. We don't need to refer to the implementation and solutions of Vue. We just need to ensure that what Vue has, we also have. I think most of the time, the content of Vue documentation only tells us which components need to be implemented, and in fact, it has no other reference value. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Actually, idk how to implement it so that it’s passed from the user😂😂
|
||
export const commandItems = [ | ||
{ label: "Write a story", value: "write a story" }, | ||
{ label: "Translate text", value: "translate text" }, | ||
{ label: "Explain code", value: "explain code" }, | ||
]; | ||
|
||
// @-mention services | ||
export const serviceMentions = [ | ||
{ label: "MateChat", value: "matechat" }, | ||
{ label: "InsCode", value: "inscode" }, | ||
]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can this be wrapped into a separate component? Also, could you please provide an image or video to show the effect?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, I’ll give it a try. Here’s the current image showing the effect:

There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@moeyue23 I prefer the effects like GitHub comments:
Of course, if this difficult to achieve, you can also refer to https://x.ant.design/components/suggestion-cn. Although Ant Design is completely a opportunistic solution.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Besides, I think it might be better to use a lighter text color. :D
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
okay, I’ll try changing it! 🫠