Separate out SDKContext (#34053)

* Separate out SDKContext

...from SDKContextClass, as the comments hopefully explain.

Also make the captitalisation consistent.

* Adding the new file usually helps too

* Fix import

* More comment

* Update the various imports of SDKContextClass

* Also fix case of TestSDKContext

* Update the mock
This commit is contained in:
David Baker
2026-07-01 12:49:18 +00:00
committed by GitHub
parent 1c1bda9cab
commit 54d27fd59c
89 changed files with 493 additions and 458 deletions
@@ -23,7 +23,7 @@ import { RightPanelPhases } from "../../../../src/stores/right-panel/RightPanelS
import RightPanelStore from "../../../../src/stores/right-panel/RightPanelStore";
import { UPDATE_EVENT } from "../../../../src/stores/AsyncStore";
import { WidgetLayoutStore } from "../../../../src/stores/widgets/WidgetLayoutStore";
import { SdkContextClass } from "../../../../src/contexts/SDKContext";
import { SDKContextClass } from "../../../../src/contexts/SDKContextClass";
import { RoomPermalinkCreator } from "../../../../src/utils/permalinks/Permalinks";
const RightPanelBase = wrapInMatrixClientContext(_RightPanel);
@@ -32,13 +32,13 @@ describe("RightPanel", () => {
const resizeNotifier = new ResizeNotifier();
let cli: MockedObject<MatrixClient>;
let context: SdkContextClass;
let context: SDKContextClass;
let RightPanel: React.ComponentType<React.ComponentProps<typeof RightPanelBase>>;
beforeEach(() => {
stubClient();
cli = mocked(MatrixClientPeg.safeGet());
DMRoomMap.makeShared(cli);
context = new SdkContextClass();
context = new SDKContextClass();
context.client = cli;
RightPanel = wrapInSdkContext(RightPanelBase, context);
});