mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-14 14:13:43 +01:00
[web] Move UI scope to React states (#26403)
* Move `ui.view` to setState
* Move `openFile` to setState
* Move `ui.leftMenuShown` to setState
* Move `ui.miniReviewPanelVisible` to setState
* Move `ui.pdfLayout` to setState
* Move `ui.chatOpen` to setState
* Move `ui.reviewPanelOpen` to setState
* Cleanup: remove layout-context-adapter and imports
* Replace `ui` scope by mocked `LayoutProvider` in tests
* Update test
* Remove unnecessary `scopeStore.set('ui.chatOpen' ...`
GitOrigin-RevId: 81578bfdc958239eac492905f714a6074c81d0f5
This commit is contained in:
@@ -8,7 +8,6 @@ import React, {
|
||||
useCallback,
|
||||
} from 'react'
|
||||
import { ReactScopeValueStore } from '@/features/ide-react/scope-value-store/react-scope-value-store'
|
||||
import populateLayoutScope from '@/features/ide-react/scope-adapters/layout-context-adapter'
|
||||
import { IdeProvider } from '@/shared/context/ide-context'
|
||||
import {
|
||||
createIdeEventEmitter,
|
||||
@@ -67,7 +66,6 @@ export function createReactScopeValueStore(projectId: string) {
|
||||
// necessary values in the store, but this is simpler for now
|
||||
populateIdeReactScope(scopeStore)
|
||||
populateEditorScope(scopeStore, projectId)
|
||||
populateLayoutScope(scopeStore)
|
||||
populateProjectScope(scopeStore)
|
||||
populatePdfScope(scopeStore)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user