diff --git a/apps/web/src/components/structures/LeftPanel.tsx b/apps/web/src/components/structures/LeftPanel.tsx index aeeb33424a..630d2a9e16 100644 --- a/apps/web/src/components/structures/LeftPanel.tsx +++ b/apps/web/src/components/structures/LeftPanel.tsx @@ -35,14 +35,12 @@ import { shouldShowComponent } from "../../customisations/helpers/UIComponents"; import { UIComponent } from "../../settings/UIFeature"; import AccessibleButton, { type ButtonEvent } from "../views/elements/AccessibleButton"; import PosthogTrackers from "../../PosthogTrackers"; -import type PageType from "../../PageTypes"; import { Landmark, LandmarkNavigation } from "../../accessibility/LandmarkNavigation"; import SettingsStore from "../../settings/SettingsStore"; import { RoomListPanel } from "../views/rooms/RoomListPanel"; interface IProps { isMinimized: boolean; - pageType: PageType; resizeNotifier: ResizeNotifier; } diff --git a/apps/web/src/components/structures/LoggedInView.tsx b/apps/web/src/components/structures/LoggedInView.tsx index 24631ea617..09a8d97515 100644 --- a/apps/web/src/components/structures/LoggedInView.tsx +++ b/apps/web/src/components/structures/LoggedInView.tsx @@ -66,7 +66,6 @@ import LeftPanelLiveShareWarning from "../views/beacon/LeftPanelLiveShareWarning import HomePage from "./HomePage"; import { PipContainer } from "./PipContainer"; import { monitorSyncedPushRules } from "../../utils/pushRules/monitorSyncedPushRules"; -import { type ConfigOptions } from "../../SdkConfig"; import { MatrixClientContextProvider } from "./MatrixClientContextProvider"; import { Landmark, LandmarkNavigation } from "../../accessibility/LandmarkNavigation"; import { ModuleApi } from "../../modules/Api.ts"; @@ -93,12 +92,10 @@ interface IProps { hideToSRUsers: boolean; // eslint-disable-next-line camelcase page_type?: string; - autoJoin?: boolean; threepidInvite?: IThreepidInvite; roomOobData?: IOOBData; currentRoomId: string | null; collapseLhs: boolean; - config: ConfigOptions; currentUserId: string | null; justRegistered?: boolean; roomJustCreatedOpts?: IOpts; @@ -796,7 +793,6 @@ class LoggedInView extends React.Component { data-collapsed={shouldUseMinimizedUI ? true : undefined} > diff --git a/apps/web/src/components/structures/MatrixChat.tsx b/apps/web/src/components/structures/MatrixChat.tsx index 71094c9163..466aafa94e 100644 --- a/apps/web/src/components/structures/MatrixChat.tsx +++ b/apps/web/src/components/structures/MatrixChat.tsx @@ -220,10 +220,6 @@ interface IState { export default class MatrixChat extends React.PureComponent { public static displayName = "MatrixChat"; - public static defaultProps: Partial = { - config: {}, - }; - private firstSyncComplete = false; private firstSyncPromise: PromiseWithResolvers; diff --git a/apps/web/src/components/structures/RoomView.tsx b/apps/web/src/components/structures/RoomView.tsx index 0ea1168944..9ea6368a69 100644 --- a/apps/web/src/components/structures/RoomView.tsx +++ b/apps/web/src/components/structures/RoomView.tsx @@ -303,7 +303,6 @@ interface LocalRoomViewProps { resizeNotifier: ResizeNotifier; permalinkCreator: RoomPermalinkCreator; roomView: RefObject; - mainSplitContentType: MainSplitContentType; e2eStatus?: E2EStatus; } @@ -364,7 +363,6 @@ function LocalRoomView(props: LocalRoomViewProps): ReactElement { interface ILocalRoomCreateLoaderProps { localRoom: LocalRoom; names: string; - mainSplitContentType: MainSplitContentType; } /** @@ -2134,11 +2132,7 @@ export class RoomView extends React.Component { const names = this.state.room.getDefaultRoomName(this.context.client.getSafeUserId()); return ( - + ); } @@ -2152,7 +2146,6 @@ export class RoomView extends React.Component { resizeNotifier={this.context.resizeNotifier} permalinkCreator={this.permalinkCreator} roomView={this.roomView} - mainSplitContentType={this.state.mainSplitContentType} /> ); @@ -2346,7 +2339,6 @@ export class RoomView extends React.Component { onForgetClick={this.onForgetClick} onDeclineClick={this.onDeclineButtonClicked} onDeclineAndBlockClick={this.onDeclineAndBlockButtonClicked} - promptRejectionOptions={true} inviterName={inviterName} canPreview={false} joining={this.state.joining} @@ -2460,7 +2452,6 @@ export class RoomView extends React.Component { onJoinClick={this.onJoinButtonClicked} onForgetClick={this.onForgetClick} onDeclineClick={this.onRejectThreepidInviteButtonClicked} - promptRejectionOptions={true} joining={this.state.joining} inviterName={inviterName} invitedEmail={invitedEmail} diff --git a/apps/web/src/components/structures/SpaceHierarchy.tsx b/apps/web/src/components/structures/SpaceHierarchy.tsx index c1d5976869..b1920e7fed 100644 --- a/apps/web/src/components/structures/SpaceHierarchy.tsx +++ b/apps/web/src/components/structures/SpaceHierarchy.tsx @@ -863,25 +863,23 @@ const SpaceHierarchy: React.FC = ({ space, initialText = "", showRoom, a let results: JSX.Element | undefined; if (filteredRoomSet.size && root) { results = ( - <> - showRoom(cli, hierarchy, roomId, roomType)} - onJoinRoomClick={async (roomId, parents) => { - for (const parent of parents) { - if (cli.getRoom(parent)?.getMyMembership() !== KnownMembership.Join) { - await joinRoom(cli, roomContext.roomViewStore, hierarchy, parent); - } + showRoom(cli, hierarchy, roomId, roomType)} + onJoinRoomClick={async (roomId, parents) => { + for (const parent of parents) { + if (cli.getRoom(parent)?.getMyMembership() !== KnownMembership.Join) { + await joinRoom(cli, roomContext.roomViewStore, hierarchy, parent); } - await joinRoom(cli, roomContext.roomViewStore, hierarchy, roomId); - }} - /> - + } + await joinRoom(cli, roomContext.roomViewStore, hierarchy, roomId); + }} + /> ); } else if (!hierarchy.canLoadMore) { results = ( diff --git a/apps/web/src/components/structures/auth/Login.tsx b/apps/web/src/components/structures/auth/Login.tsx index dca3b30ee0..ce354d5a4b 100644 --- a/apps/web/src/components/structures/auth/Login.tsx +++ b/apps/web/src/components/structures/auth/Login.tsx @@ -428,7 +428,6 @@ class LoginComponent extends React.PureComponent { onPhoneNumberChanged={this.onPhoneNumberChanged} onForgotPasswordClick={this.props.onForgotPasswordClick} loginIncorrect={this.state.loginIncorrect} - serverConfig={this.props.serverConfig} disableSubmit={this.isBusy()} busy={this.props.isSyncing || this.state.busyLoggingIn} /> @@ -502,7 +501,7 @@ class LoginComponent extends React.PureComponent { footer = (
- + {this.props.isSyncing ? _t("auth|syncing") : _t("auth|signing_in")}
{this.props.isSyncing && ( diff --git a/apps/web/src/components/structures/auth/Registration.tsx b/apps/web/src/components/structures/auth/Registration.tsx index 2240ec9381..23be09eff3 100644 --- a/apps/web/src/components/structures/auth/Registration.tsx +++ b/apps/web/src/components/structures/auth/Registration.tsx @@ -610,7 +610,6 @@ export default class Registration extends React.Component { defaultPassword={this.state.formVals.password} onRegisterClick={this.onFormSubmit} flows={this.state.flows} - serverConfig={this.props.serverConfig} canSubmit={!this.state.serverErrorIsFatal} matrixClient={this.state.matrixClient} mobileRegister={this.props.mobileRegister} diff --git a/apps/web/src/components/views/audio_messages/LiveRecordingWaveform.tsx b/apps/web/src/components/views/audio_messages/LiveRecordingWaveform.tsx index 2c388fe867..6630c66f97 100644 --- a/apps/web/src/components/views/audio_messages/LiveRecordingWaveform.tsx +++ b/apps/web/src/components/views/audio_messages/LiveRecordingWaveform.tsx @@ -26,10 +26,6 @@ interface IState { * A waveform which shows the waveform of a live recording */ export default class LiveRecordingWaveform extends React.PureComponent { - public static defaultProps = { - progress: 1, - }; - private waveform: number[] = []; private scheduledUpdate: MarkedExecution = new MarkedExecution( () => this.updateWaveform(), diff --git a/apps/web/src/components/views/auth/CaptchaForm.tsx b/apps/web/src/components/views/auth/CaptchaForm.tsx index ca25ae180d..3e96a86e7e 100644 --- a/apps/web/src/components/views/auth/CaptchaForm.tsx +++ b/apps/web/src/components/views/auth/CaptchaForm.tsx @@ -26,10 +26,6 @@ interface ICaptchaFormState { * A pure UI component which displays a captcha form. */ export default class CaptchaForm extends React.Component { - public static defaultProps = { - onCaptchaResponse: () => {}, - }; - private captchaWidgetId?: string; private recaptchaContainer = createRef(); diff --git a/apps/web/src/components/views/auth/PasswordLogin.tsx b/apps/web/src/components/views/auth/PasswordLogin.tsx index 1fa0c4fa38..97978cb4e2 100644 --- a/apps/web/src/components/views/auth/PasswordLogin.tsx +++ b/apps/web/src/components/views/auth/PasswordLogin.tsx @@ -12,7 +12,6 @@ import { Button } from "@vector-im/compound-web"; import { _t } from "../../../languageHandler"; import SdkConfig from "../../../SdkConfig"; -import { type ValidatedServerConfig } from "../../../utils/ValidatedServerConfig"; import AccessibleButton, { type ButtonEvent } from "../elements/AccessibleButton"; import withValidation, { type IFieldState, type IValidationResult } from "../elements/Validation"; import Field from "../elements/Field"; @@ -28,7 +27,6 @@ interface IProps { phoneCountry: string; phoneNumber: string; - serverConfig: ValidatedServerConfig; loginIncorrect: boolean; disableSubmit?: boolean; busy?: boolean; diff --git a/apps/web/src/components/views/auth/RegistrationForm.tsx b/apps/web/src/components/views/auth/RegistrationForm.tsx index 10b01087e8..0577de31f5 100644 --- a/apps/web/src/components/views/auth/RegistrationForm.tsx +++ b/apps/web/src/components/views/auth/RegistrationForm.tsx @@ -9,7 +9,6 @@ Please see LICENSE files in the repository root for full details. import React, { type JSX, type BaseSyntheticEvent, type ComponentProps, type ReactNode } from "react"; import { type MatrixClient, MatrixError } from "matrix-js-sdk/src/matrix"; -import { logger } from "matrix-js-sdk/src/logger"; import { Button } from "@vector-im/compound-web"; import * as Email from "../../../email"; @@ -19,7 +18,6 @@ import { _t, _td } from "../../../languageHandler"; import SdkConfig from "../../../SdkConfig"; import { SAFE_LOCALPART_REGEX } from "../../../Registration"; import withValidation, { type IFieldState, type IValidationResult } from "../elements/Validation"; -import { type ValidatedServerConfig } from "../../../utils/ValidatedServerConfig"; import EmailField from "./EmailField"; import PassphraseField from "./PassphraseField"; import Field from "../elements/Field"; @@ -56,7 +54,6 @@ interface IProps { flows: { stages: string[]; }[]; - serverConfig: ValidatedServerConfig; canSubmit?: boolean; matrixClient: MatrixClient; mobileRegister?: boolean; @@ -68,7 +65,6 @@ interface IProps { phoneCountry?: string; phoneNumber?: string; }): Promise; - onEditServerDetailsClick?(): void; } interface IState { @@ -95,7 +91,6 @@ export default class RegistrationForm extends React.PureComponent> = ({ )} {displayStatus === BeaconDisplayStatus.Active && beacon && ( <> - <> - {label} - {displayLiveTimeRemaining ? ( - - ) : ( - - )} - + {label} + {displayLiveTimeRemaining ? ( + + ) : ( + + )} )}
diff --git a/apps/web/src/components/views/context_menus/MessageContextMenu.tsx b/apps/web/src/components/views/context_menus/MessageContextMenu.tsx index b6f9821dd4..086301ee57 100644 --- a/apps/web/src/components/views/context_menus/MessageContextMenu.tsx +++ b/apps/web/src/components/views/context_menus/MessageContextMenu.tsx @@ -372,7 +372,6 @@ export default class MessageContextMenu extends React.Component { matrixClient, event: this.props.mxEvent, - getRelationsForEvent: this.props.getRelationsForEvent, }, "mx_Dialog_endPoll", ); diff --git a/apps/web/src/components/views/dialogs/EndPollDialog.tsx b/apps/web/src/components/views/dialogs/EndPollDialog.tsx index bb654fe607..ee27947ce9 100644 --- a/apps/web/src/components/views/dialogs/EndPollDialog.tsx +++ b/apps/web/src/components/views/dialogs/EndPollDialog.tsx @@ -15,13 +15,11 @@ import QuestionDialog from "./QuestionDialog"; import { findTopAnswer } from "../messages/MPollBody"; import Modal from "../../../Modal"; import ErrorDialog from "./ErrorDialog"; -import { type GetRelationsForEvent } from "../rooms/EventTile"; interface IProps { matrixClient: MatrixClient; event: MatrixEvent; onFinished: (success?: boolean) => void; - getRelationsForEvent?: GetRelationsForEvent; } export default class EndPollDialog extends React.Component { diff --git a/apps/web/src/components/views/dialogs/ExportDialog.tsx b/apps/web/src/components/views/dialogs/ExportDialog.tsx index 5767b1202b..d4c19374fe 100644 --- a/apps/web/src/components/views/dialogs/ExportDialog.tsx +++ b/apps/web/src/components/views/dialogs/ExportDialog.tsx @@ -377,16 +377,14 @@ const ExportDialog: React.FC = ({ room, onFinished }) => { )} {setAttachments && ( - <> - setAttachments((e.target as HTMLInputElement).checked)} - > - {_t("export_chat|include_attachments")} - - + setAttachments((e.target as HTMLInputElement).checked)} + > + {_t("export_chat|include_attachments")} + )} {isExporting ? ( diff --git a/apps/web/src/components/views/dialogs/IncomingSasDialog.tsx b/apps/web/src/components/views/dialogs/IncomingSasDialog.tsx index bb210d0d23..f9de078249 100644 --- a/apps/web/src/components/views/dialogs/IncomingSasDialog.tsx +++ b/apps/web/src/components/views/dialogs/IncomingSasDialog.tsx @@ -207,7 +207,6 @@ export default class IncomingSasDialog extends React.Component { onCancel={this.onCancelClick} onDone={this.onSasMatchesClick} isSelf={this.props.verifier.userId === MatrixClientPeg.safeGet().getUserId()} - inDialog={true} /> ); } diff --git a/apps/web/src/components/views/dialogs/InviteProgressBody.tsx b/apps/web/src/components/views/dialogs/InviteProgressBody.tsx index a61c0d5922..628869affe 100644 --- a/apps/web/src/components/views/dialogs/InviteProgressBody.tsx +++ b/apps/web/src/components/views/dialogs/InviteProgressBody.tsx @@ -14,7 +14,7 @@ import { _t } from "../../../languageHandler"; const InviteProgressBody: React.FC = () => { return (
- +

{_t("invite|progress|preparing")}

{_t("invite|progress|dont_close")}
diff --git a/apps/web/src/components/views/dialogs/UserSettingsDialog.tsx b/apps/web/src/components/views/dialogs/UserSettingsDialog.tsx index a0802f8a57..9c7f57f2a1 100644 --- a/apps/web/src/components/views/dialogs/UserSettingsDialog.tsx +++ b/apps/web/src/components/views/dialogs/UserSettingsDialog.tsx @@ -166,7 +166,7 @@ export default function UserSettingsDialog(props: IProps): JSX.Element { UserTab.Preferences, _td("common|preferences"), , - , + , "UserSettingsPreferences", ), ); @@ -206,7 +206,7 @@ export default function UserSettingsDialog(props: IProps): JSX.Element { UserTab.Security, _td("room_settings|security|title"), , - , + , "UserSettingsSecurityPrivacy", ), ); diff --git a/apps/web/src/components/views/dialogs/WidgetCapabilitiesPromptDialog.tsx b/apps/web/src/components/views/dialogs/WidgetCapabilitiesPromptDialog.tsx index 6f71f0762c..157761e217 100644 --- a/apps/web/src/components/views/dialogs/WidgetCapabilitiesPromptDialog.tsx +++ b/apps/web/src/components/views/dialogs/WidgetCapabilitiesPromptDialog.tsx @@ -7,13 +7,7 @@ Please see LICENSE files in the repository root for full details. */ import React, { type ChangeEventHandler } from "react"; -import { - type Capability, - isTimelineCapability, - type Widget, - WidgetEventCapability, - type WidgetKind, -} from "matrix-widget-api"; +import { type Capability, isTimelineCapability, WidgetEventCapability, type WidgetKind } from "matrix-widget-api"; import { lexicographicCompare } from "matrix-js-sdk/src/utils"; import { Form, SettingsToggleInput } from "@vector-im/compound-web"; @@ -26,7 +20,6 @@ import { CapabilityText } from "../../../widgets/CapabilityText"; interface IProps { requestedCapabilities: Set; - widget: Widget; widgetKind: WidgetKind; // TODO: Refactor into the Widget class onFinished(result?: { approved: Capability[]; remember: boolean }): void; } diff --git a/apps/web/src/components/views/elements/AppTile.tsx b/apps/web/src/components/views/elements/AppTile.tsx index 9f3a203666..971d087d84 100644 --- a/apps/web/src/components/views/elements/AppTile.tsx +++ b/apps/web/src/components/views/elements/AppTile.tsx @@ -848,55 +848,53 @@ export default class AppTile extends React.Component { } return ( - -
- {this.props.showMenubar && ( -
- - {this.props.showTitle && this.getTileTitle()} - - - {layoutButtons} - {this.props.showPopout && !this.state.requiresClient && ( - - - - )} - - - - - } - app={this.props.app} - onFinished={this.closeContextMenu} - showUnpin={!this.props.userWidget} - userWidget={this.props.userWidget} - onEditClick={this.props.onEditClick} - onDeleteClick={this.props.onDeleteClick} - menuDisplayed={this.state.menuDisplayed} - /> - - -
- )} - {appTileBody} -
-
+
+ {this.props.showMenubar && ( +
+ + {this.props.showTitle && this.getTileTitle()} + + + {layoutButtons} + {this.props.showPopout && !this.state.requiresClient && ( + + + + )} + + + + + } + app={this.props.app} + onFinished={this.closeContextMenu} + showUnpin={!this.props.userWidget} + userWidget={this.props.userWidget} + onEditClick={this.props.onEditClick} + onDeleteClick={this.props.onDeleteClick} + menuDisplayed={this.state.menuDisplayed} + /> + + +
+ )} + {appTileBody} +
); } } diff --git a/apps/web/src/components/views/elements/Dropdown.tsx b/apps/web/src/components/views/elements/Dropdown.tsx index 6a4af20e94..ead5966e41 100644 --- a/apps/web/src/components/views/elements/Dropdown.tsx +++ b/apps/web/src/components/views/elements/Dropdown.tsx @@ -37,10 +37,6 @@ interface IMenuOptionProps { } class MenuOption extends React.Component { - public static defaultProps = { - disabled: false, - }; - private onMouseEnter = (): void => { this.props.onMouseEnter(this.props.dropdownKey); }; diff --git a/apps/web/src/components/views/elements/InlineSpinner.tsx b/apps/web/src/components/views/elements/InlineSpinner.tsx index cc76e7ff0c..54eca63133 100644 --- a/apps/web/src/components/views/elements/InlineSpinner.tsx +++ b/apps/web/src/components/views/elements/InlineSpinner.tsx @@ -16,8 +16,7 @@ interface IProps { export default class InlineSpinner extends React.PureComponent { public static defaultProps = { - w: 16, - h: 16, + size: 16, }; public render(): React.ReactNode { diff --git a/apps/web/src/components/views/elements/ReplyChain.tsx b/apps/web/src/components/views/elements/ReplyChain.tsx index f082947162..f6642303b7 100644 --- a/apps/web/src/components/views/elements/ReplyChain.tsx +++ b/apps/web/src/components/views/elements/ReplyChain.tsx @@ -15,7 +15,6 @@ import { _t } from "../../../languageHandler"; import dis from "../../../dispatcher/dispatcher"; import { makeUserPermalink, type RoomPermalinkCreator } from "../../../utils/permalinks/Permalinks"; import SettingsStore from "../../../settings/SettingsStore"; -import { type Layout } from "../../../settings/enums/Layout"; import { getUserNameColorClass } from "../../../utils/FormattingUtils"; import { Action } from "../../../dispatcher/actions"; import Spinner from "./Spinner"; @@ -37,8 +36,6 @@ interface IProps { // the latest event in this chain of replies parentEv: MatrixEvent; permalinkCreator?: RoomPermalinkCreator; - // Specifies which layout to use. - layout?: Layout; // Whether to always show a timestamp alwaysShowTimestamps?: boolean; forExport?: boolean; diff --git a/apps/web/src/components/views/location/LocationViewDialog.tsx b/apps/web/src/components/views/location/LocationViewDialog.tsx index ad975a0100..11366d0230 100644 --- a/apps/web/src/components/views/location/LocationViewDialog.tsx +++ b/apps/web/src/components/views/location/LocationViewDialog.tsx @@ -7,7 +7,7 @@ Please see LICENSE files in the repository root for full details. */ import React from "react"; -import { type MatrixEvent, type MatrixClient } from "matrix-js-sdk/src/matrix"; +import { type MatrixEvent } from "matrix-js-sdk/src/matrix"; import BaseDialog from "../dialogs/BaseDialog"; import { locationEventGeoUri, isSelfLocation } from "../../../utils/location"; @@ -16,7 +16,6 @@ import SmartMarker from "./SmartMarker"; import ZoomButtons from "./ZoomButtons"; interface IProps { - matrixClient: MatrixClient; mxEvent: MatrixEvent; onFinished(): void; } diff --git a/apps/web/src/components/views/messages/CallEvent.tsx b/apps/web/src/components/views/messages/CallEvent.tsx index b7eb0be699..85677bda8d 100644 --- a/apps/web/src/components/views/messages/CallEvent.tsx +++ b/apps/web/src/components/views/messages/CallEvent.tsx @@ -18,7 +18,7 @@ import type { ViewRoomPayload } from "../../../dispatcher/payloads/ViewRoomPaylo import { Action } from "../../../dispatcher/actions"; import AccessibleButton, { type AccessibleButtonKind, type ButtonEvent } from "../elements/AccessibleButton"; import MemberAvatar from "../avatars/MemberAvatar"; -import { LiveContentSummary, LiveContentType } from "../rooms/LiveContentSummary"; +import { LiveContentSummary } from "../rooms/LiveContentSummary"; import FacePile from "../elements/FacePile"; import MatrixClientContext from "../../../contexts/MatrixClientContext"; import { CallDuration, SessionDuration } from "../voip/CallDuration"; @@ -66,7 +66,6 @@ const ActiveCallEvent = ({ {_t("timeline|m.call|video_call_started_text", { name: senderName })} { Modal.createDialog( LocationViewDialog, { - matrixClient: this.context, mxEvent: this.props.mxEvent, }, "mx_LocationViewDialog_wrapper", diff --git a/apps/web/src/components/views/polls/PollOption.tsx b/apps/web/src/components/views/polls/PollOption.tsx index 96c21ce60c..9e334b6b57 100644 --- a/apps/web/src/components/views/polls/PollOption.tsx +++ b/apps/web/src/components/views/polls/PollOption.tsx @@ -44,7 +44,7 @@ interface PollOptionProps extends PollOptionContentProps { children?: ReactNode; } -const ActivePollOption: React.FC & { children: ReactNode }> = ({ +const ActivePollOption: React.FC> = ({ pollId, isChecked, isEnded, diff --git a/apps/web/src/components/views/right_panel/BaseCard.tsx b/apps/web/src/components/views/right_panel/BaseCard.tsx index 07ed38b65c..f5d91881bd 100644 --- a/apps/web/src/components/views/right_panel/BaseCard.tsx +++ b/apps/web/src/components/views/right_panel/BaseCard.tsx @@ -31,7 +31,6 @@ interface IProps { onClose?(this: void, ev: MouseEvent): void; onBack?(this: void, ev: MouseEvent): void; onKeyDown?(this: void, ev: KeyboardEvent): void; - cardState?: any; ref?: Ref; // Ref for the 'close' button the card closeButtonRef?: Ref; diff --git a/apps/web/src/components/views/right_panel/EncryptionPanel.tsx b/apps/web/src/components/views/right_panel/EncryptionPanel.tsx index 53cea715e5..82591742f1 100644 --- a/apps/web/src/components/views/right_panel/EncryptionPanel.tsx +++ b/apps/web/src/components/views/right_panel/EncryptionPanel.tsx @@ -167,7 +167,6 @@ const EncryptionPanel: React.FC = (props: IProps) => { member={member} request={request} key={request.transactionId} - inDialog={layout === "dialog"} phase={phase} /> ); diff --git a/apps/web/src/components/views/right_panel/UserInfo.tsx b/apps/web/src/components/views/right_panel/UserInfo.tsx index 2ad8244efc..320ab48c23 100644 --- a/apps/web/src/components/views/right_panel/UserInfo.tsx +++ b/apps/web/src/components/views/right_panel/UserInfo.tsx @@ -24,7 +24,6 @@ import { useIsEncrypted } from "../../../hooks/useIsEncrypted"; import BaseCard from "./BaseCard"; import QuestionDialog from "../dialogs/QuestionDialog"; import RightPanelStore from "../../../stores/right-panel/RightPanelStore"; -import { type IRightPanelCardState } from "../../../stores/right-panel/RightPanelStoreIPanelState"; import PosthogTrackers from "../../../PosthogTrackers"; import { UserInfoHeaderView } from "./user_info/UserInfoHeaderView"; import { UserInfoBasicView } from "./user_info/UserInfoBasicView"; @@ -192,12 +191,6 @@ const UserInfo: React.FC = ({ user, room, onClose, phase = RightPanelPha const classes = ["mx_UserInfo"]; - let cardState: IRightPanelCardState = {}; - // We have no previousPhase for when viewing a UserInfo without a Room at this time - if (room && phase === RightPanelPhases.EncryptionPanel) { - cardState = { member }; - } - const onEncryptionPanelClose = (): void => { RightPanelStore.instance.popCard(); }; @@ -229,14 +222,12 @@ const UserInfo: React.FC = ({ user, room, onClose, phase = RightPanelPha } const header = ( - <> - - + ); return ( @@ -245,7 +236,6 @@ const UserInfo: React.FC = ({ user, room, onClose, phase = RightPanelPha header={_t("common|profile")} onClose={onClose} closeLabel={closeLabel} - cardState={cardState} onBack={(ev: ButtonEvent) => { if (RightPanelStore.instance.previousCard.phase === RightPanelPhases.MemberList) { PosthogTrackers.trackInteraction("WebRightPanelRoomUserInfoBackButton", ev); diff --git a/apps/web/src/components/views/right_panel/VerificationPanel.tsx b/apps/web/src/components/views/right_panel/VerificationPanel.tsx index d369f98d3a..73a23e4d4e 100644 --- a/apps/web/src/components/views/right_panel/VerificationPanel.tsx +++ b/apps/web/src/components/views/right_panel/VerificationPanel.tsx @@ -37,7 +37,6 @@ interface IProps { phase?: Phase; onClose: () => void; isRoomEncrypted: boolean; - inDialog: boolean; } interface IState { @@ -327,7 +326,6 @@ export default class VerificationPanel extends React.PureComponent ) : ( diff --git a/apps/web/src/components/views/room_settings/RoomPublishSetting.tsx b/apps/web/src/components/views/room_settings/RoomPublishSetting.tsx index b23ecfc49c..06afae6d77 100644 --- a/apps/web/src/components/views/room_settings/RoomPublishSetting.tsx +++ b/apps/web/src/components/views/room_settings/RoomPublishSetting.tsx @@ -20,7 +20,6 @@ import { onSubmitPreventDefault } from "../../../utils/form.ts"; interface IProps { roomId: string; - label?: string; canSetCanonicalAlias?: boolean; } diff --git a/apps/web/src/components/views/rooms/EventTile.tsx b/apps/web/src/components/views/rooms/EventTile.tsx index 0be412a8da..3aca86c382 100644 --- a/apps/web/src/components/views/rooms/EventTile.tsx +++ b/apps/web/src/components/views/rooms/EventTile.tsx @@ -1080,7 +1080,6 @@ export class UnwrappedEventTile extends React.Component ref={this.replyChain} forExport={this.props.forExport} permalinkCreator={this.props.permalinkCreator} - layout={this.props.layout} alwaysShowTimestamps={eventTileSnapshot.replyChain.alwaysShowTimestamps} isQuoteExpanded={isQuoteExpanded} setQuoteExpanded={this.setQuoteExpanded} diff --git a/apps/web/src/components/views/rooms/LiveContentSummary.tsx b/apps/web/src/components/views/rooms/LiveContentSummary.tsx index 725830222d..2e5f7d1358 100644 --- a/apps/web/src/components/views/rooms/LiveContentSummary.tsx +++ b/apps/web/src/components/views/rooms/LiveContentSummary.tsx @@ -12,12 +12,7 @@ import { GroupIcon, VideoCallSolidIcon } from "@vector-im/compound-design-tokens import { _t } from "../../../languageHandler"; -export enum LiveContentType { - Video, -} - interface Props { - type: LiveContentType; text: string; active: boolean; participantCount: number; diff --git a/apps/web/src/components/views/rooms/MessageComposer.tsx b/apps/web/src/components/views/rooms/MessageComposer.tsx index 06c843f190..6329326efe 100644 --- a/apps/web/src/components/views/rooms/MessageComposer.tsx +++ b/apps/web/src/components/views/rooms/MessageComposer.tsx @@ -123,7 +123,6 @@ export class MessageComposer extends React.Component { public static defaultProps = { compact: false, - isRichTextEnabled: true, }; public constructor(props: IProps) { diff --git a/apps/web/src/components/views/rooms/MessageComposerFormatBar.tsx b/apps/web/src/components/views/rooms/MessageComposerFormatBar.tsx index 0957aa9721..5430daf582 100644 --- a/apps/web/src/components/views/rooms/MessageComposerFormatBar.tsx +++ b/apps/web/src/components/views/rooms/MessageComposerFormatBar.tsx @@ -64,41 +64,35 @@ export default class MessageComposerFormatBar extends React.PureComponent this.props.onAction(Formatting.Bold)} icon={} shortcut={this.props.shortcuts.bold} - visible={this.state.visible} /> this.props.onAction(Formatting.Italics)} icon={} shortcut={this.props.shortcuts.italics} - visible={this.state.visible} /> this.props.onAction(Formatting.Strikethrough)} icon={} - visible={this.state.visible} /> this.props.onAction(Formatting.Code)} icon={} shortcut={this.props.shortcuts.code} - visible={this.state.visible} /> this.props.onAction(Formatting.Quote)} icon={} shortcut={this.props.shortcuts.quote} - visible={this.state.visible} /> this.props.onAction(Formatting.InsertLink)} icon={} shortcut={this.props.shortcuts.insert_link} - visible={this.state.visible} /> ); @@ -126,7 +120,6 @@ interface IFormatButtonProps { label: string; icon: JSX.Element; shortcut?: string; - visible?: boolean; onClick(): void; } diff --git a/apps/web/src/components/views/rooms/ReadReceiptGroup.tsx b/apps/web/src/components/views/rooms/ReadReceiptGroup.tsx index 8b2d839a1b..e2f039e4d1 100644 --- a/apps/web/src/components/views/rooms/ReadReceiptGroup.tsx +++ b/apps/web/src/components/views/rooms/ReadReceiptGroup.tsx @@ -124,8 +124,6 @@ export function ReadReceiptGroup({ readReceiptPosition={readReceiptPosition} checkUnmounting={checkUnmounting} suppressAnimation={suppressAnimation} - timestamp={receipt.ts} - showTwelveHour={isTwelveHour} /> ); }) diff --git a/apps/web/src/components/views/rooms/ReadReceiptMarker.tsx b/apps/web/src/components/views/rooms/ReadReceiptMarker.tsx index 6b096d8917..91983427f5 100644 --- a/apps/web/src/components/views/rooms/ReadReceiptMarker.tsx +++ b/apps/web/src/components/views/rooms/ReadReceiptMarker.tsx @@ -46,12 +46,6 @@ interface IProps { // unmounted, to avoid unnecessary work. Should return true if we // are being unmounted. checkUnmounting?: () => boolean; - - // Timestamp when the receipt was read - timestamp?: number; - - // True to show twelve hour format, false otherwise - showTwelveHour?: boolean; } interface IState { diff --git a/apps/web/src/components/views/rooms/RoomHeader/RoomHeader.tsx b/apps/web/src/components/views/rooms/RoomHeader/RoomHeader.tsx index ea26b0350a..c79bfb77bb 100644 --- a/apps/web/src/components/views/rooms/RoomHeader/RoomHeader.tsx +++ b/apps/web/src/components/views/rooms/RoomHeader/RoomHeader.tsx @@ -459,93 +459,91 @@ export default function RoomHeader({ }; return ( - <> - - - - {/* We hide this from the tabIndex list as it is a pointer shortcut and superfluous for a11y */} - {/* Disable on-click actions until the room is created */} - - + + + + {/* We hide this from the tabIndex list as it is a pointer shortcut and superfluous for a11y */} {/* Disable on-click actions until the room is created */} - - {/* If the room is local-only then we don't want to show any additional buttons, as it won't work */} - {room instanceof LocalRoom === false && ( - - )} - - {askToJoinEnabled && } - - + {isRoomEncrypted && historyVisibilityIcon(historyVisibility)} + + + + {/* If the room is local-only then we don't want to show any additional buttons, as it won't work */} + {room instanceof LocalRoom === false && ( + + )} + + {askToJoinEnabled && } + ); } diff --git a/apps/web/src/components/views/rooms/RoomPreviewBar.tsx b/apps/web/src/components/views/rooms/RoomPreviewBar.tsx index 2c13861d9b..eae70d61aa 100644 --- a/apps/web/src/components/views/rooms/RoomPreviewBar.tsx +++ b/apps/web/src/components/views/rooms/RoomPreviewBar.tsx @@ -99,11 +99,6 @@ interface IProps { canAskToJoinAndMembershipIsLeave?: boolean; promptAskToJoin?: boolean; - /** - * If true, this will prompt for additional safety options - * like reporting an invite or ignoring the user. - */ - promptRejectionOptions?: boolean; knocked?: boolean; onSubmitAskToJoin?(reason?: string): void; onCancelAskToJoin?(): void; @@ -322,7 +317,6 @@ class RoomPreviewBar extends React.Component { let dangerActionHandler: (() => void) | undefined; let dangerActionLabel: string | undefined; let footer: JSX.Element | undefined; - const extraComponents: JSX.Element[] = []; const messageCase = this.getMessageCase(); switch (messageCase) { @@ -715,13 +709,11 @@ class RoomPreviewBar extends React.Component { <> {dangerActionButton} {secondaryButton} - {extraComponents} {primaryButton} ) : ( <> {primaryButton} - {extraComponents} {secondaryButton} {dangerActionButton} diff --git a/apps/web/src/components/views/rooms/RoomSublist.tsx b/apps/web/src/components/views/rooms/RoomSublist.tsx index 602793a559..4051bc18a4 100644 --- a/apps/web/src/components/views/rooms/RoomSublist.tsx +++ b/apps/web/src/components/views/rooms/RoomSublist.tsx @@ -818,25 +818,23 @@ export default class RoomSublist extends React.Component { }); content = ( - - -
- {visibleTiles} -
- {showNButton} -
-
+ +
+ {visibleTiles} +
+ {showNButton} +
); } else if (this.props.showSkeleton && this.state.isExpanded) { content =
; diff --git a/apps/web/src/components/views/rooms/RoomTile.tsx b/apps/web/src/components/views/rooms/RoomTile.tsx index 74bfc63221..5c4fb91af1 100644 --- a/apps/web/src/components/views/rooms/RoomTile.tsx +++ b/apps/web/src/components/views/rooms/RoomTile.tsx @@ -446,36 +446,34 @@ class RoomTile extends React.PureComponent { } return ( - - - {({ onFocus, isActive, ref }) => ( - - - {titleContainer} - {badge} - {this.renderGeneralMenu()} - {this.renderNotificationsMenu(isActive)} - - )} - - + + {({ onFocus, isActive, ref }) => ( + + + {titleContainer} + {badge} + {this.renderGeneralMenu()} + {this.renderNotificationsMenu(isActive)} + + )} + ); } } diff --git a/apps/web/src/components/views/rooms/RoomTileCallSummary.tsx b/apps/web/src/components/views/rooms/RoomTileCallSummary.tsx index eed7d012e2..32e3b609e5 100644 --- a/apps/web/src/components/views/rooms/RoomTileCallSummary.tsx +++ b/apps/web/src/components/views/rooms/RoomTileCallSummary.tsx @@ -12,7 +12,7 @@ import type { Call } from "../../../models/Call"; import { _t } from "../../../languageHandler"; import { useConnectionState, useParticipantCount } from "../../../hooks/useCall"; import { ConnectionState } from "../../../models/Call"; -import { LiveContentSummary, LiveContentType } from "./LiveContentSummary"; +import { LiveContentSummary } from "./LiveContentSummary"; interface Props { call: Call; @@ -34,12 +34,5 @@ export const RoomTileCallSummary: FC = ({ call }) => { break; } - return ( - - ); + return ; }; diff --git a/apps/web/src/components/views/rooms/VoiceRecordComposerTile.tsx b/apps/web/src/components/views/rooms/VoiceRecordComposerTile.tsx index 9b6bd6ec49..48e7ff4c85 100644 --- a/apps/web/src/components/views/rooms/VoiceRecordComposerTile.tsx +++ b/apps/web/src/components/views/rooms/VoiceRecordComposerTile.tsx @@ -169,11 +169,7 @@ export default class VoiceRecordComposerTile extends React.PureComponent { Modal.createDialog(ErrorDialog, { title: _t("voip|unable_to_access_audio_input_title"), - description: ( - <> -

{_t("voip|unable_to_access_audio_input_description")}

- - ), + description:

{_t("voip|unable_to_access_audio_input_description")}

, }); }; @@ -184,11 +180,7 @@ export default class VoiceRecordComposerTile extends React.PureComponent -

{_t("voip|no_audio_input_description")}

- - ), + description:

{_t("voip|no_audio_input_description")}

, }); return; } @@ -288,7 +280,7 @@ export default class VoiceRecordComposerTile extends React.PureComponent - + ); } else if (this.state.didUploadFail && this.state.recordingPhase === RecordingState.Ended) { diff --git a/apps/web/src/components/views/settings/ChangePassword.tsx b/apps/web/src/components/views/settings/ChangePassword.tsx index 4f925ee9fb..50e3387877 100644 --- a/apps/web/src/components/views/settings/ChangePassword.tsx +++ b/apps/web/src/components/views/settings/ChangePassword.tsx @@ -38,7 +38,6 @@ interface IProps { buttonClassName?: string; buttonKind?: AccessibleButtonKind; buttonLabel?: string; - confirm?: boolean; // Whether to autoFocus the new password input autoFocusNewPasswordInput?: boolean; className?: string; @@ -61,8 +60,6 @@ export default class ChangePassword extends React.Component { public static defaultProps: Partial = { onFinished() {}, onError() {}, - - confirm: true, }; public constructor(props: IProps) { diff --git a/apps/web/src/components/views/settings/discovery/DiscoverySettings.tsx b/apps/web/src/components/views/settings/discovery/DiscoverySettings.tsx index c6535188f3..d263fdeddd 100644 --- a/apps/web/src/components/views/settings/discovery/DiscoverySettings.tsx +++ b/apps/web/src/components/views/settings/discovery/DiscoverySettings.tsx @@ -132,7 +132,6 @@ export const DiscoverySettings: React.FC = () => { <> diff --git a/apps/web/src/components/views/settings/tabs/user/PreferencesUserSettingsTab.tsx b/apps/web/src/components/views/settings/tabs/user/PreferencesUserSettingsTab.tsx index 84febf8e5d..976e1ec2e6 100644 --- a/apps/web/src/components/views/settings/tabs/user/PreferencesUserSettingsTab.tsx +++ b/apps/web/src/components/views/settings/tabs/user/PreferencesUserSettingsTab.tsx @@ -9,6 +9,7 @@ Please see LICENSE files in the repository root for full details. import React, { type ChangeEvent, type JSX, type ReactElement, useCallback, useEffect, useState } from "react"; import { SettingsToggleInput } from "@vector-im/compound-web"; +import { type EmptyObject } from "matrix-js-sdk/src/matrix"; import { type NonEmptyArray } from "../../../../../@types/common"; import { _t, getCurrentLanguage } from "../../../../../languageHandler"; @@ -36,14 +37,9 @@ import { MediaPreviewAccountSettings } from "./MediaPreviewAccountSettings.tsx"; import { InviteRulesAccountSetting } from "./InviteRulesAccountSettings.tsx"; import SettingsDropdown from "../../../elements/SettingsDropdown.tsx"; -interface IProps { - closeSettingsFn(success: boolean): void; -} - interface IState { timezone: string | undefined; timezones: string[]; - timezoneSearch: string | undefined; autocompleteDelay: string; readMarkerInViewThresholdMs: string; readMarkerOutOfViewThresholdMs: string; @@ -120,7 +116,7 @@ const SpellCheckSection: React.FC = () => { ); }; -export default class PreferencesUserSettingsTab extends React.Component { +export default class PreferencesUserSettingsTab extends React.Component { private static ROOM_LIST_SETTINGS: BooleanSettingKey[] = ["breadcrumbs"]; private static SPACES_SETTINGS: BooleanSettingKey[] = ["Spaces.allRoomsInHome"]; @@ -171,13 +167,12 @@ export default class PreferencesUserSettingsTab extends React.Component): void => { diff --git a/apps/web/src/components/views/settings/tabs/user/SecurityUserSettingsTab.tsx b/apps/web/src/components/views/settings/tabs/user/SecurityUserSettingsTab.tsx index f94b2842f8..f10f10e9ce 100644 --- a/apps/web/src/components/views/settings/tabs/user/SecurityUserSettingsTab.tsx +++ b/apps/web/src/components/views/settings/tabs/user/SecurityUserSettingsTab.tsx @@ -8,7 +8,7 @@ Please see LICENSE files in the repository root for full details. import React, { type JSX, type ReactNode } from "react"; import { sleep } from "matrix-js-sdk/src/utils"; -import { type Room, RoomEvent, type IServerVersions } from "matrix-js-sdk/src/matrix"; +import { type Room, RoomEvent, type EmptyObject } from "matrix-js-sdk/src/matrix"; import { KnownMembership, type Membership } from "matrix-js-sdk/src/types"; import { logger } from "matrix-js-sdk/src/logger"; import { WarningIcon } from "@vector-im/compound-design-tokens/assets/web/icons"; @@ -80,22 +80,17 @@ export class IgnoredUser extends React.Component { } } -interface IProps { - closeSettingsFn: () => void; -} - interface IState { ignoredUserIds: string[]; waitingUnignored: string[]; managingInvites: boolean; invitedRoomIds: Set; - versions?: IServerVersions; } -export default class SecurityUserSettingsTab extends React.Component { +export default class SecurityUserSettingsTab extends React.Component { private dispatcherRef?: string; - public constructor(props: IProps) { + public constructor(props: EmptyObject) { super(props); // Get rooms we're invited to @@ -120,9 +115,6 @@ export default class SecurityUserSettingsTab extends React.Component this.setState({ versions })); } public componentWillUnmount(): void { diff --git a/apps/web/src/components/views/terms/InlineTermsAgreement.tsx b/apps/web/src/components/views/terms/InlineTermsAgreement.tsx index 1269e4049a..7bc3e6a7cf 100644 --- a/apps/web/src/components/views/terms/InlineTermsAgreement.tsx +++ b/apps/web/src/components/views/terms/InlineTermsAgreement.tsx @@ -18,7 +18,6 @@ import ExternalLink from "../elements/ExternalLink.tsx"; interface IProps { policiesAndServicePairs: ServicePolicyPair[]; onFinished: (accepted: string[]) => void; - agreedUrls: string[]; // array of URLs the user has accepted introElement: React.ReactNode; } diff --git a/apps/web/src/components/views/verification/VerificationShowSas.tsx b/apps/web/src/components/views/verification/VerificationShowSas.tsx index 84490e556b..45e386510d 100644 --- a/apps/web/src/components/views/verification/VerificationShowSas.tsx +++ b/apps/web/src/components/views/verification/VerificationShowSas.tsx @@ -16,7 +16,6 @@ import { PendingActionSpinner } from "../right_panel/EncryptionInfo"; import AccessibleButton from "../elements/AccessibleButton"; interface IProps { - pending?: boolean; displayName?: string; // required if pending is true /** Details of the other device involved in the verification, if known */ @@ -26,7 +25,6 @@ interface IProps { onCancel: () => void; sas: GeneratedSas; isSelf?: boolean; - inDialog?: boolean; // whether this component is being shown in a dialog and to use DialogButtons } interface IState { diff --git a/apps/web/src/settings/Settings.tsx b/apps/web/src/settings/Settings.tsx index e45784872b..e36cfc6069 100644 --- a/apps/web/src/settings/Settings.tsx +++ b/apps/web/src/settings/Settings.tsx @@ -427,13 +427,11 @@ export const SETTINGS: Settings = { betaInfo: { title: _td("labs|notification_settings_beta_title"), caption: () => ( - <> -

- {_t("labs|notification_settings_beta_caption", { - brand: SdkConfig.get().brand, - })} -

- +

+ {_t("labs|notification_settings_beta_caption", { + brand: SdkConfig.get().brand, + })} +

), }, }, diff --git a/apps/web/src/stores/widgets/ElementWidgetDriver.ts b/apps/web/src/stores/widgets/ElementWidgetDriver.ts index 23ab7cc511..c408d052f5 100644 --- a/apps/web/src/stores/widgets/ElementWidgetDriver.ts +++ b/apps/web/src/stores/widgets/ElementWidgetDriver.ts @@ -281,7 +281,6 @@ export class ElementWidgetDriver extends WidgetDriver { try { const [result] = await Modal.createDialog(WidgetCapabilitiesPromptDialog, { requestedCapabilities: missing, - widget: this.forWidget, widgetKind: this.forWidgetKind, }).finished; result?.approved?.forEach((cap) => allowedSoFar.add(cap)); diff --git a/apps/web/src/toasts/IncomingCallToast.tsx b/apps/web/src/toasts/IncomingCallToast.tsx index 5b79bc5ae0..9a4fa0f0ef 100644 --- a/apps/web/src/toasts/IncomingCallToast.tsx +++ b/apps/web/src/toasts/IncomingCallToast.tsx @@ -86,9 +86,7 @@ const MAX_RING_TIME_MS = 90 * 1000; interface JoinCallButtonWithCallProps { onClick: (e: ButtonEvent) => void; - call: Call | null; disabledTooltip: string | undefined; - isRinging: boolean; } function JoinCallButtonWithCall({ onClick, disabledTooltip }: JoinCallButtonWithCallProps): JSX.Element { @@ -379,8 +377,6 @@ export function IncomingCallToast({ notificationEvent, toastKey }: Props): JSX.E />
diff --git a/apps/web/test/unit-tests/components/structures/LeftPanel-test.tsx b/apps/web/test/unit-tests/components/structures/LeftPanel-test.tsx index 518dc948de..6e03f8b143 100644 --- a/apps/web/test/unit-tests/components/structures/LeftPanel-test.tsx +++ b/apps/web/test/unit-tests/components/structures/LeftPanel-test.tsx @@ -12,7 +12,6 @@ import { render, type RenderResult, screen } from "jest-matrix-react"; import { mocked } from "jest-mock"; import LeftPanel from "../../../../src/components/structures/LeftPanel"; -import PageType from "../../../../src/PageTypes"; import ResizeNotifier from "../../../../src/utils/ResizeNotifier"; import { shouldShowComponent } from "../../../../src/customisations/helpers/UIComponents"; import { UIComponent } from "../../../../src/settings/UIFeature"; @@ -23,9 +22,7 @@ jest.mock("../../../../src/customisations/helpers/UIComponents", () => ({ describe("LeftPanel", () => { function renderComponent(): RenderResult { - return render( - , - ); + return render(); } it("does not show filter container when disabled by UIComponent customisations", () => { diff --git a/apps/web/test/unit-tests/components/views/dialogs/WidgetCapabilitiesPromptDialog-test.tsx b/apps/web/test/unit-tests/components/views/dialogs/WidgetCapabilitiesPromptDialog-test.tsx index 5abc5ed93b..86fde06999 100644 --- a/apps/web/test/unit-tests/components/views/dialogs/WidgetCapabilitiesPromptDialog-test.tsx +++ b/apps/web/test/unit-tests/components/views/dialogs/WidgetCapabilitiesPromptDialog-test.tsx @@ -13,11 +13,6 @@ import WidgetCapabilitiesPromptDialog from "../../../../../src/components/views/ import { stubClient } from "../../../../test-utils"; describe("WidgetCapabilitiesPromptDialog", () => { - const mockWidget = { - id: "test-widget", - name: "Test Widget", - } as any; - const onFinished = jest.fn(); beforeEach(() => { @@ -39,7 +34,6 @@ describe("WidgetCapabilitiesPromptDialog", () => { const { container } = render( , @@ -65,7 +59,6 @@ describe("WidgetCapabilitiesPromptDialog", () => { render( , @@ -85,7 +78,6 @@ describe("WidgetCapabilitiesPromptDialog", () => { const { container } = render( , @@ -104,7 +96,6 @@ describe("WidgetCapabilitiesPromptDialog", () => { const { container } = render( , @@ -120,7 +111,6 @@ describe("WidgetCapabilitiesPromptDialog", () => { const { container } = render( , diff --git a/apps/web/test/unit-tests/components/views/dialogs/__snapshots__/InviteProgressBody-test.tsx.snap b/apps/web/test/unit-tests/components/views/dialogs/__snapshots__/InviteProgressBody-test.tsx.snap index e92e655860..1a6683ab90 100644 --- a/apps/web/test/unit-tests/components/views/dialogs/__snapshots__/InviteProgressBody-test.tsx.snap +++ b/apps/web/test/unit-tests/components/views/dialogs/__snapshots__/InviteProgressBody-test.tsx.snap @@ -15,7 +15,7 @@ exports[`InviteProgressBody should match snapshot 1`] = ` fill="currentColor" height="1em" role="progressbar" - style="width: 20px; height: 20px;" + style="width: 32px; height: 32px;" viewBox="0 0 24 24" width="1em" xmlns="http://www.w3.org/2000/svg" diff --git a/apps/web/test/unit-tests/components/views/dialogs/__snapshots__/RoomSettingsDialog-test.tsx.snap b/apps/web/test/unit-tests/components/views/dialogs/__snapshots__/RoomSettingsDialog-test.tsx.snap index 9521e705b3..4e4f8e03c6 100644 --- a/apps/web/test/unit-tests/components/views/dialogs/__snapshots__/RoomSettingsDialog-test.tsx.snap +++ b/apps/web/test/unit-tests/components/views/dialogs/__snapshots__/RoomSettingsDialog-test.tsx.snap @@ -197,7 +197,7 @@ exports[` poll history displays poll history when tab clic fill="currentColor" height="1em" role="progressbar" - style="width: 20px; height: 20px;" + style="width: 16px; height: 16px;" viewBox="0 0 24 24" width="1em" xmlns="http://www.w3.org/2000/svg" diff --git a/apps/web/test/unit-tests/components/views/polls/pollHistory/__snapshots__/PollHistory-test.tsx.snap b/apps/web/test/unit-tests/components/views/polls/pollHistory/__snapshots__/PollHistory-test.tsx.snap index b14fbe9de2..1202df6249 100644 --- a/apps/web/test/unit-tests/components/views/polls/pollHistory/__snapshots__/PollHistory-test.tsx.snap +++ b/apps/web/test/unit-tests/components/views/polls/pollHistory/__snapshots__/PollHistory-test.tsx.snap @@ -201,7 +201,7 @@ exports[` renders a no polls message and a load more button when fill="currentColor" height="1em" role="progressbar" - style="width: 20px; height: 20px;" + style="width: 16px; height: 16px;" viewBox="0 0 24 24" width="1em" xmlns="http://www.w3.org/2000/svg" diff --git a/apps/web/test/unit-tests/components/views/settings/tabs/user/PreferencesUserSettingsTab-test.tsx b/apps/web/test/unit-tests/components/views/settings/tabs/user/PreferencesUserSettingsTab-test.tsx index 16dde05448..1cd548e4ea 100644 --- a/apps/web/test/unit-tests/components/views/settings/tabs/user/PreferencesUserSettingsTab-test.tsx +++ b/apps/web/test/unit-tests/components/views/settings/tabs/user/PreferencesUserSettingsTab-test.tsx @@ -31,7 +31,7 @@ describe("PreferencesUserSettingsTab", () => { }); const renderTab = (): RenderResult => { - return render( {}} />); + return render(); }; it("should render", () => { diff --git a/apps/web/test/unit-tests/components/views/settings/tabs/user/SecurityUserSettingsTab-test.tsx b/apps/web/test/unit-tests/components/views/settings/tabs/user/SecurityUserSettingsTab-test.tsx index 73276fe15f..4798c48997 100644 --- a/apps/web/test/unit-tests/components/views/settings/tabs/user/SecurityUserSettingsTab-test.tsx +++ b/apps/web/test/unit-tests/components/views/settings/tabs/user/SecurityUserSettingsTab-test.tsx @@ -25,10 +25,6 @@ import { UIFeature } from "../../../../../../../src/settings/UIFeature"; import SettingsStore from "../../../../../../../src/settings/SettingsStore"; describe("", () => { - const defaultProps = { - closeSettingsFn: jest.fn(), - }; - const getIgnoredUsers = jest.fn(); const setIgnoredUsers = jest.fn(); @@ -51,7 +47,7 @@ describe("", () => { const getComponent = () => ( - + );