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
This commit is contained in:
Alf Eaton
2025-08-26 15:47:18 +01:00
committed by Copybot
parent 3922e41626
commit 612503edb5
7 changed files with 1 additions and 104 deletions
@@ -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": "",
@@ -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() {
</OLPopover>
</OLOverlay>
)
} else if (showRestorePromo) {
popover = (
<OLOverlay
placement="left-start"
show={showRestorePromo}
rootClose
onHide={hidePopover}
// using scrollerRef to position the popover in the middle of the viewport
target={scrollerRef.current}
>
<OLPopover
id="popover-history-restore-promo"
title={
<span>
{t('history_restore_promo_title')}
<Close
variant="dark"
onDismiss={() =>
completeRestorePromo({
event: 'promo-click',
action: 'complete',
})
}
/>
</span>
}
className="dark-themed history-popover"
>
<Trans
i18nKey="history_restore_promo_content"
components={[
// eslint-disable-next-line react/jsx-key
<MaterialIcon
type="more_vert"
className="history-restore-promo-icon"
/>,
]}
/>
</OLPopover>
</OLOverlay>
)
}
// give the components time to position before showing popover so we don't get an instant position change
@@ -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'}
</span>
</MenuItem>
<MenuItem
style={{ borderTop: '1px solid #eee' }}
onClick={() => {
window.open(
'https://docs.google.com/forms/d/e/1FAIpQLSc7WcHrwz9fnCkUP5hXyvkG3LkSYZiR3lVJWZ0o6uqNQYrV7Q/viewform',
'_blank'
)
sendMB('pasted-content-menu-click', {
action: 'give-feedback',
})
setMenuOpen(false)
}}
>
<FeedbackBadge
id="paste-html-feedback"
url="https://docs.google.com/forms/d/e/1FAIpQLSc7WcHrwz9fnCkUP5hXyvkG3LkSYZiR3lVJWZ0o6uqNQYrV7Q/viewform"
/>
<span className="ol-cm-pasted-content-menu-item-label">
{t('give_feedback')}
</span>
</MenuItem>
</div>
</OLPopover>
</OLOverlay>
@@ -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;
-2
View File
@@ -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></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",
-2
View File
@@ -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></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",
-2
View File
@@ -929,8 +929,6 @@
"history_label_project_current_state": "当前状态",
"history_label_this_version": "标记此版本",
"history_new_label_name": "新标记名称",
"history_restore_promo_content": "现在,您可以将单个文件或整个项目恢复到以前的版本,包括注释和跟踪的更改。单击“恢复此版本”可恢复所选文件,或使用历史记录条目中的 <0>菜单</0> 可恢复整个项目。",
"history_restore_promo_title": "需要回归历史版本吗?",
"history_resync": "重新同步历史记录",
"history_view_a11y_description": "显示所有项目历史记录或仅显示带标签的版本。",
"history_view_all": "所有历史",