From d731afed9080a6a77341532795b4295d247cda6d Mon Sep 17 00:00:00 2001
From: David <33458145+davidmcpowell@users.noreply.github.com>
Date: Wed, 29 Jan 2025 12:14:03 +0000
Subject: [PATCH] Merge pull request #23134 from
overleaf/dp-remove-math-preview-flag
Remove math-preview feature flag
GitOrigin-RevId: a5235cf36b692b0e3dc36ff6185ebc7ef169d21e
---
services/web/app/src/Features/Project/ProjectController.js | 1 -
.../features/editor-left-menu/components/settings-menu.tsx | 4 +---
.../features/source-editor/components/codemirror-editor.tsx | 3 +--
.../js/features/source-editor/extensions/math-preview.ts | 5 -----
4 files changed, 2 insertions(+), 11 deletions(-)
diff --git a/services/web/app/src/Features/Project/ProjectController.js b/services/web/app/src/Features/Project/ProjectController.js
index 2734460f99..a9c0287259 100644
--- a/services/web/app/src/Features/Project/ProjectController.js
+++ b/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',
diff --git a/services/web/frontend/js/features/editor-left-menu/components/settings-menu.tsx b/services/web/frontend/js/features/editor-left-menu/components/settings-menu.tsx
index 0546d6cf23..5085fb0f49 100644
--- a/services/web/frontend/js/features/editor-left-menu/components/settings-menu.tsx
+++ b/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() {
- {enableMathPreview && }
+
diff --git a/services/web/frontend/js/features/source-editor/components/codemirror-editor.tsx b/services/web/frontend/js/features/source-editor/components/codemirror-editor.tsx
index 7aeb19d2e6..527acb56d0 100644
--- a/services/web/frontend/js/features/source-editor/components/codemirror-editor.tsx
+++ b/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(null)
@@ -75,7 +74,7 @@ function CodeMirrorEditor() {
)}
- {enableMathPreview && }
+
{newReviewPanel && }
diff --git a/services/web/frontend/js/features/source-editor/extensions/math-preview.ts b/services/web/frontend/js/features/source-editor/extensions/math-preview.ts
index 6d7191f036..f3f262568b 100644
--- a/services/web/frontend/js/features/source-editor/extensions/math-preview.ts
+++ b/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] : []
)