From 33e0a5e1c23529befc30847e80dabc9e47dba5d3 Mon Sep 17 00:00:00 2001 From: Mathias Jakobsen Date: Thu, 23 Jul 2026 16:00:39 +0100 Subject: [PATCH] [web] Remove toasts and NEW indicators from conversions (#35591) * [web] Remove toasts for document conversions * [web] Remove NEW indicators from document conversions GitOrigin-RevId: 608b344d9be596ecb3cf4573ab1152f78d7d9d43 --- .../web/frontend/extracted-translations.json | 6 -- .../ide-react/components/global-toasts.tsx | 2 - .../project-converted-from-document-modal.tsx | 4 - .../toolbar/export-document-toasts.tsx | 77 ------------------- .../ide-react/hooks/use-convert-project.ts | 2 - .../components/new-project-button.tsx | 3 - .../import-document-feedback-toast.tsx | 69 ----------------- ...me-message-create-new-project-dropdown.tsx | 3 - services/web/locales/da.json | 1 - services/web/locales/de.json | 1 - services/web/locales/en.json | 6 -- 11 files changed, 174 deletions(-) delete mode 100644 services/web/frontend/js/features/project-list/components/new-project-button/import-document-feedback-toast.tsx diff --git a/services/web/frontend/extracted-translations.json b/services/web/frontend/extracted-translations.json index cfc4747930..ff9ce990a1 100644 --- a/services/web/frontend/extracted-translations.json +++ b/services/web/frontend/extracted-translations.json @@ -510,8 +510,6 @@ "document_updated_externally": "", "document_updated_externally_detail": "", "documentation": "", - "docx_export_feedback_message": "", - "docx_import_feedback_message": "", "doesnt_match": "", "doing_this_allow_log_in_through_institution": "", "doing_this_allow_log_in_through_institution_2": "", @@ -771,7 +769,6 @@ "generate_from_text_or_image": "", "generate_token": "", "generating": "", - "generic_export_feedback_message": "", "generic_if_problem_continues_contact_us": "", "generic_linked_file_compile_error": "", "generic_something_went_wrong": "", @@ -942,7 +939,6 @@ "how_to_insert_images": "", "how_we_use_your_data": "", "how_we_use_your_data_explanation": "", - "html_export_feedback_message": "", "i_want_to_add_a_po_number": "", "i_want_to_stay": "", "id": "", @@ -1223,8 +1219,6 @@ "manager": "", "managers_management": "", "managing_your_subscription": "", - "markdown_export_feedback_message": "", - "markdown_import_feedback_message": "", "marked_as_resolved": "", "math": "", "math_display": "", diff --git a/services/web/frontend/js/features/ide-react/components/global-toasts.tsx b/services/web/frontend/js/features/ide-react/components/global-toasts.tsx index 8e799d2a18..e767b1fe1f 100644 --- a/services/web/frontend/js/features/ide-react/components/global-toasts.tsx +++ b/services/web/frontend/js/features/ide-react/components/global-toasts.tsx @@ -6,7 +6,6 @@ import { debugConsole } from '@/utils/debugging' import importOverleafModules from '../../../../macros/import-overleaf-module.macro' import { OLToastContainer } from '@/shared/components/ol/ol-toast-container' import clipboardToastGenerators from '@/features/source-editor/components/clipboard-toasts' -import importDocumentFeedbackToastGenerators from '@/features/project-list/components/new-project-button/import-document-feedback-toast' import exportDocumentToastGenerators from '@/features/ide-react/components/toolbar/export-document-toasts' const moduleGeneratorsImport = importOverleafModules('toastGenerators') as { @@ -29,7 +28,6 @@ type GlobalToastGenerator = ( const GENERATOR_LIST: GlobalToastGeneratorEntry[] = [ ...moduleGenerators.flat(), ...clipboardToastGenerators, - ...importDocumentFeedbackToastGenerators, ...exportDocumentToastGenerators, ] const GENERATOR_MAP: Map = new Map( diff --git a/services/web/frontend/js/features/ide-react/components/modals/project-converted-from-document-modal.tsx b/services/web/frontend/js/features/ide-react/components/modals/project-converted-from-document-modal.tsx index b013094b0f..a366566721 100644 --- a/services/web/frontend/js/features/ide-react/components/modals/project-converted-from-document-modal.tsx +++ b/services/web/frontend/js/features/ide-react/components/modals/project-converted-from-document-modal.tsx @@ -8,7 +8,6 @@ import { } from '@/shared/components/ol/ol-modal' import OLButton from '@/shared/components/ol/ol-button' import { useEffect, useState } from 'react' -import { showImportDocumentFeedbackToast } from '@/features/project-list/components/new-project-button/import-document-feedback-toast' function ProjectConvertedFromDocumentModal() { const [convertedFrom, setConvertedFrom] = useState(null) @@ -34,9 +33,6 @@ function ProjectConvertedFromDocumentModal() { { setConvertedFrom(null) - if (convertedFrom === 'docx' || convertedFrom === 'markdown') { - showImportDocumentFeedbackToast(convertedFrom) - } }} /> )} diff --git a/services/web/frontend/js/features/ide-react/components/toolbar/export-document-toasts.tsx b/services/web/frontend/js/features/ide-react/components/toolbar/export-document-toasts.tsx index 05d9ab1ccd..5e14e3d83f 100644 --- a/services/web/frontend/js/features/ide-react/components/toolbar/export-document-toasts.tsx +++ b/services/web/frontend/js/features/ide-react/components/toolbar/export-document-toasts.tsx @@ -41,63 +41,6 @@ const ExportDocumentErrorToast = ({ data }: { data?: any }) => { ) } -const ExportDocumentSuccessToast = ({ data }: { data?: any }) => { - const type = data?.type - if (type === 'docx') { - return ( - , - ]} - /> - ) - } else if (type === 'markdown') { - return ( - , - ]} - /> - ) - } else if (type === 'html') { - return ( - , - ]} - /> - ) - } else { - return ( - , - ]} - /> - ) - } -} - const generators: GlobalToastGeneratorEntry[] = [ { key: 'export-document:error', @@ -119,16 +62,6 @@ const generators: GlobalToastGeneratorEntry[] = [ isDismissible: true, }), }, - { - key: 'export-document:success', - generator: (data: any) => ({ - content: , - type: 'success', - autoHide: true, - delay: 45000, - isDismissible: true, - }), - }, ] export default generators @@ -173,13 +106,3 @@ export const hidePreparingExportToast = (handle: string) => { }) ) } - -export const showExportDocumentSuccess = ( - type: 'docx' | 'markdown' | 'html' -) => { - window.dispatchEvent( - new CustomEvent('ide:show-toast', { - detail: { key: 'export-document:success', type }, - }) - ) -} diff --git a/services/web/frontend/js/features/ide-react/hooks/use-convert-project.ts b/services/web/frontend/js/features/ide-react/hooks/use-convert-project.ts index 47bd377ed7..8af1fabd99 100644 --- a/services/web/frontend/js/features/ide-react/hooks/use-convert-project.ts +++ b/services/web/frontend/js/features/ide-react/hooks/use-convert-project.ts @@ -7,7 +7,6 @@ import { hideExportDocumentError, hidePreparingExportToast, showExportDocumentError, - showExportDocumentSuccess, showPreparingExportToast, } from '../components/toolbar/export-document-toasts' import { RootDocInfo } from '@/shared/hooks/use-root-doc' @@ -45,7 +44,6 @@ export default function useConvertProject( if (downloadUrl) { const url = new URL(downloadUrl, window.location.origin) location.assign(url.toString()) - showExportDocumentSuccess(type) } else { showExportDocumentError() } diff --git a/services/web/frontend/js/features/project-list/components/new-project-button.tsx b/services/web/frontend/js/features/project-list/components/new-project-button.tsx index 56803027df..cc05886cd3 100644 --- a/services/web/frontend/js/features/project-list/components/new-project-button.tsx +++ b/services/web/frontend/js/features/project-list/components/new-project-button.tsx @@ -21,7 +21,6 @@ import type { OLDropdownProps } from '@/shared/components/types/dropdown-menu-pr import { useSendProjectListMB } from '@/features/project-list/components/project-list-events' import type { PortalTemplate } from '../../../../../types/portal-template' import { useFeatureFlag } from '@/shared/context/split-test-context' -import MaterialIcon from '@/shared/components/material-icon' import { useProjectListContext } from '@/features/project-list/context/project-list-context' import { isSplitTestEnabled } from '@/utils/splitTestUtils' @@ -237,7 +236,6 @@ function NewProjectButton({ dropdownMenuEvent: 'import-docx', }) } - trailingIcon={} > {t('import_word_document')} @@ -252,7 +250,6 @@ function NewProjectButton({ dropdownMenuEvent: 'import-markdown', }) } - trailingIcon={} > {t('import_markdown_file')} diff --git a/services/web/frontend/js/features/project-list/components/new-project-button/import-document-feedback-toast.tsx b/services/web/frontend/js/features/project-list/components/new-project-button/import-document-feedback-toast.tsx deleted file mode 100644 index 3c906cfb57..0000000000 --- a/services/web/frontend/js/features/project-list/components/new-project-button/import-document-feedback-toast.tsx +++ /dev/null @@ -1,69 +0,0 @@ -import { GlobalToastGeneratorEntry } from '@/features/ide-react/components/global-toasts' -import { Trans } from 'react-i18next' - -const DocxImportFeedbackToast = () => ( -
- , - ]} - /> -
-) - -const MarkdownImportFeedbackToast = () => ( -
- , - ]} - /> -
-) - -const generators: GlobalToastGeneratorEntry[] = [ - { - key: 'import:docx-feedback', - generator: () => ({ - content: , - type: 'info', - autoHide: true, - delay: 45000, - isDismissible: true, - }), - }, - { - key: 'import:markdown-feedback', - generator: () => ({ - content: , - type: 'info', - autoHide: true, - delay: 45000, - isDismissible: true, - }), - }, -] - -export default generators - -export const showImportDocumentFeedbackToast = (type: 'docx' | 'markdown') => { - const key = - type === 'markdown' ? 'import:markdown-feedback' : 'import:docx-feedback' - window.dispatchEvent( - new CustomEvent('ide:show-toast', { - detail: { key }, - }) - ) -} diff --git a/services/web/frontend/js/features/project-list/components/welcome-message-new/welcome-message-create-new-project-dropdown.tsx b/services/web/frontend/js/features/project-list/components/welcome-message-new/welcome-message-create-new-project-dropdown.tsx index 8c206680bb..40640c52c3 100644 --- a/services/web/frontend/js/features/project-list/components/welcome-message-new/welcome-message-create-new-project-dropdown.tsx +++ b/services/web/frontend/js/features/project-list/components/welcome-message-new/welcome-message-create-new-project-dropdown.tsx @@ -13,7 +13,6 @@ import { } from '@/shared/components/ol/ol-dropdown-menu' import createNewProjectImage from '../../images/create-a-new-project.svg' import { useFeatureFlag } from '@/shared/context/split-test-context' -import MaterialIcon from '@/shared/components/material-icon' const CustomDropdownToggle = forwardRef< HTMLButtonElement, @@ -150,7 +149,6 @@ function WelcomeMessageCreateNewProjectDropdown({ handleDropdownItemClick(e, 'import_docx', 'import-docx') } tabIndex={-1} - trailingIcon={} > {t('import_word_document')} @@ -164,7 +162,6 @@ function WelcomeMessageCreateNewProjectDropdown({ handleDropdownItemClick(e, 'import_markdown', 'import-markdown') } tabIndex={-1} - trailingIcon={} > {t('import_markdown_file')} diff --git a/services/web/locales/da.json b/services/web/locales/da.json index 2ef068a04c..d0cfff2ad4 100644 --- a/services/web/locales/da.json +++ b/services/web/locales/da.json @@ -425,7 +425,6 @@ "document_updated_externally": "Dokument opdateret eksternt", "document_updated_externally_detail": "Dette dokument er blevet opdateret eksternt. Ændringer du måtte have lavet kan være blevet overskrevet. For at se tidligere versioner, kig venligst i historikken.", "documentation": "Dokumentation", - "docx_import_feedback_message": "Import af Word-dokumenter er en ny funktion. <0>Fortæl os hvad du synes", "does_not_contain_or_significantly_match_your_email": "indeholder ikke, og ligner ikke i betydelig grad, din e-mailadresse", "doesnt_match": "Matcher ikke", "doing_this_allow_log_in_through_institution": "Dermed får du mulghed for at logge ind i __appName__ igennem din institution, og vil genbekræfte din institutionelle e-mailadresse.", diff --git a/services/web/locales/de.json b/services/web/locales/de.json index 977f3ea88c..1f0ee6e0f7 100644 --- a/services/web/locales/de.json +++ b/services/web/locales/de.json @@ -426,7 +426,6 @@ "do_you_want_to_change_your_primary_email_address_to": "Willst Du deine primäre E-Mail-Adresse in __email__ ändern?", "do_you_want_to_overwrite_them": "Willst Du sie überschreiben?", "documentation": "Dokumentation", - "docx_import_feedback_message": "Das Importieren von Word-Dokumenten ist eine neue Funktion. <0>Sag uns, was du davon hältst", "does_not_contain_or_significantly_match_your_email": "nicht mit Teilen deiner E-Mail-Adresse übereinstimmt", "doesnt_match": "Stimmt nicht überein", "doing_this_allow_log_in_through_institution": "Dadurch kannst du dich über dein institutionelles Portal bei __appName__ anmelden und deine institutionelle E-Mail-Adresse bestätigen.", diff --git a/services/web/locales/en.json b/services/web/locales/en.json index 440d3e0d1e..bf6da2990f 100644 --- a/services/web/locales/en.json +++ b/services/web/locales/en.json @@ -666,8 +666,6 @@ "document_updated_externally_detail": "This document was just updated externally. Any recent changes you have made may have been overwritten. To see previous versions, please look in the history.", "documentation": "Documentation", "documentation_articles": "Documentation and articles", - "docx_export_feedback_message": "Exporting Word docs is a new feature. <0>Let us know what you think", - "docx_import_feedback_message": "Importing Word docs is a new feature. <0>Let us know what you think", "does_not_contain_or_significantly_match_your_email": "does not contain or significantly match your email", "doesnt_match": "Doesn’t match", "doing_this_allow_log_in_through_institution": "Doing this will allow you to log in to __appName__ through your institution and will reconfirm your institutional email address.", @@ -1002,7 +1000,6 @@ "generate_from_text_or_image": "From text or image", "generate_token": "Generate token", "generating": "Generating", - "generic_export_feedback_message": "This is a new feature. <0>Let us know what you think", "generic_if_problem_continues_contact_us": "If the problem continues please contact us", "generic_linked_file_compile_error": "This project’s output files are not available because it failed to compile. Please open the project to see the compilation error details.", "generic_something_went_wrong": "Sorry, something went wrong", @@ -1199,7 +1196,6 @@ "how_to_insert_images": "How to insert images", "how_we_use_your_data": "How we use your data", "how_we_use_your_data_explanation": "<0>Please help us continue to improve Overleaf by answering a few quick questions. Your answers will help us and our corporate group understand more about our user base. We may use this information to improve your Overleaf experience, for example by providing personalized onboarding, upgrade prompts, help suggestions, and tailored marketing communications (if you’ve opted-in to receive them).<1>For more details on how we use your personal data, please see our <0>Privacy Notice.", - "html_export_feedback_message": "Exporting as HTML is a new feature. <0>Let us know what you think", "hundreds_templates_info": "Produce beautiful documents starting from our gallery of LaTeX templates for journals, conferences, theses, reports, CVs and much more.", "i_want_to_add_a_po_number": "I want to add a PO number", "i_want_to_stay": "I want to stay", @@ -1588,8 +1584,6 @@ "managers_management": "Managers management", "managing_your_subscription": "Managing your subscription", "march": "March", - "markdown_export_feedback_message": "Exporting as Markdown is a new feature. <0>Let us know what you think", - "markdown_import_feedback_message": "Importing Markdown files is a new feature. <0>Let us know what you think", "marked_as_resolved": "Marked as resolved", "math": "Math", "math_display": "Math Display",