Kaynağa Gözat

Merge pull request #23134 from overleaf/dp-remove-math-preview-flag

Remove math-preview feature flag

GitOrigin-RevId: a5235cf36b692b0e3dc36ff6185ebc7ef169d21e
David 1 yıl önce
ebeveyn
işleme
d731afed90

+ 0 - 1
services/web/app/src/Features/Project/ProjectController.js

@@ -335,7 +335,6 @@ const _ProjectController = {
       'compile-log-events',
       'external-socket-heartbeat',
       'full-project-search',
-      'math-preview',
       'null-test-share-modal',
       'paywall-cta',
       'pdf-caching-cached-url-lookup',

+ 1 - 3
services/web/frontend/js/features/editor-left-menu/components/settings-menu.tsx

@@ -16,7 +16,6 @@ import SettingsPdfViewer from './settings/settings-pdf-viewer'
 import SettingsSpellCheckLanguage from './settings/settings-spell-check-language'
 import SettingsSyntaxValidation from './settings/settings-syntax-validation'
 import SettingsMathPreview from './settings/settings-math-preview'
-import { useFeatureFlag } from '@/shared/context/split-test-context'
 import importOverleafModules from '../../../../macros/import-overleaf-module.macro'
 import { ElementType } from 'react'
 import OLForm from '@/features/ui/components/ol/ol-form'
@@ -29,7 +28,6 @@ const moduleSettings: Array<{
 export default function SettingsMenu() {
   const { t } = useTranslation()
   const anonymous = getMeta('ol-anonymous')
-  const enableMathPreview = useFeatureFlag('math-preview')
 
   if (anonymous) {
     return null
@@ -50,7 +48,7 @@ export default function SettingsMenu() {
         <SettingsAutoComplete />
         <SettingsAutoCloseBrackets />
         <SettingsSyntaxValidation />
-        {enableMathPreview && <SettingsMathPreview />}
+        <SettingsMathPreview />
         <SettingsEditorTheme />
         <SettingsOverallTheme />
         <SettingsKeybindings />

+ 1 - 2
services/web/frontend/js/features/source-editor/components/codemirror-editor.tsx

@@ -39,7 +39,6 @@ function CodeMirrorEditor() {
   const isMounted = useIsMounted()
 
   const newReviewPanel = useFeatureFlag('review-panel-redesign')
-  const enableMathPreview = useFeatureFlag('math-preview')
 
   // create the view using the initial state and intercept transactions
   const viewRef = useRef<EditorView | null>(null)
@@ -75,7 +74,7 @@ function CodeMirrorEditor() {
           )}
           <CodeMirrorCommandTooltip />
 
-          {enableMathPreview && <MathPreviewTooltip />}
+          <MathPreviewTooltip />
           {newReviewPanel && <ReviewTooltipMenu />}
           <ReviewPanelMigration />
 

+ 0 - 5
services/web/frontend/js/features/source-editor/extensions/math-preview.ts

@@ -22,7 +22,6 @@ import {
 } from '../utils/tree-operations/math'
 import { documentCommands } from '../languages/latex/document-commands'
 import { debugConsole } from '@/utils/debugging'
-import { isSplitTestEnabled } from '@/utils/splitTestUtils'
 import { nodeHasError } from '../utils/tree-operations/common'
 import { documentEnvironments } from '../languages/latex/document-environments'
 
@@ -30,10 +29,6 @@ const REPOSITION_EVENT = 'editor:repositionMathTooltips'
 const HIDE_TOOLTIP_EVENT = 'editor:hideMathTooltip'
 
 export const mathPreview = (enabled: boolean): Extension => {
-  if (!isSplitTestEnabled('math-preview')) {
-    return []
-  }
-
   return mathPreviewConf.of(
     enabled ? [mathPreviewTheme, mathPreviewStateField] : []
   )