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

@ -154,7 +154,7 @@ export default class DateSeparator extends React.Component<IProps, IState> {
// detached queue and we show the room status bar to allow retry
if (typeof code !== "undefined") {
// display error message stating you couldn't delete this.
Modal.createTrackedDialog('Unable to find event at that date', '', ErrorDialog, {
Modal.createDialog(ErrorDialog, {
title: _t('Error'),
description: _t('Unable to find event at that date. (%(code)s)', { code }),
});

View file

@ -75,13 +75,13 @@ export default class EditHistoryMessage extends React.PureComponent<IProps, ISta
const event = this.props.mxEvent;
const cli = MatrixClientPeg.get();
Modal.createTrackedDialog('Confirm Redact Dialog', 'Edit history', ConfirmAndWaitRedactDialog, {
Modal.createDialog(ConfirmAndWaitRedactDialog, {
redact: () => cli.redactEvent(event.getRoomId(), event.getId()),
}, 'mx_Dialog_confirmredact');
};
private onViewSourceClick = (): void => {
Modal.createTrackedDialog('View Event Source', 'Edit history', ViewSource, {
Modal.createDialog(ViewSource, {
mxEvent: this.props.mxEvent,
}, 'mx_Dialog_viewsource');
};

View file

@ -106,9 +106,7 @@ const MBeaconBody: React.FC<IBodyProps> = React.forwardRef(({ mxEvent }, ref) =>
if (displayStatus !== BeaconDisplayStatus.Active) {
return;
}
Modal.createTrackedDialog(
'Beacon View',
'',
Modal.createDialog(
BeaconViewDialog,
{
roomId: mxEvent.getRoomId(),

View file

@ -172,7 +172,7 @@ export default class MFileBody extends React.Component<IProps, IState> {
});
} catch (err) {
logger.warn("Unable to decrypt attachment: ", err);
Modal.createTrackedDialog('Error decrypting attachment', '', ErrorDialog, {
Modal.createDialog(ErrorDialog, {
title: _t("Error"),
description: _t("Error decrypting attachment"),
});

View file

@ -57,9 +57,7 @@ export default class MLocationBody extends React.Component<IBodyProps, IState> {
}
private onClick = () => {
Modal.createTrackedDialog(
'Location View',
'',
Modal.createDialog(
LocationViewDialog,
{
matrixClient: this.context,

View file

@ -181,9 +181,7 @@ export function pollAlreadyHasVotes(mxEvent: MatrixEvent, getRelationsForEvent?:
export function launchPollEditor(mxEvent: MatrixEvent, getRelationsForEvent?: GetRelationsForEvent): void {
if (pollAlreadyHasVotes(mxEvent, getRelationsForEvent)) {
Modal.createTrackedDialog(
'Not allowed to edit poll',
'',
Modal.createDialog(
ErrorDialog,
{
title: _t("Can't edit poll"),
@ -193,9 +191,7 @@ export function launchPollEditor(mxEvent: MatrixEvent, getRelationsForEvent?: Ge
},
);
} else {
Modal.createTrackedDialog(
'Polls',
'create',
Modal.createDialog(
PollCreateDialog,
{
room: MatrixClientPeg.get().getRoom(mxEvent.getRoomId()),
@ -312,9 +308,7 @@ export default class MPollBody extends React.Component<IBodyProps, IState> {
).catch((e: any) => {
console.error("Failed to submit poll response event:", e);
Modal.createTrackedDialog(
'Vote not registered',
'',
Modal.createDialog(
ErrorDialog,
{
title: _t("Vote not registered"),

View file

@ -468,7 +468,7 @@ export default class TextualBody extends React.Component<IBodyProps, IState> {
scalarClient.connect().then(() => {
const completeUrl = scalarClient.getStarterLink(starterLink);
const integrationsUrl = integrationManager.uiUrl;
Modal.createTrackedDialog('Add an integration', '', QuestionDialog, {
Modal.createDialog(QuestionDialog, {
title: _t("Add an Integration"),
description:
<div>

View file

@ -52,14 +52,14 @@ export default class TileErrorBoundary extends React.Component<IProps, IState> {
}
private onBugReport = (): void => {
Modal.createTrackedDialog('Bug Report Dialog', '', BugReportDialog, {
Modal.createDialog(BugReportDialog, {
label: 'react-soft-crash-tile',
error: this.state.error,
});
};
private onViewSource = (): void => {
Modal.createTrackedDialog('View Event Source', 'from crash', ViewSource, {
Modal.createDialog(ViewSource, {
mxEvent: this.props.mxEvent,
}, 'mx_Dialog_viewsource');
};