Refactor and redesign Location Sharing Screen (#5155)

* refactored the static location screen to the location sharing screen

# Conflicts:
#	UnitTests/Sources/LocationSharingScreenViewModelTests.swift

# Conflicts:
#	ElementX.xcodeproj/project.pbxproj

* implemented a custom pin with an overlayable view

* implemented the render of the user when the location is sender instead of the pin type

* removed description and body they are not used at all.

* reimplemented single button for sharing this or user location + implemented an experimental way to update annotations

* removed unnecessary @Suite description

* implemented a way to display the alert on top of the sheet and added a spinner to the center user location button

* fixed alerts strings

* fixed a failing test

* improved preview tests
This commit is contained in:
Mauro
2026-03-06 12:51:16 +01:00
committed by GitHub
parent 0c79b5404d
commit bbbb2e9dee
85 changed files with 917 additions and 626 deletions
@@ -603,6 +603,14 @@ extension PreviewTests {
}
}
@Test
func locationSharingScreen() async throws {
AppSettings.resetAllSettings() // Ensure this test's previews start with fresh settings.
for (index, preview) in LocationSharingScreen_Previews._allPreviews.enumerated() {
try await assertSnapshots(matching: preview, step: index)
}
}
@Test
func loginScreen() async throws {
AppSettings.resetAllSettings() // Ensure this test's previews start with fresh settings.
@@ -1387,14 +1395,6 @@ extension PreviewTests {
}
}
@Test
func staticLocationScreenViewer() async throws {
AppSettings.resetAllSettings() // Ensure this test's previews start with fresh settings.
for (index, preview) in StaticLocationScreenViewer_Previews._allPreviews.enumerated() {
try await assertSnapshots(matching: preview, step: index)
}
}
@Test
func stickerRoomTimelineView() async throws {
AppSettings.resetAllSettings() // Ensure this test's previews start with fresh settings.
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:43c010abad7474002e5830bf5332ae068c82deaa789ba26f0aa3cb26d61edb25
size 82843
oid sha256:c00139208711b767a8f19c563bc7cef80314c3382ce5ce7d481a71d5ef70df1a
size 69042
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:43c010abad7474002e5830bf5332ae068c82deaa789ba26f0aa3cb26d61edb25
size 82843
oid sha256:c00139208711b767a8f19c563bc7cef80314c3382ce5ce7d481a71d5ef70df1a
size 69042
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:6275a174efe2615503282742972c952b8a66e0d00bfbb806b8eea3f2ffee9b27
size 40724
oid sha256:5dcaa6876ed9b9ef600f3c8327aed5a1b5e87cfc3990994d2b44d89973597c2f
size 51341
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:6275a174efe2615503282742972c952b8a66e0d00bfbb806b8eea3f2ffee9b27
size 40724
oid sha256:5dcaa6876ed9b9ef600f3c8327aed5a1b5e87cfc3990994d2b44d89973597c2f
size 51341
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:7fb62383066a45ae514f8736f6ea08b8a5c0bab0c231836613ff57d1ddb95975
size 1027619
oid sha256:71845ef91726086a8b88816e8535cbf5bbdd82e0de0d5a0ca9ebca75c376944b
size 1227270
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:8575f49f01e82cbca9366dab9b31954df18e0c8a2fc267225fc3ca9d93286695
size 1029185
oid sha256:9a8b87ca66a0447bf808b4ef2d67569f1a88fbc798073eefd56fcb39d4f126d3
size 1228934
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:667d2b653d460a351e8c9b1adf708532d215b465ecfe3548409a1de3abc12ba5
size 607504
oid sha256:edeeccdfbfb21821ad3eb56836d92e78e2f36516ffbf8cdd9ab7b068a9b2b68c
size 580022
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:547c133de43262b6e4a3a91231af8ed39af98357dd7962df14dc8011379100a7
size 580526
oid sha256:410475fefb08e8e59d5f5e6c3b25a6ce8d220dd819a51708ead024754f4ece73
size 580183
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:64737509400fe27cdb017b8f66cffe8c0807f958827cff84a9ce5484db0ca3fc
size 80109
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:64737509400fe27cdb017b8f66cffe8c0807f958827cff84a9ce5484db0ca3fc
size 80109
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:08e72ae0c7d34108690371b29952267b1ac06bb62f203515f3c5e4143efd2ca8
size 38511
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:08e72ae0c7d34108690371b29952267b1ac06bb62f203515f3c5e4143efd2ca8
size 38511
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:cbf4a51ed98c176336fc2e5be99311342bdae0d931d5d78dabca0ace3dd3a85b
size 80783
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:cbf4a51ed98c176336fc2e5be99311342bdae0d931d5d78dabca0ace3dd3a85b
size 80783
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:117ab2273ccfba15cee5546e521a85b87c8f7b915b869a299234c7d1a0caecd2
size 41622
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:117ab2273ccfba15cee5546e521a85b87c8f7b915b869a299234c7d1a0caecd2
size 41622
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:b4635f42e9d912d20f4963c5c3627f543cb00f95183fa0e902c9cc61b1afc921
size 93073
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:b4635f42e9d912d20f4963c5c3627f543cb00f95183fa0e902c9cc61b1afc921
size 93073
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:c68d58d06123afaa7e02fc798b2360e1818c450fd277b275308d5704203e5547
size 53102
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:c68d58d06123afaa7e02fc798b2360e1818c450fd277b275308d5704203e5547
size 53102
@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:7fe3be6ac7144e77a64deea2ec9abe990b7066df18bf693018e3cbbac95f7b19
size 92909
@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:29136dedce23b9175a539c68f190f339972cfeedd51714b2d7dbcd487c0918c1
size 94512
@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:dd7467f8fecb694a44d88e404999373428dd5b0909f9a821a8cbc9961f132b59
size 46905
@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:c3cd2e0746b0f78394304c614d9a80cd15392986a58b4b64eaa36757997aff42
size 48123
@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:1fed42a97d568cc0d024afb9be2c7c8ae2359a88f1335b307ab5b8cbe0929f59
size 88451
@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:79e7bdc97b95baf9ec65240a09543d1efa7a6f0ee8178a0ad24ec7fa25f4fbcf
size 88813
@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:8dc6d6f2dcdac244d56349c4d432e43c281e539a83769e4711ebfa43d5b62462
size 42173
@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:8dc6d6f2dcdac244d56349c4d432e43c281e539a83769e4711ebfa43d5b62462
size 42173
@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:3ec7064466b5a91fd490c9aebdcfb36efbc2a585b86998725bcd90e2c280c726
size 91675
@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:241dd732058072774947a9aa0dbd7c6bf410608ba8b4e1733942161feb7d725e
size 92048
@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:763523520732699428fcf758b36119ff450d13b6f69b250e5c977651ae06d05e
size 45091
@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:763523520732699428fcf758b36119ff450d13b6f69b250e5c977651ae06d05e
size 45091
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:d4c2e14e3362efa21a236c61fa17fe94c14f08c35965cc68cc7375e837b63e6e
size 2459797
oid sha256:7905d4da975ca2f8c8ba13afc3112081360e1c2586e780e0bf7f63e79f11e907
size 1816558
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:3bed8adcdeed91791208203243bec9edab8c6cf233538382a6775e5b997f2970
size 2458950
oid sha256:6f225a517befd7486ca940036f0b32b051471e6179dddc1afec04027f0e5a34b
size 1815989
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:39e3c3ea4d8f07c295f6c716e568e4900c4fe3977ac008728d63a5679f8f1099
size 1032059
oid sha256:711bdb8bba6cf0b1148695e599599a34b137bfb41577ccf53f70402c188f7336
size 762444
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:1aadd13737eb2768c20d5cd48fcb503120275ce73ef27ee3ec151ac5629be78c
size 1029398
oid sha256:bc8677193d2595d5d6993d2e39c40b74fd033e02ac952da52dfc320824b857b0
size 760909
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:89b62418f7c716f317fb3d0faee0ed5271cc99166740f517bb9082639465c618
size 2574127
oid sha256:8a3e77518c1d7225d0d89ac5d94f3a050721abb0320ac94c7768a64d9f8064c0
size 1912810
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:bb2a87744f36cd3317bfa0e79a8f0bc3f2a5077751b4da2e039c0c9edb23c149
size 2585620
oid sha256:648eb3d7089c0ce01bc4d20cddd0f0092421d78f2a0f483135b30f4d1bc5e665
size 1919591
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:a122378791c1f44057926bf054374e6f31eb3b4644438a7f3df988f62e8422aa
size 1154014
oid sha256:6ec385fa56fdea70874f4ec43623561cba05f1b2c13633a46d560974e8487cb0
size 865130
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:1752a98b3ddfa33cd8ee71fe2a49146b9a87d222fbad6fc41b4615d112948032
size 1157827
oid sha256:918a059719a7ff6f3974664904e9ce6473241a20907ebefda0c40561e6235823
size 868790
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:68bbaa372d7ef0f92176d530311c8484370aa38c7227a3a1f2dd7ed4d45240fc
size 2575915
oid sha256:f1a2e2ed1e99b2ff6b92fe5ea4cf70af039ed09c542ede3f471e88f3d8883a2c
size 1916887
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:b8cecf8be430f6efbe9451a6a1b4e6e2df8e3140e7a4fcea3c0a22e85e846d41
size 2601396
oid sha256:ad75f5eb536ef43505a9713b17d64424451b5f4136795ff72e6318f2cc74998b
size 1939145
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:0a86e9f58d2cde2339de39905762d92f57f8447896e16f24afa1adbd8329fd40
size 1259715
oid sha256:7f33ce5a5b646d0de6f7d57a86ec2cd4ffa2c0a88c99f0607b4388aff3ba7099
size 944690
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:09fb516ddcf8ab30b8ded663a15dec446cc932f9173ecdeb09a7b68d9d7515e6
size 1259289
oid sha256:44fb917f17f99ea73143c6f81c4a935e5f5d6de51ff6dccb61eb44e6a006b2f9
size 945021