Merge pull request #28497 from overleaf/mj-system-editor-theme-dark-light-split

[web] Split editor theme into two when using system overall theme

GitOrigin-RevId: 1efa5553fdff8a17de634017882feb2ede614cd6
This commit is contained in:
Mathias Jakobsen
2025-12-12 09:05:10 +00:00
committed by Copybot
parent 96a071dd04
commit b554b0cfcc
20 changed files with 476 additions and 42 deletions
@@ -61,6 +61,7 @@ import { SearchQuery } from '@codemirror/search'
import { beforeChangeDocEffect } from '@/features/source-editor/extensions/before-change-doc'
import { useActiveOverallTheme } from '@/shared/hooks/use-active-overall-theme'
import { useEditorSelectionContext } from '@/shared/context/editor-selection-context'
import { useActiveEditorTheme } from '@/shared/hooks/use-active-editor-theme'
function useCodeMirrorScope(view: EditorView) {
const { fileTreeData } = useFileTreeData()
@@ -82,7 +83,6 @@ function useCodeMirrorScope(view: EditorView) {
fontSize,
lineHeight,
autoComplete,
editorTheme,
autoPairDelimiters,
mode,
syntaxValidation,
@@ -91,6 +91,7 @@ function useCodeMirrorScope(view: EditorView) {
enableNewEditor,
} = userSettings
const activeOverallTheme = useActiveOverallTheme()
const editorTheme = useActiveEditorTheme()
const { onlineUserCursorHighlights } = useOnlineUsersContext()