Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Live location sharing - beacon map in timeline #8286

Merged
merged 8 commits into from
Apr 12, 2022

Conversation

kerryarchibald
Copy link
Contributor

@kerryarchibald kerryarchibald commented Apr 11, 2022

Only visible behind a labs flag.
Renders a map in the timeline for beacon_info events, renders fallback image for stopped and loading beacons.

Screenshot 2022-04-11 at 19 32 26

More UI incoming, this is a step toward #8285


This change is marked as an internal change (Task), so will not be included in the changelog.

Preview: https://pr8286--matrix-react-sdk.netlify.app
⚠️ Do you trust the author of this PR? Maybe this build will steal your keys or give you malware. Exercise caution. Use test accounts.

Kerry Archibald added 5 commits April 11, 2022 19:26
Signed-off-by: Kerry Archibald <kerrya@element.io>
Signed-off-by: Kerry Archibald <kerrya@element.io>
Signed-off-by: Kerry Archibald <kerrya@element.io>
Signed-off-by: Kerry Archibald <kerrya@element.io>
Signed-off-by: Kerry Archibald <kerrya@element.io>
@kerryarchibald kerryarchibald added the T-Task Refactoring, enabling or disabling functionality, other engineering tasks label Apr 11, 2022
@kerryarchibald kerryarchibald requested a review from a team as a code owner April 11, 2022 17:35
Signed-off-by: Kerry Archibald <kerrya@element.io>
@codecov
Copy link

codecov bot commented Apr 11, 2022

Codecov Report

Merging #8286 (8eea86c) into develop (4b7840b) will increase coverage by 0.02%.
The diff coverage is 96.29%.

@@             Coverage Diff             @@
##           develop    #8286      +/-   ##
===========================================
+ Coverage    29.51%   29.54%   +0.02%     
===========================================
  Files          870      871       +1     
  Lines        49965    49986      +21     
  Branches     12708    12715       +7     
===========================================
+ Hits         14747    14767      +20     
- Misses       35218    35219       +1     
Impacted Files Coverage Δ
src/components/views/beacon/displayStatus.ts 90.00% <90.00%> (ø)
src/components/views/messages/MBeaconBody.tsx 100.00% <100.00%> (ø)
src/utils/EventRenderingUtils.ts 73.17% <100.00%> (+0.67%) ⬆️

Copy link
Member

@turt2live turt2live left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm either way

// eg thread and main timeline, reply
// maplibregl needs a unique id to attach the map instance to
const useUniqueId = (eventId: string): string => {
const [id, setId] = useState(`${eventId}_${Math.random().toString(16).slice(2, 10)}`);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we do have a random string utility too, fwiw

Kerry Archibald added 2 commits April 12, 2022 10:03
@kerryarchibald kerryarchibald enabled auto-merge (squash) April 12, 2022 08:08
@kerryarchibald kerryarchibald merged commit 661e2c2 into develop Apr 12, 2022
@kerryarchibald kerryarchibald deleted the psf-910/beacon-body-map branch April 12, 2022 08:13
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
T-Task Refactoring, enabling or disabling functionality, other engineering tasks
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants