From 4a0e3c50ffdfb044fda51c1628effbfeaabbfe0f Mon Sep 17 00:00:00 2001 From: Kerry Archibald Date: Mon, 4 Apr 2022 17:17:22 +0200 Subject: [PATCH 01/27] extract location markers into generic Marker Signed-off-by: Kerry Archibald --- src/components/views/location/Marker.tsx | 5 ++--- .../views/location/__snapshots__/Marker-test.tsx.snap | 4 ++-- .../location/__snapshots__/SmartMarker-test.tsx.snap | 8 ++++---- 3 files changed, 8 insertions(+), 9 deletions(-) diff --git a/src/components/views/location/Marker.tsx b/src/components/views/location/Marker.tsx index bacade71cf4..7978e0d5330 100644 --- a/src/components/views/location/Marker.tsx +++ b/src/components/views/location/Marker.tsx @@ -33,10 +33,9 @@ interface Props { /** * Generic location marker */ -const Marker = React.forwardRef(({ id, roomMember, useMemberColor }, ref) => { +const Marker: React.FC = ({ id, roomMember, useMemberColor }) => { const memberColorClass = useMemberColor && roomMember ? getUserNameColorClass(roomMember.userId) : ''; return
(({ id, roomMember, useMem }
; -}); +}; export default Marker; diff --git a/test/components/views/location/__snapshots__/Marker-test.tsx.snap b/test/components/views/location/__snapshots__/Marker-test.tsx.snap index b7596d1af8a..8030f6448e1 100644 --- a/test/components/views/location/__snapshots__/Marker-test.tsx.snap +++ b/test/components/views/location/__snapshots__/Marker-test.tsx.snap @@ -1,7 +1,7 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[` renders with location icon when no room member 1`] = ` -
renders with location icon when no room member 1`] = ` />
-
+
`; diff --git a/test/components/views/location/__snapshots__/SmartMarker-test.tsx.snap b/test/components/views/location/__snapshots__/SmartMarker-test.tsx.snap index 064b3ccff66..a8bd04a76ab 100644 --- a/test/components/views/location/__snapshots__/SmartMarker-test.tsx.snap +++ b/test/components/views/location/__snapshots__/SmartMarker-test.tsx.snap @@ -18,7 +18,7 @@ exports[` creates a marker on mount 1`] = ` } } > - +
@@ -30,7 +30,7 @@ exports[` creates a marker on mount 1`] = ` />
-
+
`; @@ -52,7 +52,7 @@ exports[` removes marker on unmount 1`] = ` } } > - +
@@ -64,6 +64,6 @@ exports[` removes marker on unmount 1`] = ` />
-
+
`; From ee7c9220cd46dc7a100a4514607641a0e4f4ea92 Mon Sep 17 00:00:00 2001 From: Kerry Archibald Date: Tue, 5 Apr 2022 16:47:56 +0200 Subject: [PATCH 02/27] wrap marker in smartmarker Signed-off-by: Kerry Archibald --- src/components/views/location/Marker.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/components/views/location/Marker.tsx b/src/components/views/location/Marker.tsx index 7978e0d5330..bacade71cf4 100644 --- a/src/components/views/location/Marker.tsx +++ b/src/components/views/location/Marker.tsx @@ -33,9 +33,10 @@ interface Props { /** * Generic location marker */ -const Marker: React.FC = ({ id, roomMember, useMemberColor }) => { +const Marker = React.forwardRef(({ id, roomMember, useMemberColor }, ref) => { const memberColorClass = useMemberColor && roomMember ? getUserNameColorClass(roomMember.userId) : ''; return
= ({ id, roomMember, useMemberColor }) => { }
; -}; +}); export default Marker; From b8237e621a733db8eaf8bc0e2bf608f8b4f213ed Mon Sep 17 00:00:00 2001 From: Kerry Archibald Date: Tue, 5 Apr 2022 17:17:04 +0200 Subject: [PATCH 03/27] test smartmarker Signed-off-by: Kerry Archibald --- .../views/location/__snapshots__/Marker-test.tsx.snap | 4 ++-- .../location/__snapshots__/SmartMarker-test.tsx.snap | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/test/components/views/location/__snapshots__/Marker-test.tsx.snap b/test/components/views/location/__snapshots__/Marker-test.tsx.snap index 8030f6448e1..b7596d1af8a 100644 --- a/test/components/views/location/__snapshots__/Marker-test.tsx.snap +++ b/test/components/views/location/__snapshots__/Marker-test.tsx.snap @@ -1,7 +1,7 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[` renders with location icon when no room member 1`] = ` -
renders with location icon when no room member 1`] = ` />
-
+ `; diff --git a/test/components/views/location/__snapshots__/SmartMarker-test.tsx.snap b/test/components/views/location/__snapshots__/SmartMarker-test.tsx.snap index a8bd04a76ab..064b3ccff66 100644 --- a/test/components/views/location/__snapshots__/SmartMarker-test.tsx.snap +++ b/test/components/views/location/__snapshots__/SmartMarker-test.tsx.snap @@ -18,7 +18,7 @@ exports[` creates a marker on mount 1`] = ` } } > - +
@@ -30,7 +30,7 @@ exports[` creates a marker on mount 1`] = ` />
-
+
`; @@ -52,7 +52,7 @@ exports[` removes marker on unmount 1`] = ` } } > - +
@@ -64,6 +64,6 @@ exports[` removes marker on unmount 1`] = ` />
-
+
`; From 76bf7f5dfcfd967679fef17379ff8055ab51a29d Mon Sep 17 00:00:00 2001 From: Kerry Archibald Date: Tue, 5 Apr 2022 18:13:13 +0200 Subject: [PATCH 04/27] working map in location body Signed-off-by: Kerry Archibald --- res/css/_components.scss | 1 + res/css/components/views/location/_Map.scss | 18 ++++++++++++++++++ res/css/views/messages/_MLocationBody.scss | 2 ++ src/components/views/location/SmartMarker.tsx | 2 ++ 4 files changed, 23 insertions(+) create mode 100644 res/css/components/views/location/_Map.scss diff --git a/res/css/_components.scss b/res/css/_components.scss index 79efb3e89bc..c38b0df4b5b 100644 --- a/res/css/_components.scss +++ b/res/css/_components.scss @@ -9,6 +9,7 @@ @import "./components/views/beacon/_StyledLiveBeaconIcon.scss"; @import "./components/views/location/_LiveDurationDropdown.scss"; @import "./components/views/location/_LocationShareMenu.scss"; +@import "./components/views/location/_Map.scss"; @import "./components/views/location/_MapError.scss"; @import "./components/views/location/_Marker.scss"; @import "./components/views/location/_ShareDialogButtons.scss"; diff --git a/res/css/components/views/location/_Map.scss b/res/css/components/views/location/_Map.scss new file mode 100644 index 00000000000..4744848a99a --- /dev/null +++ b/res/css/components/views/location/_Map.scss @@ -0,0 +1,18 @@ +/* +Copyright 2022 The Matrix.org Foundation C.I.C. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +.mx_Map { +} diff --git a/res/css/views/messages/_MLocationBody.scss b/res/css/views/messages/_MLocationBody.scss index 9c7e2767d74..d97a689e21d 100644 --- a/res/css/views/messages/_MLocationBody.scss +++ b/res/css/views/messages/_MLocationBody.scss @@ -15,6 +15,8 @@ limitations under the License. */ .mx_MLocationBody { + width: 450px; + height: 300px; .mx_MLocationBody_map { width: 450px; height: 300px; diff --git a/src/components/views/location/SmartMarker.tsx b/src/components/views/location/SmartMarker.tsx index 29207eb6e35..aedb6e123ce 100644 --- a/src/components/views/location/SmartMarker.tsx +++ b/src/components/views/location/SmartMarker.tsx @@ -72,6 +72,8 @@ interface SmartMarkerProps { const SmartMarker: React.FC = ({ id, map, geoUri, roomMember, useMemberColor }) => { const { onElementRef } = useMapMarker(map, geoUri); + console.log('hhhh ', id); + return Date: Tue, 5 Apr 2022 20:03:49 +0200 Subject: [PATCH 05/27] remove skinned sdk Signed-off-by: Kerry Archibald --- src/components/views/messages/MLocationBody.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/views/messages/MLocationBody.tsx b/src/components/views/messages/MLocationBody.tsx index 94abc1c7a88..40197e4dc6c 100644 --- a/src/components/views/messages/MLocationBody.tsx +++ b/src/components/views/messages/MLocationBody.tsx @@ -98,10 +98,10 @@ export const LocationBodyFallbackContent: React.FC<{ event: MatrixEvent, error: return
- { message } + {message}
- { locationFallback } + {locationFallback}
; }; @@ -149,7 +149,7 @@ export const LocationBodyContent: React.FC = ({ alignment={Alignment.InnerBottom} maxParentWidth={450} > - { mapElement } + {mapElement} : mapElement } From f33fc5c916c799fa3cef229b4352f87923e04e6a Mon Sep 17 00:00:00 2001 From: Kerry Archibald Date: Mon, 11 Apr 2022 11:24:00 +0200 Subject: [PATCH 06/27] use new ZoomButtons in MLocationBody Signed-off-by: Kerry Archibald --- res/css/views/messages/_MLocationBody.scss | 2 -- src/components/views/location/LocationViewDialog.tsx | 1 + src/components/views/location/SmartMarker.tsx | 2 -- 3 files changed, 1 insertion(+), 4 deletions(-) diff --git a/res/css/views/messages/_MLocationBody.scss b/res/css/views/messages/_MLocationBody.scss index d97a689e21d..9c7e2767d74 100644 --- a/res/css/views/messages/_MLocationBody.scss +++ b/res/css/views/messages/_MLocationBody.scss @@ -15,8 +15,6 @@ limitations under the License. */ .mx_MLocationBody { - width: 450px; - height: 300px; .mx_MLocationBody_map { width: 450px; height: 300px; diff --git a/src/components/views/location/LocationViewDialog.tsx b/src/components/views/location/LocationViewDialog.tsx index 9719013ee4c..6bfe3b38bfd 100644 --- a/src/components/views/location/LocationViewDialog.tsx +++ b/src/components/views/location/LocationViewDialog.tsx @@ -62,6 +62,7 @@ export default class LocationViewDialog extends React.Component className='mx_LocationViewDialog' onFinished={this.props.onFinished} fixedWidth={false} + > = ({ id, map, geoUri, roomMember, useMemberColor }) => { const { onElementRef } = useMapMarker(map, geoUri); - console.log('hhhh ', id); - return Date: Mon, 11 Apr 2022 12:11:58 +0200 Subject: [PATCH 07/27] test LocationViewDialog Signed-off-by: Kerry Archibald --- res/css/_components.scss | 1 - res/css/components/views/location/_Map.scss | 18 ------------------ .../views/location/LocationViewDialog.tsx | 1 - .../views/messages/MLocationBody.tsx | 2 +- 4 files changed, 1 insertion(+), 21 deletions(-) delete mode 100644 res/css/components/views/location/_Map.scss diff --git a/res/css/_components.scss b/res/css/_components.scss index c38b0df4b5b..79efb3e89bc 100644 --- a/res/css/_components.scss +++ b/res/css/_components.scss @@ -9,7 +9,6 @@ @import "./components/views/beacon/_StyledLiveBeaconIcon.scss"; @import "./components/views/location/_LiveDurationDropdown.scss"; @import "./components/views/location/_LocationShareMenu.scss"; -@import "./components/views/location/_Map.scss"; @import "./components/views/location/_MapError.scss"; @import "./components/views/location/_Marker.scss"; @import "./components/views/location/_ShareDialogButtons.scss"; diff --git a/res/css/components/views/location/_Map.scss b/res/css/components/views/location/_Map.scss deleted file mode 100644 index 4744848a99a..00000000000 --- a/res/css/components/views/location/_Map.scss +++ /dev/null @@ -1,18 +0,0 @@ -/* -Copyright 2022 The Matrix.org Foundation C.I.C. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -.mx_Map { -} diff --git a/src/components/views/location/LocationViewDialog.tsx b/src/components/views/location/LocationViewDialog.tsx index 6bfe3b38bfd..9719013ee4c 100644 --- a/src/components/views/location/LocationViewDialog.tsx +++ b/src/components/views/location/LocationViewDialog.tsx @@ -62,7 +62,6 @@ export default class LocationViewDialog extends React.Component className='mx_LocationViewDialog' onFinished={this.props.onFinished} fixedWidth={false} - > = ({ alignment={Alignment.InnerBottom} maxParentWidth={450} > - {mapElement} + { mapElement } : mapElement } From 1b4d35ccae489b3a7279b8b6081377ca655339fb Mon Sep 17 00:00:00 2001 From: Kerry Archibald Date: Mon, 11 Apr 2022 12:22:47 +0200 Subject: [PATCH 08/27] update commentt Signed-off-by: Kerry Archibald --- src/components/views/location/Map.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/views/location/Map.tsx b/src/components/views/location/Map.tsx index 8776e8e8264..a270de9c3e0 100644 --- a/src/components/views/location/Map.tsx +++ b/src/components/views/location/Map.tsx @@ -94,7 +94,7 @@ const Map: React.FC = ({ id={bodyId} onClick={onMapClick} > - { !!children && !!map && children({ map }) } + {!!children && !!map && children({ map })} ; }; From 32790ac789ac0f392c6eb53eb90465d7436971ad Mon Sep 17 00:00:00 2001 From: Kerry Archibald Date: Mon, 11 Apr 2022 12:31:40 +0200 Subject: [PATCH 09/27] lint Signed-off-by: Kerry Archibald --- src/components/views/location/Map.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/views/location/Map.tsx b/src/components/views/location/Map.tsx index a270de9c3e0..8776e8e8264 100644 --- a/src/components/views/location/Map.tsx +++ b/src/components/views/location/Map.tsx @@ -94,7 +94,7 @@ const Map: React.FC = ({ id={bodyId} onClick={onMapClick} > - {!!children && !!map && children({ map })} + { !!children && !!map && children({ map }) } ; }; From 53f22cb893104bf0191797e50962ec5bbda71b38 Mon Sep 17 00:00:00 2001 From: Kerry Archibald Date: Mon, 11 Apr 2022 14:10:19 +0200 Subject: [PATCH 10/27] lint Signed-off-by: Kerry Archibald --- src/components/views/messages/MLocationBody.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/views/messages/MLocationBody.tsx b/src/components/views/messages/MLocationBody.tsx index c560f4928f8..94abc1c7a88 100644 --- a/src/components/views/messages/MLocationBody.tsx +++ b/src/components/views/messages/MLocationBody.tsx @@ -98,10 +98,10 @@ export const LocationBodyFallbackContent: React.FC<{ event: MatrixEvent, error: return
- {message} + { message }
- {locationFallback} + { locationFallback }
; }; From 30bc559567b582395c60ce16fdffff4955e08952 Mon Sep 17 00:00:00 2001 From: Kerry Archibald Date: Mon, 11 Apr 2022 15:58:04 +0200 Subject: [PATCH 11/27] extract livetimeremaining into own component Signed-off-by: Kerry Archibald --- src/components/views/beacon/LiveTimeRemaining.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/views/beacon/LiveTimeRemaining.tsx b/src/components/views/beacon/LiveTimeRemaining.tsx index 1f25706a13f..2a8ff5d8956 100644 --- a/src/components/views/beacon/LiveTimeRemaining.tsx +++ b/src/components/views/beacon/LiveTimeRemaining.tsx @@ -69,7 +69,7 @@ const LiveTimeRemaining: React.FC<{ beacon: Beacon }> = ({ beacon }) => { return { liveTimeRemaining }; + >{liveTimeRemaining}; }; export default LiveTimeRemaining; From 715524bbe477c5795c62f4df791c5ba53db1a92c Mon Sep 17 00:00:00 2001 From: Kerry Archibald Date: Mon, 11 Apr 2022 16:51:12 +0200 Subject: [PATCH 12/27] extract more beacon state utils Signed-off-by: Kerry Archibald --- .../views/beacon/_RoomLiveShareWarning.scss | 4 + .../views/beacon/LiveTimeRemaining.tsx | 2 +- .../views/beacon/RoomLiveShareWarning.tsx | 75 ++----------------- src/utils/beacon/index.ts | 1 + src/utils/beacon/useOwnLiveBeacons.ts | 72 ++++++++++++++++++ .../RoomLiveShareWarning-test.tsx.snap | 9 ++- 6 files changed, 88 insertions(+), 75 deletions(-) create mode 100644 src/utils/beacon/useOwnLiveBeacons.ts diff --git a/res/css/components/views/beacon/_RoomLiveShareWarning.scss b/res/css/components/views/beacon/_RoomLiveShareWarning.scss index 1449193e7be..f82c7f4de40 100644 --- a/res/css/components/views/beacon/_RoomLiveShareWarning.scss +++ b/res/css/components/views/beacon/_RoomLiveShareWarning.scss @@ -48,6 +48,10 @@ limitations under the License. margin-left: $spacing-16; } +.mx_RoomLiveShareWarning_stopButton { + margin-left: $spacing-16; +} + .mx_RoomLiveShareWarning_closeButtonIcon { height: $font-18px; padding: $spacing-4; diff --git a/src/components/views/beacon/LiveTimeRemaining.tsx b/src/components/views/beacon/LiveTimeRemaining.tsx index 2a8ff5d8956..1f25706a13f 100644 --- a/src/components/views/beacon/LiveTimeRemaining.tsx +++ b/src/components/views/beacon/LiveTimeRemaining.tsx @@ -69,7 +69,7 @@ const LiveTimeRemaining: React.FC<{ beacon: Beacon }> = ({ beacon }) => { return {liveTimeRemaining}; + >{ liveTimeRemaining }; }; export default LiveTimeRemaining; diff --git a/src/components/views/beacon/RoomLiveShareWarning.tsx b/src/components/views/beacon/RoomLiveShareWarning.tsx index 89fb1cfb46e..77fe3c0cc4a 100644 --- a/src/components/views/beacon/RoomLiveShareWarning.tsx +++ b/src/components/views/beacon/RoomLiveShareWarning.tsx @@ -14,86 +14,20 @@ See the License for the specific language governing permissions and limitations under the License. */ -import React, { useEffect, useState } from 'react'; +import React from 'react'; import classNames from 'classnames'; -import { - Room, - Beacon, - BeaconIdentifier, -} from 'matrix-js-sdk/src/matrix'; +import { Room } from 'matrix-js-sdk/src/matrix'; import { _t } from '../../../languageHandler'; import { useEventEmitterState } from '../../../hooks/useEventEmitter'; import { OwnBeaconStore, OwnBeaconStoreEvent } from '../../../stores/OwnBeaconStore'; -import { sortBeaconsByLatestExpiry } from '../../../utils/beacon'; +import { useOwnLiveBeacons } from '../../../utils/beacon'; import AccessibleButton from '../elements/AccessibleButton'; import Spinner from '../elements/Spinner'; import StyledLiveBeaconIcon from './StyledLiveBeaconIcon'; import { Icon as CloseIcon } from '../../../../res/img/image-view/close.svg'; import LiveTimeRemaining from './LiveTimeRemaining'; -/** - * It's technically possible to have multiple live beacons in one room - * Select the latest expiry to display, - * and kill all beacons on stop sharing - */ -type LiveBeaconsState = { - beacon?: Beacon; - onStopSharing?: () => void; - onResetWireError?: () => void; - stoppingInProgress?: boolean; - hasStopSharingError?: boolean; - hasWireError?: boolean; -}; -const useLiveBeacons = (liveBeaconIds: BeaconIdentifier[], roomId: string): LiveBeaconsState => { - const [stoppingInProgress, setStoppingInProgress] = useState(false); - const [error, setError] = useState(); - - const hasWireError = useEventEmitterState( - OwnBeaconStore.instance, - OwnBeaconStoreEvent.WireError, - () => - OwnBeaconStore.instance.hasWireErrors(roomId), - ); - - // reset stopping in progress on change in live ids - useEffect(() => { - setStoppingInProgress(false); - setError(undefined); - }, [liveBeaconIds]); - - // select the beacon with latest expiry to display expiry time - const beacon = liveBeaconIds.map(beaconId => OwnBeaconStore.instance.getBeaconById(beaconId)) - .sort(sortBeaconsByLatestExpiry) - .shift(); - - const onStopSharing = async () => { - setStoppingInProgress(true); - try { - await Promise.all(liveBeaconIds.map(beaconId => OwnBeaconStore.instance.stopBeacon(beaconId))); - } catch (error) { - // only clear loading in case of error - // to avoid flash of not-loading state - // after beacons have been stopped but we wait for sync - setError(error); - setStoppingInProgress(false); - } - }; - - const onResetWireError = () => { - liveBeaconIds.map(beaconId => OwnBeaconStore.instance.resetWireError(beaconId)); - }; - - return { - onStopSharing, - onResetWireError, - beacon, - stoppingInProgress, - hasWireError, - hasStopSharingError: !!error, - }; -}; - const getLabel = (hasWireError: boolean, hasStopSharingError: boolean): string => { if (hasWireError) { return _t('An error occured whilst sharing your live location, please try again'); @@ -116,7 +50,7 @@ const RoomLiveShareWarningInner: React.FC = ({ l stoppingInProgress, hasStopSharingError, hasWireError, - } = useLiveBeacons(liveBeaconIds, roomId); + } = useOwnLiveBeacons(liveBeaconIds, roomId); if (!beacon) { return null; @@ -147,6 +81,7 @@ const RoomLiveShareWarningInner: React.FC = ({ l { !stoppingInProgress && !hasError && } void; + onResetWireError?: () => void; + stoppingInProgress?: boolean; + hasStopSharingError?: boolean; + hasWireError?: boolean; +}; + +/** + * Monitor the current users own beacons + */ +export const useOwnLiveBeacons = (liveBeaconIds: BeaconIdentifier[], roomId: string): LiveBeaconsState => { + const [stoppingInProgress, setStoppingInProgress] = useState(false); + const [error, setError] = useState(); + + const hasWireError = useEventEmitterState( + OwnBeaconStore.instance, + OwnBeaconStoreEvent.WireError, + () => + OwnBeaconStore.instance.hasWireErrors(roomId), + ); + + // reset stopping in progress on change in live ids + useEffect(() => { + setStoppingInProgress(false); + setError(undefined); + }, [liveBeaconIds]); + + // select the beacon with latest expiry to display expiry time + const beacon = liveBeaconIds.map(beaconId => OwnBeaconStore.instance.getBeaconById(beaconId)) + .sort(sortBeaconsByLatestExpiry) + .shift(); + + const onStopSharing = async () => { + setStoppingInProgress(true); + try { + await Promise.all(liveBeaconIds.map(beaconId => OwnBeaconStore.instance.stopBeacon(beaconId))); + } catch (error) { + // only clear loading in case of error + // to avoid flash of not-loading state + // after beacons have been stopped but we wait for sync + setError(error); + setStoppingInProgress(false); + } + }; + + const onResetWireError = () => { + liveBeaconIds.map(beaconId => OwnBeaconStore.instance.resetWireError(beaconId)); + }; + + return { + onStopSharing, + onResetWireError, + beacon, + stoppingInProgress, + hasWireError, + hasStopSharingError: !!error, + }; +}; diff --git a/test/components/views/beacon/__snapshots__/RoomLiveShareWarning-test.tsx.snap b/test/components/views/beacon/__snapshots__/RoomLiveShareWarning-test.tsx.snap index 18efb2c8ab6..fda11d8e82f 100644 --- a/test/components/views/beacon/__snapshots__/RoomLiveShareWarning-test.tsx.snap +++ b/test/components/views/beacon/__snapshots__/RoomLiveShareWarning-test.tsx.snap @@ -1,10 +1,10 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[` when user has live beacons and geolocation is available renders correctly with one live beacon in room 1`] = `"
You are sharing your live location1h left
"`; +exports[` when user has live beacons and geolocation is available renders correctly with one live beacon in room 1`] = `"
You are sharing your live location1h left
"`; -exports[` when user has live beacons and geolocation is available renders correctly with two live beacons in room 1`] = `"
You are sharing your live location12h left
"`; +exports[` when user has live beacons and geolocation is available renders correctly with two live beacons in room 1`] = `"
You are sharing your live location12h left
"`; -exports[` when user has live beacons and geolocation is available stopping beacons displays error when stop sharing fails 1`] = `"
An error occurred while stopping your live location, please try again
"`; +exports[` when user has live beacons and geolocation is available stopping beacons displays error when stop sharing fails 1`] = `"
An error occurred while stopping your live location, please try again
"`; exports[` when user has live beacons and geolocation is available with wire errors displays wire error when mounted with wire errors 1`] = ` when user has live beacons and geolocation is An error occured whilst sharing your live location, please try again when user has live beacons and geolocation is tabIndex={0} >