mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-15 06:33:55 +01:00
[web] update comment placeholder for mentions (#36167)
GitOrigin-RevId: c702e00004d8dfcf243425503459f558973a657b
This commit is contained in:
@@ -344,6 +344,7 @@
|
||||
"comment_only": "",
|
||||
"comment_only_upgrade_for_track_changes": "",
|
||||
"comment_only_upgrade_to_enable_track_changes": "",
|
||||
"comment_or_mention_someone": "",
|
||||
"common": "",
|
||||
"commons": "",
|
||||
"commons_ai": "",
|
||||
|
||||
+7
-1
@@ -16,6 +16,7 @@ import {
|
||||
MentionsInput,
|
||||
MentionsInputHandle,
|
||||
} from '@/shared/components/mentions-input'
|
||||
import { useFeatureFlag } from '@/shared/context/split-test-context'
|
||||
|
||||
export const ReviewPanelAddComment = memo<{
|
||||
docId: string
|
||||
@@ -25,6 +26,7 @@ export const ReviewPanelAddComment = memo<{
|
||||
top: number | undefined
|
||||
}>(function ReviewPanelAddComment({ from, to, threadId, top, docId }) {
|
||||
const { t } = useTranslation()
|
||||
const commentMentionsEnabled = useFeatureFlag('comment-mentions')
|
||||
const view = useCodeMirrorViewContext()
|
||||
const state = useCodeMirrorStateContext()
|
||||
const { addComment } = useThreadsActionsContext()
|
||||
@@ -154,7 +156,11 @@ export const ReviewPanelAddComment = memo<{
|
||||
className="review-panel-add-comment-editor"
|
||||
onChange={setContent}
|
||||
onSubmit={submitForm}
|
||||
placeholder={t('add_your_comment_here')}
|
||||
placeholder={
|
||||
commentMentionsEnabled
|
||||
? t('comment_or_mention_someone')
|
||||
: t('add_your_comment_here')
|
||||
}
|
||||
disabled={submitting}
|
||||
/>
|
||||
<div className="review-panel-add-comment-buttons">
|
||||
|
||||
@@ -442,6 +442,7 @@
|
||||
"comment_only": "Comment only",
|
||||
"comment_only_upgrade_for_track_changes": "Comment only. Upgrade for track changes.",
|
||||
"comment_only_upgrade_to_enable_track_changes": "Comment only. <0>Upgrade</0> to enable track changes.",
|
||||
"comment_or_mention_someone": "Comment or @ mention someone",
|
||||
"common": "Common",
|
||||
"commons": "Commons",
|
||||
"commons_ai": "Commons AI",
|
||||
|
||||
Reference in New Issue
Block a user