Explorar o código

Merge pull request #27611 from overleaf/mj-visual-editor-feedback-badges

[web] Remove unused visual editor feedback badges

GitOrigin-RevId: adb92cc66cff5f3d48ea33e53e132605270b8f25
Mathias Jakobsen hai 1 ano
pai
achega
79adb3a9d2

+ 1 - 1
services/web/frontend/extracted-translations.json

@@ -1841,7 +1841,7 @@
   "this_project_is_public_read_only": "",
   "this_project_is_public_read_only": "",
   "this_project_will_appear_in_your_dropbox_folder_at": "",
   "this_project_will_appear_in_your_dropbox_folder_at": "",
   "this_tool_helps_you_insert_figures": "",
   "this_tool_helps_you_insert_figures": "",
-  "this_tool_helps_you_insert_simple_tables_into_your_project_without_writing_latex_code_give_feedback": "",
+  "this_tool_helps_you_insert_simple_tables_into_your_project_without_writing_latex_code": "",
   "this_total_reflects_the_amount_due_until": "",
   "this_total_reflects_the_amount_due_until": "",
   "this_was_helpful": "",
   "this_was_helpful": "",
   "this_wasnt_helpful": "",
   "this_wasnt_helpful": "",

+ 0 - 6
services/web/frontend/js/features/source-editor/components/figure-modal/figure-modal.tsx

@@ -25,7 +25,6 @@ import { ensureEmptyLine } from '../../extensions/toolbar/commands'
 import { useTranslation } from 'react-i18next'
 import { useTranslation } from 'react-i18next'
 import useEventListener from '../../../../shared/hooks/use-event-listener'
 import useEventListener from '../../../../shared/hooks/use-event-listener'
 import { prepareLines } from '../../utils/prepare-lines'
 import { prepareLines } from '../../utils/prepare-lines'
-import { FeedbackBadge } from '@/shared/components/feedback-badge'
 import { FullSizeLoadingSpinner } from '@/shared/components/loading-spinner'
 import { FullSizeLoadingSpinner } from '@/shared/components/loading-spinner'
 
 
 const FigureModalBody = lazy(() => import('./figure-modal-body'))
 const FigureModalBody = lazy(() => import('./figure-modal-body'))
@@ -281,11 +280,6 @@ const FigureModalContent = () => {
             : sourcePickerShown
             : sourcePickerShown
               ? t('replace_figure')
               ? t('replace_figure')
               : getTitle(source)}{' '}
               : getTitle(source)}{' '}
-          <FeedbackBadge
-            id="figure-modal-feedback"
-            url="https://forms.gle/PfEtwceYBNQ32DF4A"
-            text="Please click to give feedback about editing figures."
-          />
         </OLModalTitle>
         </OLModalTitle>
       </OLModalHeader>
       </OLModalHeader>
 
 

+ 3 - 11
services/web/frontend/js/features/source-editor/components/table-generator/help-modal.tsx

@@ -24,17 +24,9 @@ export const TableGeneratorHelpModal = () => {
       </OLModalHeader>
       </OLModalHeader>
       <OLModalBody>
       <OLModalBody>
         <p>
         <p>
-          <Trans
-            i18nKey="this_tool_helps_you_insert_simple_tables_into_your_project_without_writing_latex_code_give_feedback"
-            components={[
-              // eslint-disable-next-line react/jsx-key, jsx-a11y/anchor-has-content
-              <a
-                href="https://forms.gle/ri3fzV1oQDAjmfmD7"
-                target="_blank"
-                rel="noopener noreferrer"
-              />,
-            ]}
-          />
+          {t(
+            'this_tool_helps_you_insert_simple_tables_into_your_project_without_writing_latex_code'
+          )}
         </p>
         </p>
         <b>{t('how_it_works')}</b>
         <b>{t('how_it_works')}</b>
         <p>
         <p>

+ 0 - 16
services/web/frontend/js/features/source-editor/components/table-generator/toolbar/toolbar.tsx

@@ -21,7 +21,6 @@ import { useCodeMirrorViewContext } from '../../codemirror-context'
 import { useTableContext } from '../contexts/table-context'
 import { useTableContext } from '../contexts/table-context'
 import { useTabularContext } from '../contexts/tabular-context'
 import { useTabularContext } from '../contexts/tabular-context'
 import { useTranslation } from 'react-i18next'
 import { useTranslation } from 'react-i18next'
-import { FeedbackBadge } from '@/shared/components/feedback-badge'
 import classNames from 'classnames'
 import classNames from 'classnames'
 
 
 type CaptionPosition = 'no_caption' | 'above' | 'below'
 type CaptionPosition = 'no_caption' | 'above' | 'below'
@@ -458,22 +457,7 @@ export const Toolbar = memo(function Toolbar() {
           label={t('help')}
           label={t('help')}
           command={showHelp}
           command={showHelp}
         />
         />
-        <div className="toolbar-beta-badge">
-          <FeedbackBadge
-            id="table-generator-feedback"
-            url="https://forms.gle/9dHxXPGugxEHgY3L9"
-            text={<FeedbackBadgeContent />}
-          />
-        </div>
       </div>
       </div>
     </div>
     </div>
   )
   )
 })
 })
-
-const FeedbackBadgeContent = () => (
-  <>
-    We have a new way to insert and edit tables.
-    <br />
-    Click to give feedback
-  </>
-)

+ 0 - 4
services/web/frontend/js/features/source-editor/extensions/visual/table-generator.ts

@@ -290,10 +290,6 @@ export const tableGeneratorTheme = EditorView.baseTheme({
     },
     },
   },
   },
 
 
-  '.toolbar-beta-badge': {
-    padding: '0 4px 2px 12px',
-  },
-
   '.table-generator-button-group': {
   '.table-generator-button-group': {
     display: 'inline-flex',
     display: 'inline-flex',
     'align-items': 'center',
     'align-items': 'center',

+ 1 - 1
services/web/locales/en.json

@@ -2365,7 +2365,7 @@
   "this_project_is_public_read_only": "This project is public and can be viewed but not edited by anyone with the URL",
   "this_project_is_public_read_only": "This project is public and can be viewed but not edited by anyone with the URL",
   "this_project_will_appear_in_your_dropbox_folder_at": "This project will appear in your Dropbox folder at ",
   "this_project_will_appear_in_your_dropbox_folder_at": "This project will appear in your Dropbox folder at ",
   "this_tool_helps_you_insert_figures": "This tool helps you insert figures into your project without needing to write the LaTeX code. The following information explains more about the options in the tool and how to further customize your figures.",
   "this_tool_helps_you_insert_figures": "This tool helps you insert figures into your project without needing to write the LaTeX code. The following information explains more about the options in the tool and how to further customize your figures.",
-  "this_tool_helps_you_insert_simple_tables_into_your_project_without_writing_latex_code_give_feedback": "This tool helps you insert simple tables into your project without writing LaTeX code. This tool is new, so please <0>give us feedback</0> and look out for additional functionality coming soon.",
+  "this_tool_helps_you_insert_simple_tables_into_your_project_without_writing_latex_code": "This tool helps you insert simple tables into your project without writing LaTeX code.",
   "this_total_reflects_the_amount_due_until": "This total reflects the amount due from today until <strong>__date__</strong>, the end of the billing period of your existing plan.",
   "this_total_reflects_the_amount_due_until": "This total reflects the amount due from today until <strong>__date__</strong>, the end of the billing period of your existing plan.",
   "this_was_helpful": "This was helpful",
   "this_was_helpful": "This was helpful",
   "this_wasnt_helpful": "This wasn’t helpful",
   "this_wasnt_helpful": "This wasn’t helpful",