diff --git a/apps/web/playwright/snapshots/crypto/history-sharing.spec.ts/shared-history-invite-accepted-linux.png b/apps/web/playwright/snapshots/crypto/history-sharing.spec.ts/shared-history-invite-accepted-linux.png index adea2eac4e..e86add8d21 100644 Binary files a/apps/web/playwright/snapshots/crypto/history-sharing.spec.ts/shared-history-invite-accepted-linux.png and b/apps/web/playwright/snapshots/crypto/history-sharing.spec.ts/shared-history-invite-accepted-linux.png differ diff --git a/apps/web/playwright/snapshots/invite/invite-dialog.spec.ts/send-your-first-message-view-linux.png b/apps/web/playwright/snapshots/invite/invite-dialog.spec.ts/send-your-first-message-view-linux.png index 7e795251a8..64260f6086 100644 Binary files a/apps/web/playwright/snapshots/invite/invite-dialog.spec.ts/send-your-first-message-view-linux.png and b/apps/web/playwright/snapshots/invite/invite-dialog.spec.ts/send-your-first-message-view-linux.png differ diff --git a/apps/web/playwright/snapshots/left-panel/room-list-panel/room-list.spec.ts/room-list-item-open-notification-options-selection-linux.png b/apps/web/playwright/snapshots/left-panel/room-list-panel/room-list.spec.ts/room-list-item-open-notification-options-selection-linux.png index 6e13920c3e..8333dc76e7 100644 Binary files a/apps/web/playwright/snapshots/left-panel/room-list-panel/room-list.spec.ts/room-list-item-open-notification-options-selection-linux.png and b/apps/web/playwright/snapshots/left-panel/room-list-panel/room-list.spec.ts/room-list-item-open-notification-options-selection-linux.png differ diff --git a/apps/web/playwright/snapshots/room-directory/room-directory.spec.ts/filtered-one-result-linux.png b/apps/web/playwright/snapshots/room-directory/room-directory.spec.ts/filtered-one-result-linux.png index 41d21f856a..f8872a01fa 100644 Binary files a/apps/web/playwright/snapshots/room-directory/room-directory.spec.ts/filtered-one-result-linux.png and b/apps/web/playwright/snapshots/room-directory/room-directory.spec.ts/filtered-one-result-linux.png differ diff --git a/apps/web/playwright/snapshots/settings/appearance-user-settings-tab/appearance-user-settings-tab.spec.ts/window-after-switch-linux.png b/apps/web/playwright/snapshots/settings/appearance-user-settings-tab/appearance-user-settings-tab.spec.ts/window-after-switch-linux.png index f5c34f1c8a..c1607c9a8f 100644 Binary files a/apps/web/playwright/snapshots/settings/appearance-user-settings-tab/appearance-user-settings-tab.spec.ts/window-after-switch-linux.png and b/apps/web/playwright/snapshots/settings/appearance-user-settings-tab/appearance-user-settings-tab.spec.ts/window-after-switch-linux.png differ diff --git a/apps/web/playwright/snapshots/settings/appearance-user-settings-tab/appearance-user-settings-tab.spec.ts/window-before-switch-linux.png b/apps/web/playwright/snapshots/settings/appearance-user-settings-tab/appearance-user-settings-tab.spec.ts/window-before-switch-linux.png index 5d36c31906..2412bd9963 100644 Binary files a/apps/web/playwright/snapshots/settings/appearance-user-settings-tab/appearance-user-settings-tab.spec.ts/window-before-switch-linux.png and b/apps/web/playwright/snapshots/settings/appearance-user-settings-tab/appearance-user-settings-tab.spec.ts/window-before-switch-linux.png differ diff --git a/apps/web/playwright/snapshots/timeline/event-list-summary.spec.ts/bot-joined-the-room-linux.png b/apps/web/playwright/snapshots/timeline/event-list-summary.spec.ts/bot-joined-the-room-linux.png index 8f3f0998ed..575d9e75d8 100644 Binary files a/apps/web/playwright/snapshots/timeline/event-list-summary.spec.ts/bot-joined-the-room-linux.png and b/apps/web/playwright/snapshots/timeline/event-list-summary.spec.ts/bot-joined-the-room-linux.png differ diff --git a/apps/web/playwright/snapshots/timeline/event-list-summary.spec.ts/bot-was-banned-linux.png b/apps/web/playwright/snapshots/timeline/event-list-summary.spec.ts/bot-was-banned-linux.png index d6aa806afa..d7b9dd5159 100644 Binary files a/apps/web/playwright/snapshots/timeline/event-list-summary.spec.ts/bot-was-banned-linux.png and b/apps/web/playwright/snapshots/timeline/event-list-summary.spec.ts/bot-was-banned-linux.png differ diff --git a/apps/web/playwright/snapshots/timeline/event-list-summary.spec.ts/multiple-join-ban-messages-linux.png b/apps/web/playwright/snapshots/timeline/event-list-summary.spec.ts/multiple-join-ban-messages-linux.png index e854c65166..3547d34a98 100644 Binary files a/apps/web/playwright/snapshots/timeline/event-list-summary.spec.ts/multiple-join-ban-messages-linux.png and b/apps/web/playwright/snapshots/timeline/event-list-summary.spec.ts/multiple-join-ban-messages-linux.png differ diff --git a/apps/web/playwright/snapshots/timeline/event-list-summary.spec.ts/multiple-join-leave-messages-linux.png b/apps/web/playwright/snapshots/timeline/event-list-summary.spec.ts/multiple-join-leave-messages-linux.png index 7b06c2cdb3..d862cf71e7 100644 Binary files a/apps/web/playwright/snapshots/timeline/event-list-summary.spec.ts/multiple-join-leave-messages-linux.png and b/apps/web/playwright/snapshots/timeline/event-list-summary.spec.ts/multiple-join-leave-messages-linux.png differ diff --git a/apps/web/playwright/snapshots/timeline/event-list-summary.spec.ts/multiple-people-ban-messages-expanded-linux.png b/apps/web/playwright/snapshots/timeline/event-list-summary.spec.ts/multiple-people-ban-messages-expanded-linux.png index cd6ae7bec1..959f84157b 100644 Binary files a/apps/web/playwright/snapshots/timeline/event-list-summary.spec.ts/multiple-people-ban-messages-expanded-linux.png and b/apps/web/playwright/snapshots/timeline/event-list-summary.spec.ts/multiple-people-ban-messages-expanded-linux.png differ diff --git a/apps/web/playwright/snapshots/timeline/event-list-summary.spec.ts/multiple-people-ban-messages-linux.png b/apps/web/playwright/snapshots/timeline/event-list-summary.spec.ts/multiple-people-ban-messages-linux.png index 3e00f1f1f3..c60aa4ffd6 100644 Binary files a/apps/web/playwright/snapshots/timeline/event-list-summary.spec.ts/multiple-people-ban-messages-linux.png and b/apps/web/playwright/snapshots/timeline/event-list-summary.spec.ts/multiple-people-ban-messages-linux.png differ diff --git a/apps/web/playwright/snapshots/timeline/event-list-summary.spec.ts/multiple-people-join-leave-messages-expanded-linux.png b/apps/web/playwright/snapshots/timeline/event-list-summary.spec.ts/multiple-people-join-leave-messages-expanded-linux.png index ad3a446fb1..224584c3cd 100644 Binary files a/apps/web/playwright/snapshots/timeline/event-list-summary.spec.ts/multiple-people-join-leave-messages-expanded-linux.png and b/apps/web/playwright/snapshots/timeline/event-list-summary.spec.ts/multiple-people-join-leave-messages-expanded-linux.png differ diff --git a/apps/web/playwright/snapshots/timeline/event-list-summary.spec.ts/multiple-people-join-leave-messages-linux.png b/apps/web/playwright/snapshots/timeline/event-list-summary.spec.ts/multiple-people-join-leave-messages-linux.png index b8c2499868..07c2931a70 100644 Binary files a/apps/web/playwright/snapshots/timeline/event-list-summary.spec.ts/multiple-people-join-leave-messages-linux.png and b/apps/web/playwright/snapshots/timeline/event-list-summary.spec.ts/multiple-people-join-leave-messages-linux.png differ diff --git a/apps/web/playwright/snapshots/timeline/timeline.spec.ts/collapsed-gels-and-messages-irc-layout-linux.png b/apps/web/playwright/snapshots/timeline/timeline.spec.ts/collapsed-gels-and-messages-irc-layout-linux.png index 4184b312b3..7f0e38c9cd 100644 Binary files a/apps/web/playwright/snapshots/timeline/timeline.spec.ts/collapsed-gels-and-messages-irc-layout-linux.png and b/apps/web/playwright/snapshots/timeline/timeline.spec.ts/collapsed-gels-and-messages-irc-layout-linux.png differ diff --git a/apps/web/playwright/snapshots/timeline/timeline.spec.ts/collapsed-gels-bubble-layout-linux.png b/apps/web/playwright/snapshots/timeline/timeline.spec.ts/collapsed-gels-bubble-layout-linux.png index 2bb0c86268..17efeabdf8 100644 Binary files a/apps/web/playwright/snapshots/timeline/timeline.spec.ts/collapsed-gels-bubble-layout-linux.png and b/apps/web/playwright/snapshots/timeline/timeline.spec.ts/collapsed-gels-bubble-layout-linux.png differ diff --git a/apps/web/playwright/snapshots/timeline/timeline.spec.ts/configured-room-irc-layout-linux.png b/apps/web/playwright/snapshots/timeline/timeline.spec.ts/configured-room-irc-layout-linux.png index 7bb4da1f76..8f425c6f32 100644 Binary files a/apps/web/playwright/snapshots/timeline/timeline.spec.ts/configured-room-irc-layout-linux.png and b/apps/web/playwright/snapshots/timeline/timeline.spec.ts/configured-room-irc-layout-linux.png differ diff --git a/apps/web/playwright/snapshots/timeline/timeline.spec.ts/event-line-inline-start-margin-irc-layout-linux.png b/apps/web/playwright/snapshots/timeline/timeline.spec.ts/event-line-inline-start-margin-irc-layout-linux.png index af2e2dc1f6..f9a78309d0 100644 Binary files a/apps/web/playwright/snapshots/timeline/timeline.spec.ts/event-line-inline-start-margin-irc-layout-linux.png and b/apps/web/playwright/snapshots/timeline/timeline.spec.ts/event-line-inline-start-margin-irc-layout-linux.png differ diff --git a/apps/web/playwright/snapshots/timeline/timeline.spec.ts/event-tiles-bubble-layout-linux.png b/apps/web/playwright/snapshots/timeline/timeline.spec.ts/event-tiles-bubble-layout-linux.png index 7907870775..b533e892f5 100644 Binary files a/apps/web/playwright/snapshots/timeline/timeline.spec.ts/event-tiles-bubble-layout-linux.png and b/apps/web/playwright/snapshots/timeline/timeline.spec.ts/event-tiles-bubble-layout-linux.png differ diff --git a/apps/web/playwright/snapshots/timeline/timeline.spec.ts/event-tiles-compact-modern-layout-linux.png b/apps/web/playwright/snapshots/timeline/timeline.spec.ts/event-tiles-compact-modern-layout-linux.png index 669c1bc2f2..3ad52e2273 100644 Binary files a/apps/web/playwright/snapshots/timeline/timeline.spec.ts/event-tiles-compact-modern-layout-linux.png and b/apps/web/playwright/snapshots/timeline/timeline.spec.ts/event-tiles-compact-modern-layout-linux.png differ diff --git a/apps/web/playwright/snapshots/timeline/timeline.spec.ts/event-tiles-irc-layout-linux.png b/apps/web/playwright/snapshots/timeline/timeline.spec.ts/event-tiles-irc-layout-linux.png index 31af6f9c6f..94dd3d14b9 100644 Binary files a/apps/web/playwright/snapshots/timeline/timeline.spec.ts/event-tiles-irc-layout-linux.png and b/apps/web/playwright/snapshots/timeline/timeline.spec.ts/event-tiles-irc-layout-linux.png differ diff --git a/apps/web/playwright/snapshots/timeline/timeline.spec.ts/event-tiles-modern-layout-linux.png b/apps/web/playwright/snapshots/timeline/timeline.spec.ts/event-tiles-modern-layout-linux.png index 90e669dd8d..beb55055f9 100644 Binary files a/apps/web/playwright/snapshots/timeline/timeline.spec.ts/event-tiles-modern-layout-linux.png and b/apps/web/playwright/snapshots/timeline/timeline.spec.ts/event-tiles-modern-layout-linux.png differ diff --git a/apps/web/playwright/snapshots/timeline/timeline.spec.ts/expanded-gels-and-messages-irc-layout-linux.png b/apps/web/playwright/snapshots/timeline/timeline.spec.ts/expanded-gels-and-messages-irc-layout-linux.png index 3fe3760f94..033e180267 100644 Binary files a/apps/web/playwright/snapshots/timeline/timeline.spec.ts/expanded-gels-and-messages-irc-layout-linux.png and b/apps/web/playwright/snapshots/timeline/timeline.spec.ts/expanded-gels-and-messages-irc-layout-linux.png differ diff --git a/apps/web/playwright/snapshots/timeline/timeline.spec.ts/expanded-gels-bubble-layout-linux.png b/apps/web/playwright/snapshots/timeline/timeline.spec.ts/expanded-gels-bubble-layout-linux.png index 65e6bc082b..6d413aaf21 100644 Binary files a/apps/web/playwright/snapshots/timeline/timeline.spec.ts/expanded-gels-bubble-layout-linux.png and b/apps/web/playwright/snapshots/timeline/timeline.spec.ts/expanded-gels-bubble-layout-linux.png differ diff --git a/apps/web/playwright/snapshots/timeline/timeline.spec.ts/expanded-gels-emote-irc-layout-linux.png b/apps/web/playwright/snapshots/timeline/timeline.spec.ts/expanded-gels-emote-irc-layout-linux.png index 461e0b94b4..620757c1ff 100644 Binary files a/apps/web/playwright/snapshots/timeline/timeline.spec.ts/expanded-gels-emote-irc-layout-linux.png and b/apps/web/playwright/snapshots/timeline/timeline.spec.ts/expanded-gels-emote-irc-layout-linux.png differ diff --git a/apps/web/playwright/snapshots/timeline/timeline.spec.ts/expanded-gels-irc-layout-linux.png b/apps/web/playwright/snapshots/timeline/timeline.spec.ts/expanded-gels-irc-layout-linux.png index af2e2dc1f6..f9a78309d0 100644 Binary files a/apps/web/playwright/snapshots/timeline/timeline.spec.ts/expanded-gels-irc-layout-linux.png and b/apps/web/playwright/snapshots/timeline/timeline.spec.ts/expanded-gels-irc-layout-linux.png differ diff --git a/apps/web/playwright/snapshots/timeline/timeline.spec.ts/expanded-gels-modern-layout-linux.png b/apps/web/playwright/snapshots/timeline/timeline.spec.ts/expanded-gels-modern-layout-linux.png index 2db0d572c2..1402063050 100644 Binary files a/apps/web/playwright/snapshots/timeline/timeline.spec.ts/expanded-gels-modern-layout-linux.png and b/apps/web/playwright/snapshots/timeline/timeline.spec.ts/expanded-gels-modern-layout-linux.png differ diff --git a/apps/web/playwright/snapshots/timeline/timeline.spec.ts/expanded-gels-redaction-placeholder-linux.png b/apps/web/playwright/snapshots/timeline/timeline.spec.ts/expanded-gels-redaction-placeholder-linux.png index 2436e205c6..4bd886cca9 100644 Binary files a/apps/web/playwright/snapshots/timeline/timeline.spec.ts/expanded-gels-redaction-placeholder-linux.png and b/apps/web/playwright/snapshots/timeline/timeline.spec.ts/expanded-gels-redaction-placeholder-linux.png differ diff --git a/apps/web/playwright/snapshots/timeline/timeline.spec.ts/hidden-event-line-padding-modern-layout-linux.png b/apps/web/playwright/snapshots/timeline/timeline.spec.ts/hidden-event-line-padding-modern-layout-linux.png index ebe765cc4e..2085fd239c 100644 Binary files a/apps/web/playwright/snapshots/timeline/timeline.spec.ts/hidden-event-line-padding-modern-layout-linux.png and b/apps/web/playwright/snapshots/timeline/timeline.spec.ts/hidden-event-line-padding-modern-layout-linux.png differ diff --git a/apps/web/playwright/snapshots/timeline/timeline.spec.ts/hidden-event-line-zero-padding-irc-layout-linux.png b/apps/web/playwright/snapshots/timeline/timeline.spec.ts/hidden-event-line-zero-padding-irc-layout-linux.png index bf70a9c99b..4b20bd6adc 100644 Binary files a/apps/web/playwright/snapshots/timeline/timeline.spec.ts/hidden-event-line-zero-padding-irc-layout-linux.png and b/apps/web/playwright/snapshots/timeline/timeline.spec.ts/hidden-event-line-zero-padding-irc-layout-linux.png differ diff --git a/apps/web/src/viewmodels/room/RoomUploadViewModel.tsx b/apps/web/src/viewmodels/room/RoomUploadViewModel.tsx index 2410e364d1..0a034ce7a3 100644 --- a/apps/web/src/viewmodels/room/RoomUploadViewModel.tsx +++ b/apps/web/src/viewmodels/room/RoomUploadViewModel.tsx @@ -233,9 +233,6 @@ export function RoomUploadContextProvider({ "timelineRenderingType", "replyToEvent", ); - if (!room) { - throw new Error("RoomUploadContextProvider must have a room"); - } const client = useMatrixClientContext(); const uploadInput = useRef(null); @@ -246,19 +243,21 @@ export function RoomUploadContextProvider({ uploadInput.current.click(); }, [uploadInput]); - const vm = useCreateAutoDisposedViewModel( - () => - new RoomUploadViewModel( - room, - client, - // Checked earlier - timelineRenderingType, - defaultDispatcher, - replyToEvent, - threadRelation, - openFilePicker, - ), - ); + const vm = useCreateAutoDisposedViewModel(() => { + if (!room) { + throw new Error("RoomUploadContextProvider must have a room"); + } + return new RoomUploadViewModel( + room, + client, + // Checked earlier + timelineRenderingType, + defaultDispatcher, + replyToEvent, + threadRelation, + openFilePicker, + ); + }); useEffect(() => { vm.setReplyToEvent(replyToEvent); diff --git a/apps/web/test/viewmodels/room/RoomUploadViewModel-test.ts b/apps/web/test/viewmodels/room/RoomUploadViewModel-test.ts index 25b727e051..45fdf7fa98 100644 --- a/apps/web/test/viewmodels/room/RoomUploadViewModel-test.ts +++ b/apps/web/test/viewmodels/room/RoomUploadViewModel-test.ts @@ -64,7 +64,7 @@ describe("RoomUploadViewModel", () => { () => {}, compApi, ); - const onSelected = jest.fn(); + const onSelected: ComposerF = jest.fn(); const icon = { myicon: 5 } as any; compApi.addFileUploadOption({ type: "org.example.test", @@ -74,10 +74,14 @@ describe("RoomUploadViewModel", () => { }); expect(vm.getSnapshot().options).toContainEqual({ type: "org.example.test", label: "My uploader", icon }); vm.onUploadOptionSelected("org.example.test"); - expect(onSelected).toHaveBeenCalledWith(room.roomId, { - inReplyToEventId: replyEv.getId(), - relType: "any_type", - }); + expect(onSelected).toHaveBeenCalledWith( + room.roomId, + { view: "room" }, + { + inReplyToEventId: replyEv.getId(), + relType: "any_type", + }, + ); }); describe("uploads via input", () => {