Fix/mentions spaces fix (#2667)
* feat: add mentions store to the space project * fix: added mentions highlights in read only comment cards * feat: added mention highlights in richtexteditor in space app
This commit is contained in:
parent
13389d1b2b
commit
6eb0bf4785
6 changed files with 93 additions and 20 deletions
|
|
@ -15,6 +15,7 @@ import { timeAgo } from "helpers/date-time.helper";
|
|||
import { Comment } from "types/issue";
|
||||
// services
|
||||
import fileService from "services/file.service";
|
||||
import useEditorSuggestions from "hooks/use-editor-suggestions";
|
||||
|
||||
type Props = {
|
||||
workspaceSlug: string;
|
||||
|
|
@ -28,6 +29,8 @@ export const CommentCard: React.FC<Props> = observer((props) => {
|
|||
// states
|
||||
const [isEditing, setIsEditing] = useState(false);
|
||||
|
||||
const mentionsConfig = useEditorSuggestions();
|
||||
|
||||
const editorRef = React.useRef<any>(null);
|
||||
|
||||
const showEditorRef = React.useRef<any>(null);
|
||||
|
|
@ -135,7 +138,7 @@ export const CommentCard: React.FC<Props> = observer((props) => {
|
|||
ref={showEditorRef}
|
||||
value={comment.comment_html}
|
||||
customClassName="text-xs border border-custom-border-200 bg-custom-background-100"
|
||||
mentionHighlights={userStore.currentUser?.id ? [userStore.currentUser?.id] : []}
|
||||
mentionHighlights={mentionsConfig.mentionHighlights}
|
||||
/>
|
||||
<CommentReactions commentId={comment.id} projectId={comment.project} />
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue