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:
Henit Chobisa 2023-11-06 20:42:24 +05:30 committed by GitHub
parent 13389d1b2b
commit 6eb0bf4785
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 93 additions and 20 deletions

View file

@ -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>