General tidy-up related to QR codes. (#4865)

* Tidy-up Rust to Swift mapping.

* Refactor out a dedicated QRCodeErrorView.

* Use the new QRCodeErrorView for most error state snapshots.

* Simplify QRCodeErrorView structure.

Also updates the background to match the designs.

* Fix a small compile error in the unit tests.
This commit is contained in:
Doug
2025-12-16 15:59:59 +00:00
committed by GitHub
parent 189da20419
commit 841cdc291a
86 changed files with 466 additions and 334 deletions
@@ -629,6 +629,12 @@ extension PreviewTests {
}
}
func testQRCodeErrorView() async throws {
for (index, preview) in QRCodeErrorView_Previews._allPreviews.enumerated() {
try await assertSnapshots(matching: preview, step: index)
}
}
func testQRCodeLoginScreen() async throws {
for (index, preview) in QRCodeLoginScreen_Previews._allPreviews.enumerated() {
try await assertSnapshots(matching: preview, step: index)
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:d4bdf47c5e3c003195a5171e00ff0a7c19fdade400cc49ea1f27af3af5598445
size 89983
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:7d7fa171a38f3f4c113390bc41b9dbafec9fa429af7603894f539d3b57fe64e5
size 96438
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:914698e75e1c93cf578cb243a8178d773ee3676979db95753a820396ad2006b4
size 49503
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:0b612f9908d71a2ab4aaa54a558fe5c6465ce38b29b5e83bbdd93870bc0eee9b
size 62995
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:60071d118b633bf533a6587373c06feb8384d4754f5e2ab0a99e35a028d2e61f
size 141760
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:3949cf87ef273e45eb8f048d49fe149a9ae6ef20c7262ab5c8ec080218480a3d
size 187441
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:9859124c19a8d1b91a20e87b6ffc3efd2a84cfa95b5de9047140d508cabbe339
size 102663
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:243cbd45d08feaae2d126d0a70c17835020ff0ec3836a109ccab3b560fc3b38e
size 160568
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:e85694a3b538b272d1324a72fd9a6278afceaacd28cea84fcc79bf96ca6d240c
size 87644
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:ca17a59ca6681d8cf4d5eb48ca7c301ccfee2c41f1b1942d49f282536e594b9c
size 93400
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:371ea2f5e6db42f0611b63cbe0241733c3e13072b1a2f338ff52852a5319093e
size 45605
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:a59dd129d741059ea37497a748fd26f5fc7f76ad4258ce4327e683458c54ef05
size 55253
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:10cde6d53a261f5f076dfc985e846985aedf560b3832dcbd38fb87323e0c6af8
size 90581
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:cfa533e3cf122c3549f0310a01d11f6fba2be7517a2461289c9dda02edba9f46
size 98629
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:0f6c297aef97f3e186fedc1c0d6e62ed55348131f3f2074706e0007b656c7177
size 48938
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:45a9a405dffed9ae9e91d81248b7e19b365cec3509912eb258cfae85878cf455
size 62571
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:7fb48e43db6f2787eec4148c8e0e90ed3b40516485b3ecac7356994aec22dc67
size 90924
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:89d5920bf38135a595438c7c2f17463173bdef037b5f769037d2e4f88b433ad8
size 99821
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:4b63f9d10e70129ba6dcad2722f6b9386c892d0e0f8e0d52f9e626ab71f84ff9
size 50237
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:7067c4325fda81e7ce82dd53a82cfa3531a92f907ca7215e1006c98cf98ecda7
size 64697
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:c6b9799b352e2221b57a03dbd6194a657cd2651e27d07d466fc528256a61dd08
size 107762
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:67d79e351da63ee2289bc75a06cb7adf769c3871e21647eaa60cf42cff774e1e
size 132987
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:01b6e8fe8d6221aeff100635f30b4ee4d38c2dd7a0fe96bbfc863309fc10dc12
size 68507
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:fbf90db455fc188bae28f52f13a0fefb3602d1349a7ea0b9f337f68376c2dd6d
size 98104
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:40b981da4f55d7ff8b1433888f6b0303025ef3b7ad6a8c69f451b9f4d4ea7826
size 100024
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:bc31d7c0b096568c66b954ec864e3553ec48f4945cf0afdbe01c7a76583bbcfd
size 123384
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:b241ac12d4954e085c3e215f25112b61e9a49e6d4a3d343b5452b4ad8734b27d
size 61772
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:581294e449432a5261b366cc76644492af42af0d0f595cd152da50c233f4d6d1
size 89902
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:46f1090c3d4f2521708c6958acda398473c201417960b9fa12e3e3cd20883c07
size 99943
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:cb4c58a4448a6ea161eeb8bd32a2c26f358d63e127547a3545987baaca22709b
size 119957
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:4754d2ab51c8e3635a13108127355967e0ee2a0636590475ce03d7eb90557fba
size 62228
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:4eafd5c592e86b1737c8f78815cc1197593191454ade696721244632f45ba5fa
size 88846
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:4db2461cc7a8dc902fe6b288f75b0b4fd7fe6469c82e380f5ea153f3aae2a989
size 90207
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:242d2050553c8e2b773cb78bcce282238208f9e525ecd8b520cbdb35e20d4b40
size 96304
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:d99a5f1997b7ed633828d27ad66c2167502feace1062f7d54d7f5e143dfe37df
size 48900
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:fda4806cbf848c50cee4f52aa7d6b2be60c589ba1c18010ce4973f9312fa9922
size 62108
@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:6ad6008a604884316d6b6cb1b3247e25b6033a87cf5c366ee1238d2ad7336fd0
size 100428
@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:b10951db78fdd0c357dadd6017b96c93699f143580d4b0221fe484f7549f8731
size 109691
@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:1a279a6116971ff15d0a7889fb508d2e31bfea4db3be2498438c1ccd7b8a7c42
size 53912
@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:d48d9ce53a65718cd23497694732539573e9b6f63a735660589812ebf123504f
size 67601
@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:c77a5913eef3284747ae50aeb2252ffbae01484f960283a0986de3648946b9ec
size 160330
@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:e9ce41587137a7138ec026ee37be14255a1791a80b8061598b2cf5c854c74739
size 213100
@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:2d173a380e7d7d3c0b4831c922c3bf8a34f90ed1a09ec13b318924d17f2119a4
size 108449
@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:11be86f9d30026c10851dad887ccebbcbf3747dd4e719a6d3cd2c3e7a54793e0
size 163399
@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:17a79d824b61f169e74a8b8a687a863ea58720a48b8ae0092847f43325ae6efd
size 98395
@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:69d9ada1c31055265d0d2e1a13af50a4cecf0e88df5799992947443b93ee3d20
size 104670
@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:83eea65ebf7ce67b8cb7713810bc6940d66c433e3e9db3ed04b1d886ee74b94a
size 49876
@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:b31a74c68ea6afd042cbad914e41c8873c016db8a56d46500d7ba9eb48467b78
size 59588
@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:b898550b460e092b5e6d8e5cd50026b61ef7fc02dea61b11b9c6e31bcab6d372
size 100661
@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:91c9b162be64a92fc455d0e4b587969ee936ca0b78f4c3b42d08e7eb6106e663
size 111044
@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:a77e48d541d09bde879e8a514d2c3e116bb4f86a8bfb1182cb8fe9a5b3db002b
size 53261
@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:187e5d16e7f11ec44e388e7e8ce83430b9c9b2093ac837a27633ca417424f85d
size 67290
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:879ba9bde4429a1ebbee71bf94fb6b3e7fa97841fc09aa1560d51d1486bdd2c5
size 88830
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:ce4cc7acad160cd2436b630d204da4c473a55baba7bb2378a403bf38c96d45c1
size 94953
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:371ea2f5e6db42f0611b63cbe0241733c3e13072b1a2f338ff52852a5319093e
size 45605
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:a59dd129d741059ea37497a748fd26f5fc7f76ad4258ce4327e683458c54ef05
size 55253
@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:8992768d514f2032d1688cbc17fa20ef84f3dc0709ed4d8a824c265e709a43dd
size 101855
@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:ea09999977094e146233b557ee4a522485b41cd5f800d8d52595fe7375441998
size 110373
@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:33d66fcb5ea803769361fd33b266cacca5aa61f393436fb058866bd7b6ce34f0
size 54659
@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:a40cc4c26ae3d31ff2b754426384a4e11fee664a97b86862715f47336e47ab2e
size 69002
@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:4bca97ae120c6d0565d669578ce6858ed7f52d34cad3deb1f259b10893b21661
size 120586
@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:7537ac8a3d489aecb356700cc11fa80b2aa74c5276b562e23d984f99b71a6087
size 143521
@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:46005049fbcb338e8f2d61d30e0714ae3167b448ced78850fc32b8a2138e298b
size 72834
@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:9f16898529302568e545edfe9a00ac2f7856b7de22216193063ba96efaa9e70c
size 103065
@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:ad1f69dabd52d333d540b641af85307c1b01747f1083dfaab8ff633895110f46
size 112939
@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:f4a3bee6fe5de50df6396d1afbcead2f10440e04d56ce7fc7891b3badac0e26c
size 134913
@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:fb3407e687dc5dd007fc82891567092bf15490bc6498a29cf6bde386d9f9c4cf
size 66134
@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:1ad717285b90aee453fb29b20e7d3862af36155581859ca3714b5060f0a353dc
size 94658
@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:7b84fcd7258cdeaacd0156761bc0fb5de4938cfa94eb90bafbde3945742318d6
size 114035
@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:6c812e8fde8c4259fa516b4b7da61e97f71edd8cae6e0430e1f6ecb0726363a1
size 137301
@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:b068ab386807c2fb20340ff24c7b74b07bccf8645fbe3ea5562a44f8f57e89cb
size 66645
@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:cfd7c23837fc87dfc2bb97cb84f6ed950259deb55cab2684f8310a8593231c80
size 93432
@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:7c3089de3d3774202fb36cd413625b3e9ecbf2e12bab77428b2a2f54180199b4
size 100521
@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:c33193ff1a4fe9c82d56837c87be8ba40759967f310e2564ba6edea8ef8551a1
size 109194
@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:2a6ae461aca945e30cfba668d3195acd792023fab74ab47b0a3ce26ceb7c6a35
size 53248
@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:b3fb1bbe03f8585898034bcc1204dd46ae931e4245708287ecc05c2e7f1362e3
size 66576