diff --git a/services/web/frontend/extracted-translations.json b/services/web/frontend/extracted-translations.json
index 2ff71755ff..015cee2ee3 100644
--- a/services/web/frontend/extracted-translations.json
+++ b/services/web/frontend/extracted-translations.json
@@ -1249,6 +1249,8 @@
"mendeley_sync_description": "",
"mendeley_upgrade_prompt_content": "",
"mendeley_upgrade_prompt_title": "",
+ "mentions_and_replies_only": "",
+ "mentions_and_replies_only_description": "",
"menu": "",
"merge_cells": "",
"message_received": "",
diff --git a/services/web/frontend/js/features/ide-settings/components/editor-settings/project-notifications-setting.tsx b/services/web/frontend/js/features/ide-settings/components/editor-settings/project-notifications-setting.tsx
index df990dbde9..61b5bdc196 100644
--- a/services/web/frontend/js/features/ide-settings/components/editor-settings/project-notifications-setting.tsx
+++ b/services/web/frontend/js/features/ide-settings/components/editor-settings/project-notifications-setting.tsx
@@ -6,9 +6,11 @@ import {
} from '../../hooks/use-project-notification-preferences'
import BetaBadgeIcon from '@/shared/components/beta-badge-icon'
import LoadingSpinner from '@/shared/components/loading-spinner'
+import { useFeatureFlag } from '@/shared/context/split-test-context'
export default function ProjectNotificationsSetting() {
const { t } = useTranslation()
+ const commentMentionsEnabled = useFeatureFlag('comment-mentions')
const { notificationLevel, setNotificationLevel, isLoading } =
useProjectNotificationPreferences()
@@ -24,8 +26,12 @@ export default function ProjectNotificationsSetting() {
},
{
value: 'replies',
- label: t('replies_to_your_activity_only'),
- description: t('replies_to_your_activity_only_description'),
+ label: commentMentionsEnabled
+ ? t('mentions_and_replies_only')
+ : t('replies_to_your_activity_only'),
+ description: commentMentionsEnabled
+ ? t('mentions_and_replies_only_description')
+ : t('replies_to_your_activity_only_description'),
},
{
value: 'off',
diff --git a/services/web/locales/en.json b/services/web/locales/en.json
index 9c29567d76..c4c37ee2fb 100644
--- a/services/web/locales/en.json
+++ b/services/web/locales/en.json
@@ -1618,6 +1618,8 @@
"mendeley_sync_description": "With the Mendeley integration you can import your references from Mendeley into your __appName__ projects.",
"mendeley_upgrade_prompt_content": "Link your Mendeley account to search and add your references from Mendeley directly in your project—they’ll automatically be added to your .bib file. Or import them as a file into your __appName__ projects.",
"mendeley_upgrade_prompt_title": "Cite from Mendeley",
+ "mentions_and_replies_only": "Mentions and replies only",
+ "mentions_and_replies_only_description": "You’ll be notified about @mentions, replies and activity on your track changes.",
"menu": "Menu",
"merge": "Merge",
"merge_cells": "Merge cells",
diff --git a/services/web/test/frontend/features/ide-settings/settings/project-notifications-setting.test.tsx b/services/web/test/frontend/features/ide-settings/settings/project-notifications-setting.test.tsx
index ffbcb377a3..1907c43fae 100644
--- a/services/web/test/frontend/features/ide-settings/settings/project-notifications-setting.test.tsx
+++ b/services/web/test/frontend/features/ide-settings/settings/project-notifications-setting.test.tsx
@@ -100,6 +100,7 @@ function renderComponent(props: { permissionsLevel?: string } = {}) {
describe('', function () {
afterEach(function () {
fetchMock.removeRoutes().clearHistory()
+ window.metaAttributesCache.delete('ol-splitTestVariants')
})
it('shows loading indicator while preferences are loading', async function () {
@@ -168,6 +169,28 @@ describe('', function () {
).to.be.false
})
+ it('shows mentions copy when comment-mentions is enabled', async function () {
+ window.metaAttributesCache.set('ol-splitTestVariants', {
+ 'comment-mentions': 'enabled',
+ })
+ fetchMock.get(preferencesUrl, repliesOnlyPreferences)
+
+ renderComponent()
+
+ await waitFor(
+ () =>
+ expect(
+ screen.getByLabelText('Mentions and replies only', { exact: false })
+ ).to.exist
+ )
+ expect(
+ screen.getByText(
+ 'You’ll be notified about @mentions, replies and activity on your track changes.',
+ { exact: false }
+ )
+ ).to.exist
+ })
+
it('selects "Off" when all notifications are off', async function () {
fetchMock.get(preferencesUrl, allNotificationsOff)