Remove Piwik support (#8835)

* Remove all mentions of Piwik

* Kill off all consumer of the old Piwik Analytics module

* Simplify ModalManager interface

* i18n

* Attempt to fix old e2e tests

* Remove unused component

* Iterate PR
This commit is contained in:
Michael Telatynski 2022-06-14 17:51:51 +01:00 committed by GitHub
parent 7d14d15ba6
commit 3c5c2bef6d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
142 changed files with 446 additions and 1412 deletions

View file

@ -72,16 +72,11 @@ export const showAddExistingRooms = (space: Room): void => {
};
export const showCreateNewRoom = async (space: Room, type?: RoomType): Promise<boolean> => {
const modal = Modal.createTrackedDialog<[boolean, IOpts]>(
"Space Landing",
"Create Room",
CreateRoomDialog,
{
type,
defaultPublic: space.getJoinRule() === JoinRule.Public,
parentSpace: space,
},
);
const modal = Modal.createDialog<[boolean, IOpts]>(CreateRoomDialog, {
type,
defaultPublic: space.getJoinRule() === JoinRule.Public,
parentSpace: space,
});
const [shouldCreate, opts] = await modal.finished;
if (shouldCreate) {
await createRoom(opts);
@ -97,7 +92,7 @@ export const shouldShowSpaceInvite = (space: Room) =>
export const showSpaceInvite = (space: Room, initialText = ""): void => {
if (space.getJoinRule() === "public") {
const modal = Modal.createTrackedDialog("Space Invite", "User Menu", InfoDialog, {
const modal = Modal.createDialog(InfoDialog, {
title: _t("Invite to %(spaceName)s", { spaceName: space.name }),
description: <React.Fragment>
<span>{ _t("Share your public space") }</span>
@ -114,39 +109,27 @@ export const showSpaceInvite = (space: Room, initialText = ""): void => {
};
export const showAddExistingSubspace = (space: Room): void => {
Modal.createTrackedDialog(
"Space Landing",
"Create Subspace",
AddExistingSubspaceDialog,
{
space,
onCreateSubspaceClick: () => showCreateNewSubspace(space),
onFinished: (added: boolean) => {
if (added && RoomViewStore.instance.getRoomId() === space.roomId) {
defaultDispatcher.fire(Action.UpdateSpaceHierarchy);
}
},
Modal.createDialog(AddExistingSubspaceDialog, {
space,
onCreateSubspaceClick: () => showCreateNewSubspace(space),
onFinished: (added: boolean) => {
if (added && RoomViewStore.instance.getRoomId() === space.roomId) {
defaultDispatcher.fire(Action.UpdateSpaceHierarchy);
}
},
"mx_AddExistingToSpaceDialog_wrapper",
);
}, "mx_AddExistingToSpaceDialog_wrapper");
};
export const showCreateNewSubspace = (space: Room): void => {
Modal.createTrackedDialog(
"Space Landing",
"Create Subspace",
CreateSubspaceDialog,
{
space,
onAddExistingSpaceClick: () => showAddExistingSubspace(space),
onFinished: (added: boolean) => {
if (added && RoomViewStore.instance.getRoomId() === space.roomId) {
defaultDispatcher.fire(Action.UpdateSpaceHierarchy);
}
},
Modal.createDialog(CreateSubspaceDialog, {
space,
onAddExistingSpaceClick: () => showAddExistingSubspace(space),
onFinished: (added: boolean) => {
if (added && RoomViewStore.instance.getRoomId() === space.roomId) {
defaultDispatcher.fire(Action.UpdateSpaceHierarchy);
}
},
"mx_CreateSubspaceDialog_wrapper",
);
}, "mx_CreateSubspaceDialog_wrapper");
};
export const bulkSpaceBehaviour = async (