Merge pull request #30632 from overleaf/mj-pdf-dark-mode-tear-down

[web] Tear down pdf-dark-mode feature flag

GitOrigin-RevId: 5f3fa98af8eba70139ec614a3c2e08e380b56de9
This commit is contained in:
Mathias Jakobsen
2026-01-12 12:52:59 +00:00
committed by Copybot
parent 1b272483cd
commit 69b12f3075
4 changed files with 2 additions and 13 deletions

View File

@@ -457,7 +457,6 @@ const _ProjectController = {
'wf-citations-checker',
'wf-citations-checker-on-selection',
'writefull-asymetric-queue-size-per-model',
'pdf-dark-mode',
'email-notifications',
'editor-redesign-no-opt-out',
].filter(Boolean)

View File

@@ -87,7 +87,6 @@ export const SettingsModalProvider: FC<React.PropsWithChildren> = ({
// TODO ide-redesign-cleanup: Rename this field and move it directly into this context
const { leftMenuShown, setLeftMenuShown } = useLayoutContext()
const hasDarkModePdf = useFeatureFlag('pdf-dark-mode')
const hasEmailNotifications = useFeatureFlag('email-notifications')
const noNewEditorOptOut = useFeatureFlag('editor-redesign-no-opt-out')
@@ -213,7 +212,7 @@ export const SettingsModalProvider: FC<React.PropsWithChildren> = ({
{
key: 'pdfDarkMode',
component: <DarkModePdfSetting />,
hidden: overallTheme === 'light-' || !hasDarkModePdf,
hidden: overallTheme === 'light-',
},
{
key: 'fontSize',
@@ -268,7 +267,7 @@ export const SettingsModalProvider: FC<React.PropsWithChildren> = ({
href: '/user/subscription',
},
],
[t, overallTheme, hasDarkModePdf, hasEmailNotifications, noNewEditorOptOut]
[t, overallTheme, hasEmailNotifications, noNewEditorOptOut]
)
const settingsTabs = useMemo(

View File

@@ -2,14 +2,12 @@ import OLTooltip from '@/shared/components/ol/ol-tooltip'
import { useCallback, useId } from 'react'
import { useTranslation } from 'react-i18next'
import { useDetachCompileContext as useCompileContext } from '../../../shared/context/detach-compile-context'
import { useFeatureFlag } from '@/shared/context/split-test-context'
import OLIconButton from '@/shared/components/ol/ol-icon-button'
import { useIsNewEditorEnabled } from '@/features/ide-redesign/utils/new-editor-utils'
export const PdfHybridThemeButton = () => {
const id = useId()
const { t } = useTranslation()
const splitTestEnabled = useFeatureFlag('pdf-dark-mode')
const usesNewEditor = useIsNewEditorEnabled()
const {
pdfViewer,
@@ -28,10 +26,6 @@ export const PdfHybridThemeButton = () => {
return null
}
if (!splitTestEnabled) {
return null
}
if (activeOverallTheme !== 'dark') {
return null
}

View File

@@ -14,7 +14,6 @@ import importOverleafModules from '../../../../macros/import-overleaf-module.mac
import PdfCodeCheckFailedBanner from '@/features/ide-redesign/components/pdf-preview/pdf-code-check-failed-banner'
import getMeta from '@/utils/meta'
import NewPdfLogsViewer from '@/features/ide-redesign/components/pdf-preview/pdf-logs-viewer'
import { useFeatureFlag } from '@/shared/context/split-test-context'
function PdfPreviewPane() {
const {
@@ -25,9 +24,7 @@ function PdfPreviewPane() {
} = useCompileContext()
const { compileTimeout } = getMeta('ol-compileSettings')
const usesNewEditor = useIsNewEditorEnabled()
const inDarkModePdfSplitTest = useFeatureFlag('pdf-dark-mode')
const darkModePdf =
inDarkModePdfSplitTest &&
usesNewEditor &&
pdfViewer === 'pdfjs' &&
activeOverallTheme === 'dark' &&