From cb3fbaba845a89eccd1288b15a1de69809562f4f Mon Sep 17 00:00:00 2001 From: Copilot <198982749+Copilot@users.noreply.github.com> Date: Fri, 31 Jul 2026 10:59:11 +0200 Subject: [PATCH] [web] update notification settings copy for mentions (#35953) GitOrigin-RevId: cc86f0931f6740f1d509118ee558719bc3559816 --- .../web/frontend/extracted-translations.json | 2 ++ .../project-notifications-setting.tsx | 10 ++++++-- services/web/locales/en.json | 2 ++ .../project-notifications-setting.test.tsx | 23 +++++++++++++++++++ 4 files changed, 35 insertions(+), 2 deletions(-) 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)