Custom media gallery views for files and voice messages (#3610)

* Extract the timeline item background from the BubbledStyler.
* Use different views for files and voices messages, reuse the timeline content but only keep the bubble background instead of the whole TimelineStyler.
* Add back max voice message width and add missing accessibility label
This commit is contained in:
Stefan Ceriu
2024-12-12 17:48:41 +02:00
committed by GitHub
parent 88b5426e97
commit 256ae4d2cc
31 changed files with 398 additions and 91 deletions
@@ -53,6 +53,12 @@ extension PreviewTests {
}
}
func test_audioMediaEventsTimelineView() {
for preview in AudioMediaEventsTimelineView_Previews._allPreviews {
assertSnapshots(matching: preview)
}
}
func test_audioRoomTimelineView() {
for preview in AudioRoomTimelineView_Previews._allPreviews {
assertSnapshots(matching: preview)
@@ -179,6 +185,12 @@ extension PreviewTests {
}
}
func test_fileMediaEventsTimelineView() {
for preview in FileMediaEventsTimelineView_Previews._allPreviews {
assertSnapshots(matching: preview)
}
}
func test_fileRoomTimelineView() {
for preview in FileRoomTimelineView_Previews._allPreviews {
assertSnapshots(matching: preview)
@@ -1031,6 +1043,12 @@ extension PreviewTests {
}
}
func test_voiceMessageMediaEventsTimelineView() {
for preview in VoiceMessageMediaEventsTimelineView_Previews._allPreviews {
assertSnapshots(matching: preview)
}
}
func test_voiceMessagePreviewComposer() {
for preview in VoiceMessagePreviewComposer_Previews._allPreviews {
assertSnapshots(matching: preview)
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:8e0cde871c15aa0fadf7c4f36f1e8efaaf1b6e4b183745970521c7e0682cc7ae
size 91919
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:ea99daf61180bf74a70fdfcdcf78f775cafbcf06034ef5cd35f887c7ebd09c92
size 94531
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:462fbf7b26d76217a9045ba76a97c5172c63817383caf15e7a82e1db89a36d2f
size 48610
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:fb2174ebc097d4670f75b14e90074fe5477d9ae364dc40f520e8e3d51f316cd4
size 50374
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:7e72e9a0f59a3b8967f7457cdbb2c11214f0793ea89807e3894a316c51b8cdf7
size 120661
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:ddbef7603abfb93c1edd1c78cd3f8d9a6f8f484fca89d92abb8d3d424c185f87
size 124318
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:e737333650f3f467d240e4a7e709fe38ed74f2370a08e54d2286a4b20339499f
size 72725
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:0ea15196e740ba28f3818f83a778d9992dacb10b9a9959c0f5edad69121c9212
size 76629
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:1efe8d7219056e410fdb3a3ca386198526a91e096c9ae4c80f7e38947f6d29d2
size 169520
oid sha256:51741b607cd001a1a7e8ce7ec03cdcbd35bc294a9b9bb76e05469561542a38f4
size 146263
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:5746225afcd33ffd7a2f0a8beb05e31e005dcfd0ded7cde8398b180c77dbb8a5
size 178967
oid sha256:63987ffb9a91d412c7bc6dc813230d21223ae5b91781daede3acbf624ba4f752
size 148838
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:7109b26c659e7525c559bf8336127c84464f079b47f51f68e343e7e77eeb2947
size 114655
oid sha256:cfce1624b822fabe439d77f47fcedfbaab78b4b9f5dc20518c47d315f097dcd4
size 87008
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:4512d75693b003d50ae96a549a5d896bb26ab80435c9e4dc80650ef33e61a294
size 120654
oid sha256:fa188dd55c8b9cdd46318ab24209a8458a61abe11b9c52fc05086724c4b7fb1d
size 88770
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:16c155fc0209dad7f822280f935baf1b7558ca92a96316a43221fbb6e7209854
size 74031
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:16c155fc0209dad7f822280f935baf1b7558ca92a96316a43221fbb6e7209854
size 74031
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:67319c74089339e445ea194e10db087268c7c1d6b2832877f2ad698803e56875
size 32851
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:67319c74089339e445ea194e10db087268c7c1d6b2832877f2ad698803e56875
size 32851
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:f518c5ce36c085ec697501297d0303044042b8df1341fcf0d02b08b3eef58959
size 77812
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:f518c5ce36c085ec697501297d0303044042b8df1341fcf0d02b08b3eef58959
size 77812
oid sha256:3f4f1266f8f571fb61056f8c58d75f8dbb9653b916168b7ff08e457c9f55b562
size 78247
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:3d456a81d249a01c6817c0bb35bf2a501ca641918009533c3a8dbb9db2739456
size 78571
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:3d456a81d249a01c6817c0bb35bf2a501ca641918009533c3a8dbb9db2739456
size 78571
oid sha256:5be910490972939e7dc064fa8bbcfc2ba9f3c50d2183836a66ef887eb7bd59b1
size 79781