From 6581d64618564504c25630e6e274831802994796 Mon Sep 17 00:00:00 2001 From: David Baker Date: Tue, 19 Sep 2023 17:42:17 +0100 Subject: [PATCH 1/7] Use the room ID as the react key room alias doesn't work now some rooms don't have aliases. --- src/home/CallList.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/home/CallList.tsx b/src/home/CallList.tsx index a82e4c13..c0b69054 100644 --- a/src/home/CallList.tsx +++ b/src/home/CallList.tsx @@ -34,9 +34,9 @@ export function CallList({ rooms, client }: CallListProps) { return ( <>
- {rooms.map(({ room, roomAlias, roomName, avatarUrl, participants }) => ( + {rooms.map(({ room, roomName, avatarUrl, participants }) => ( Date: Tue, 19 Sep 2023 18:00:09 +0100 Subject: [PATCH 2/7] Well, half of the line changes were correct. --- src/home/CallList.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/home/CallList.tsx b/src/home/CallList.tsx index c0b69054..bdc423cd 100644 --- a/src/home/CallList.tsx +++ b/src/home/CallList.tsx @@ -36,7 +36,7 @@ export function CallList({ rooms, client }: CallListProps) {
{rooms.map(({ room, roomName, avatarUrl, participants }) => ( Date: Tue, 19 Sep 2023 18:26:08 +0100 Subject: [PATCH 3/7] Don't include the brand name Co-authored-by: Robin --- src/room/GroupCallLoader.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/room/GroupCallLoader.tsx b/src/room/GroupCallLoader.tsx index cca495a4..301dcbdf 100644 --- a/src/room/GroupCallLoader.tsx +++ b/src/room/GroupCallLoader.tsx @@ -60,7 +60,7 @@ export function GroupCallLoader({

{t("Call not found")}

{t( - "Element Calls are now end-to-end encrypted and need to be explicitly created. This helps make sure everyone's using the same encryption key." + "Calls are now end-to-end encrypted and need to be created from the home page. This helps make sure everyone's using the same encryption key." )}

{/* XXX: A 'create it for me' button would be the obvious UX here. Two screens already have From e604c7bcaec6617b28e5aebb5f3f3af67b3bbc75 Mon Sep 17 00:00:00 2001 From: David Baker Date: Tue, 19 Sep 2023 18:26:23 +0100 Subject: [PATCH 4/7] i18n --- public/locales/en-GB/app.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/locales/en-GB/app.json b/public/locales/en-GB/app.json index d4a65549..f14af673 100644 --- a/public/locales/en-GB/app.json +++ b/public/locales/en-GB/app.json @@ -22,6 +22,7 @@ "By clicking \"Join call now\", you agree to our <2>End User Licensing Agreement (EULA)": "By clicking \"Join call now\", you agree to our <2>End User Licensing Agreement (EULA)", "By participating in this beta, you consent to the collection of anonymous data, which we use to improve the product. You can find more information about which data we track in our <2>Privacy Policy and our <5>Cookie Policy.": "By participating in this beta, you consent to the collection of anonymous data, which we use to improve the product. You can find more information about which data we track in our <2>Privacy Policy and our <5>Cookie Policy.", "Call not found": "Call not found", + "Calls are now end-to-end encrypted and need to be created from the home page. This helps make sure everyone's using the same encryption key.": "Calls are now end-to-end encrypted and need to be created from the home page. This helps make sure everyone's using the same encryption key.", "Camera": "Camera", "Close": "Close", "Confirm password": "Confirm password", @@ -39,7 +40,6 @@ "Download debug logs": "Download debug logs", "Element Call Home": "Element Call Home", "Element Call is temporarily not end-to-end encrypted while we test scalability.": "Element Call is temporarily not end-to-end encrypted while we test scalability.", - "Element Calls are now end-to-end encrypted and need to be explicitly created. This helps make sure everyone's using the same encryption key.": "Element Calls are now end-to-end encrypted and need to be explicitly created. This helps make sure everyone's using the same encryption key.", "Enable end-to-end encryption (password protected calls)": "Enable end-to-end encryption (password protected calls)", "Encrypted": "Encrypted", "End call": "End call", From a268a804bb4e9d8b1197a35d9c450441e1bbad17 Mon Sep 17 00:00:00 2001 From: David Baker Date: Tue, 19 Sep 2023 18:27:53 +0100 Subject: [PATCH 5/7] Use compound components --- src/room/GroupCallLoader.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/room/GroupCallLoader.tsx b/src/room/GroupCallLoader.tsx index 301dcbdf..17036ee1 100644 --- a/src/room/GroupCallLoader.tsx +++ b/src/room/GroupCallLoader.tsx @@ -20,7 +20,7 @@ import { useTranslation } from "react-i18next"; import { MatrixRTCSession } from "matrix-js-sdk/src/matrixrtc/MatrixRTCSession"; import { MatrixError } from "matrix-js-sdk"; import { useHistory } from "react-router-dom"; -import { Link } from "@vector-im/compound-web"; +import { Heading, Link, Text } from "@vector-im/compound-web"; import { useLoadGroupCall } from "./useLoadGroupCall"; import { ErrorView, FullScreenView } from "../FullScreenView"; @@ -57,12 +57,12 @@ export function GroupCallLoader({ if ((groupCallState.error as MatrixError).errcode === "M_NOT_FOUND") { return ( -

{t("Call not found")}

-

+ {t("Call not found")} + {t( "Calls are now end-to-end encrypted and need to be created from the home page. This helps make sure everyone's using the same encryption key." )} -

+ {/* XXX: A 'create it for me' button would be the obvious UX here. Two screens already have dupes of this flow, let's make a common component and put it here. */} From f33170f5f4aaf3292203e2e8128913db7bace5e7 Mon Sep 17 00:00:00 2001 From: David Baker Date: Tue, 19 Sep 2023 18:29:09 +0100 Subject: [PATCH 6/7] Don't reload the page --- src/room/GroupCallLoader.tsx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/room/GroupCallLoader.tsx b/src/room/GroupCallLoader.tsx index 17036ee1..c9761c2c 100644 --- a/src/room/GroupCallLoader.tsx +++ b/src/room/GroupCallLoader.tsx @@ -42,7 +42,13 @@ export function GroupCallLoader({ const groupCallState = useLoadGroupCall(client, roomIdOrAlias, viaServers); const history = useHistory(); - const onHomeClick = useCallback(() => history.push("/"), [history]); + const onHomeClick = useCallback( + (ev: Event) => { + ev.preventDefault(); + history.push("/"); + }, + [history] + ); switch (groupCallState.kind) { case "loading": From aab27ae616f8bfc997e2a95b1e125431c3dfd3d5 Mon Sep 17 00:00:00 2001 From: David Baker Date: Tue, 19 Sep 2023 18:36:51 +0100 Subject: [PATCH 7/7] Wrong mouse event --- src/room/GroupCallLoader.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/room/GroupCallLoader.tsx b/src/room/GroupCallLoader.tsx index c9761c2c..c61f4ca4 100644 --- a/src/room/GroupCallLoader.tsx +++ b/src/room/GroupCallLoader.tsx @@ -43,7 +43,7 @@ export function GroupCallLoader({ const history = useHistory(); const onHomeClick = useCallback( - (ev: Event) => { + (ev: React.MouseEvent) => { ev.preventDefault(); history.push("/"); },