Просмотр исходного кода

Remove feedback link from spelling suggestions (#22634)

GitOrigin-RevId: f75dffe5395ad15441aee603c494afdf8488642e
Alf Eaton 1 год назад
Родитель
Сommit
823069d13e

+ 0 - 55
services/web/frontend/js/features/source-editor/extensions/spelling/spelling-suggestions-feedback.tsx

@@ -1,55 +0,0 @@
-import { FC, memo } from 'react'
-import { useTranslation } from 'react-i18next'
-import OLTooltip from '@/features/ui/components/ol/ol-tooltip'
-import BootstrapVersionSwitcher from '@/features/ui/components/bootstrap-5/bootstrap-version-switcher'
-import classnames from 'classnames'
-import MaterialIcon from '@/shared/components/material-icon'
-import { Dropdown } from 'react-bootstrap-5'
-import { bsVersion, isBootstrap5 } from '@/features/utils/bootstrap-5'
-import PolymorphicComponent from '@/shared/components/polymorphic-component'
-
-const SpellingSuggestionsFeedback: FC = () => {
-  const { t } = useTranslation()
-  return (
-    <OLTooltip
-      id="spell-check-client-tooltip"
-      description={
-        <>
-          The spell-checker has been updated.
-          <br />
-          Click to give feedback
-        </>
-      }
-      tooltipProps={{ className: 'split-test-badge-tooltip' }}
-      overlayProps={{ placement: 'bottom', delay: 100 }}
-    >
-      <span>
-        <PolymorphicComponent
-          as={isBootstrap5() ? Dropdown.Item : 'a'}
-          href="https://docs.google.com/forms/d/e/1FAIpQLSdD1wa5SiCZ7x_UF6e8vywTN82kSm6ou2rTKz-XBiEjNilOXQ/viewform"
-          target="_blank"
-          rel="noopener noreferrer"
-          className={bsVersion({ bs3: 'dropdown-menu-button' })}
-        >
-          <BootstrapVersionSwitcher
-            bs3={
-              <span
-                className={classnames('badge', 'info-badge')}
-                style={{ width: 14, height: 14 }}
-              />
-            }
-            bs5={
-              <MaterialIcon
-                type="info"
-                className={classnames('align-middle', 'info-badge')}
-              />
-            }
-          />
-          <span className="mx-2">{t('give_feedback')}</span>
-        </PolymorphicComponent>
-      </span>
-    </OLTooltip>
-  )
-}
-
-export default memo(SpellingSuggestionsFeedback)

+ 0 - 16
services/web/frontend/js/features/source-editor/extensions/spelling/spelling-suggestions.tsx

@@ -11,7 +11,6 @@ import { useTranslation } from 'react-i18next'
 import getMeta from '@/utils/meta'
 import getMeta from '@/utils/meta'
 import classnames from 'classnames'
 import classnames from 'classnames'
 import { sendMB } from '@/infrastructure/event-tracking'
 import { sendMB } from '@/infrastructure/event-tracking'
-import SpellingSuggestionsFeedback from './spelling-suggestions-feedback'
 import { SpellingSuggestionsLanguage } from './spelling-suggestions-language'
 import { SpellingSuggestionsLanguage } from './spelling-suggestions-language'
 import { captureException } from '@/infrastructure/error-reporter'
 import { captureException } from '@/infrastructure/error-reporter'
 import { debugConsole } from '@/utils/debugging'
 import { debugConsole } from '@/utils/debugging'
@@ -181,15 +180,6 @@ const B3SpellingSuggestions: FC<SpellingSuggestionsInnerProps> = ({
           handleClose={handleClose}
           handleClose={handleClose}
         />
         />
       </li>
       </li>
-
-      {getMeta('ol-isSaas') && (
-        <>
-          <li className="divider" />
-          <li role="menuitem">
-            <SpellingSuggestionsFeedback />
-          </li>
-        </>
-      )}
     </ul>
     </ul>
   )
   )
 }
 }
@@ -280,12 +270,6 @@ const B5SpellingSuggestions: FC<SpellingSuggestionsInnerProps> = ({
           language={language}
           language={language}
           handleClose={handleClose}
           handleClose={handleClose}
         />
         />
-        {getMeta('ol-isSaas') && (
-          <>
-            <Dropdown.Divider />
-            <SpellingSuggestionsFeedback />
-          </>
-        )}
       </Dropdown.Menu>
       </Dropdown.Menu>
     </Dropdown>
     </Dropdown>
   )
   )