1
0
mirror of https://github.com/matrix-org/matrix-react-sdk.git synced 2025-11-05 23:10:41 +03:00

Add customisation point to disable space creation (#7766)

* mock matchMedia in jest setup

Signed-off-by: Kerry Archibald <kerrya@element.io>

* use UIComponent.CreateSpaces in space panel

Signed-off-by: Kerry Archibald <kerrya@element.io>

* lint

Signed-off-by: Kerry Archibald <kerrya@element.io>

* hide add space in spacecontextmenu

Signed-off-by: Kerry Archibald <kerrya@element.io>

* use UIComponent customistations in space oom view add space button

Signed-off-by: Kerry Archibald <kerrya@element.io>

* copyright

Signed-off-by: Kerry Archibald <kerrya@element.io>
This commit is contained in:
Kerry
2022-02-09 17:21:40 +01:00
committed by GitHub
parent 6e8edbb418
commit 818fddd72c
11 changed files with 890 additions and 48 deletions

View File

@@ -18,6 +18,7 @@ import { MatrixClient } from "matrix-js-sdk/src/client";
import { MatrixEvent } from "matrix-js-sdk/src/models/event";
import { EventType } from "matrix-js-sdk/src/@types/event";
import { EventEmitter } from "events";
import { ReactWrapper } from "enzyme";
import { AsyncStoreWithClient } from "../../src/stores/AsyncStoreWithClient";
import { mkEvent, mkStubRoom } from "../test-utils";
@@ -82,3 +83,5 @@ export const mkSpace = (
};
export const emitPromise = (e: EventEmitter, k: string | symbol) => new Promise(r => e.once(k, r));
export const findByTestId = (component: ReactWrapper, id: string) => component.find(`[data-test-id="${id}"]`);