From 612503edb5fbc539659d2aeafd3d264108875825 Mon Sep 17 00:00:00 2001 From: Alf Eaton Date: Tue, 26 Aug 2025 15:47:18 +0100 Subject: [PATCH] Remove visual paste and history restore feedback surveys (#27891) Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> GitOrigin-RevId: ee0a215dfc5ed6aa589b8012d2e930d9c3b0824f --- .../web/frontend/extracted-translations.json | 2 - .../change-list/all-history-list.tsx | 69 ------------------- .../paste-html/pasted-content-menu.tsx | 24 +------ .../stylesheets/pages/editor/history.scss | 4 -- services/web/locales/da.json | 2 - services/web/locales/en.json | 2 - services/web/locales/zh-CN.json | 2 - 7 files changed, 1 insertion(+), 104 deletions(-) diff --git a/services/web/frontend/extracted-translations.json b/services/web/frontend/extracted-translations.json index c1ef7b5bf5..6674b7d332 100644 --- a/services/web/frontend/extracted-translations.json +++ b/services/web/frontend/extracted-translations.json @@ -758,8 +758,6 @@ "history_label_project_current_state": "", "history_label_this_version": "", "history_new_label_name": "", - "history_restore_promo_content": "", - "history_restore_promo_title": "", "history_resync": "", "history_view_a11y_description": "", "history_view_all": "", diff --git a/services/web/frontend/js/features/history/components/change-list/all-history-list.tsx b/services/web/frontend/js/features/history/components/change-list/all-history-list.tsx index 0e38f79537..bfe5d4483a 100644 --- a/services/web/frontend/js/features/history/components/change-list/all-history-list.tsx +++ b/services/web/frontend/js/features/history/components/change-list/all-history-list.tsx @@ -14,7 +14,6 @@ import Close from '@/shared/components/close' import { Trans, useTranslation } from 'react-i18next' import MaterialIcon from '@/shared/components/material-icon' import useTutorial from '@/shared/hooks/promotions/use-tutorial' -import { useFeatureFlag } from '@/shared/context/split-test-context' function AllHistoryList() { const { id: currentUserId } = useUserContext() @@ -102,18 +101,6 @@ function AllHistoryList() { name: 'react-history-buttons-tutorial', }) - const { - showPopup: showRestorePromo, - tryShowingPopup: tryShowingRestorePromo, - hideUntilReload: hideRestorePromoUntilReload, - completeTutorial: completeRestorePromo, - } = useTutorial('history-restore-promo', { - name: 'history-restore-promo', - }) - const inFileRestoreSplitTest = useFeatureFlag('revert-file') - const inProjectRestoreSplitTest = useFeatureFlag('revert-project') - - const hasVisibleUpdates = visibleUpdates.length > 0 const isMoreThanOneVersion = visibleUpdates.length > 1 const [layoutSettled, setLayoutSettled] = useState(false) @@ -127,9 +114,6 @@ function AllHistoryList() { const hasCompletedHistoryTutorial = inactiveTutorials.includes( 'react-history-buttons-tutorial' ) - const hasCompletedRestorePromotion = inactiveTutorials.includes( - 'history-restore-promo' - ) // wait for the layout to settle before showing popover, to avoid a flash/ instant move if (!layoutSettled) { @@ -141,19 +125,8 @@ function AllHistoryList() { !isPaywallAndNonComparable ) { tryShowingHistoryTutorial() - } else if ( - !hasCompletedRestorePromotion && - inFileRestoreSplitTest && - inProjectRestoreSplitTest && - hasVisibleUpdates - ) { - tryShowingRestorePromo() } }, [ - hasVisibleUpdates, - inFileRestoreSplitTest, - inProjectRestoreSplitTest, - tryShowingRestorePromo, inactiveTutorials, isMoreThanOneVersion, isPaywallAndNonComparable, @@ -169,7 +142,6 @@ function AllHistoryList() { // meaning the tutorial will show on page reload/ re-navigation const hidePopover = () => { hideHistoryTutorialUntilReload() - hideRestorePromoUntilReload() } if (showHistoryTutorial) { @@ -224,47 +196,6 @@ function AllHistoryList() { ) - } else if (showRestorePromo) { - popover = ( - - - {t('history_restore_promo_title')} - - completeRestorePromo({ - event: 'promo-click', - action: 'complete', - }) - } - /> - - } - className="dark-themed history-popover" - > - , - ]} - /> - - - ) } // give the components time to position before showing popover so we don't get an instant position change diff --git a/services/web/frontend/js/features/source-editor/components/paste-html/pasted-content-menu.tsx b/services/web/frontend/js/features/source-editor/components/paste-html/pasted-content-menu.tsx index 4a97b833d0..a14c2bb46e 100644 --- a/services/web/frontend/js/features/source-editor/components/paste-html/pasted-content-menu.tsx +++ b/services/web/frontend/js/features/source-editor/components/paste-html/pasted-content-menu.tsx @@ -11,7 +11,7 @@ import { useTranslation } from 'react-i18next' import { EditorView } from '@codemirror/view' import { PastedContent } from '../../extensions/visual/pasted-content' import useEventListener from '../../../../shared/hooks/use-event-listener' -import { FeedbackBadge } from '@/shared/components/feedback-badge' + import { sendMB } from '@/infrastructure/event-tracking' import MaterialIcon from '@/shared/components/material-icon' import OLOverlay from '@/shared/components/ol/ol-overlay' @@ -163,28 +163,6 @@ export const PastedContentMenu: FC<{ {isMac ? '⇧⌘V' : 'Ctrl+Shift+V'} - - { - window.open( - 'https://docs.google.com/forms/d/e/1FAIpQLSc7WcHrwz9fnCkUP5hXyvkG3LkSYZiR3lVJWZ0o6uqNQYrV7Q/viewform', - '_blank' - ) - sendMB('pasted-content-menu-click', { - action: 'give-feedback', - }) - setMenuOpen(false) - }} - > - - - {t('give_feedback')} - - diff --git a/services/web/frontend/stylesheets/pages/editor/history.scss b/services/web/frontend/stylesheets/pages/editor/history.scss index db59639cd1..ef087b79ae 100644 --- a/services/web/frontend/stylesheets/pages/editor/history.scss +++ b/services/web/frontend/stylesheets/pages/editor/history.scss @@ -519,10 +519,6 @@ history-root { vertical-align: top; } -.history-restore-promo-icon { - vertical-align: middle; -} - .history-file-tree { display: flex !important; // To work around jQuery layout's inline styles flex-direction: column; diff --git a/services/web/locales/da.json b/services/web/locales/da.json index 9e90a5bce2..1ddbb06cc8 100644 --- a/services/web/locales/da.json +++ b/services/web/locales/da.json @@ -781,8 +781,6 @@ "history_label_project_current_state": "Nuværende indhold", "history_label_this_version": "Sæt mærkat på denne version", "history_new_label_name": "Navn på ny mærkat", - "history_restore_promo_content": "Nu kan du gendanne en enkel fil eller hele dit projekt til en tidligere version, inklusiv kommentarer og fulgte ændringer. Klik Gendan denne version for at gendanne den valgte fil, eller brug <0> menuen i et historik element til at gendanne det fulde projekt.", - "history_restore_promo_title": "Brug for at skrue tiden tilbage?", "history_resync": "Synkronisering af historik", "history_view_a11y_description": "Vis den komplette projekthistorie, eller kun mærkede versioner.", "history_view_all": "Komplet historie", diff --git a/services/web/locales/en.json b/services/web/locales/en.json index a6af451db6..54e9e0c6a3 100644 --- a/services/web/locales/en.json +++ b/services/web/locales/en.json @@ -980,8 +980,6 @@ "history_label_project_current_state": "Current state", "history_label_this_version": "Label this version", "history_new_label_name": "New label name", - "history_restore_promo_content": "Now you can restore a single file or your whole project to a previous version, including comments and tracked changes. Click Restore this version to restore the selected file or use the <0> menu in the history entry to restore the full project.", - "history_restore_promo_title": "Need to turn back time?", "history_resync": "History resync", "history_view_a11y_description": "Show all of the project history or only labelled versions.", "history_view_all": "All history", diff --git a/services/web/locales/zh-CN.json b/services/web/locales/zh-CN.json index 6c4249aeff..03b8237639 100644 --- a/services/web/locales/zh-CN.json +++ b/services/web/locales/zh-CN.json @@ -929,8 +929,6 @@ "history_label_project_current_state": "当前状态", "history_label_this_version": "标记此版本", "history_new_label_name": "新标记名称", - "history_restore_promo_content": "现在,您可以将单个文件或整个项目恢复到以前的版本,包括注释和跟踪的更改。单击“恢复此版本”可恢复所选文件,或使用历史记录条目中的 <0>菜单 可恢复整个项目。", - "history_restore_promo_title": "需要回归历史版本吗?", "history_resync": "重新同步历史记录", "history_view_a11y_description": "显示所有项目历史记录或仅显示带标签的版本。", "history_view_all": "所有历史",