Merge pull request #26928 from overleaf/td-remove-use-scope-value

Remove useScopeValue and its associated store

GitOrigin-RevId: 439d6eb16343f65695ef615a9ff697d0cc5ad2c7
This commit is contained in:
Tim Down
2025-07-10 08:08:59 +00:00
committed by Copybot
parent e4a9b13e9a
commit bfa0459e72
7 changed files with 5 additions and 161 deletions
@@ -27,8 +27,5 @@ export const mockScope = (
refreshResolvedCommentsDropdown: cy.stub(() => sleep(1000)),
onlineUserCursorHighlights: {},
permissionsLevel: 'owner',
$on: cy.stub().log(false),
$broadcast: cy.stub().log(false),
$emit: cy.stub().log(false),
}
}
@@ -11,10 +11,7 @@ import React, {
type FC,
type PropsWithChildren,
} from 'react'
import {
createReactScopeValueStore,
IdeReactContext,
} from '@/features/ide-react/context/ide-react-context'
import { IdeReactContext } from '@/features/ide-react/context/ide-react-context'
import { IdeEventEmitter } from '@/features/ide-react/create-ide-event-emitter'
import { ReactScopeValueStore } from '@/features/ide-react/scope-value-store/react-scope-value-store'
import { ReactScopeEventEmitter } from '@/features/ide-react/scope-event-emitter/react-scope-event-emitter'
@@ -300,11 +297,6 @@ const makeIdeReactProvider = (
}))
const [ideContextValue] = useState(() => {
const scopeStore = createReactScopeValueStore()
for (const [key, value] of Object.entries(scope)) {
// TODO: path for nested entries
scopeStore.set(key, value)
}
const scopeEventEmitter = new ReactScopeEventEmitter(
new IdeEventEmitter()
)
@@ -312,7 +304,6 @@ const makeIdeReactProvider = (
return {
socket,
scopeStore,
scopeEventEmitter,
unstableStore,
}