stream-chat-swift icon indicating copy to clipboard operation
stream-chat-swift copied to clipboard

[WIP] Message List Data Source Decorator

Open nuno-vieira opened this issue 1 year ago β€’ 6 comments

πŸ”— Issue Links

N/A

🎯 Goal

Possibility of overriding the data source in the message list.

Potential edge cages: 1- If all messages from the first page are removed (unlikely), loading more messages is impossible. 2- If from the first 25 messages, only 1 or 2 are filtered, then it will feel like there are no more pages, but there is. 3- The preview message in the CHannel list might not be in sync if last message from the message list is removed

πŸ“ Summary

Provide bullet points with the most important changes in the codebase.

πŸ›  Implementation

Provide a detailed description of the implementation and explain your decisions if you find them relevant.

🎨 Showcase

Add relevant screenshots and/or videos/gifs to easily see what this PR changes, if applicable.

Before After
img img

πŸ§ͺ Manual Testing Notes

Explain how this change can be tested manually, if applicable.

β˜‘οΈ Contributor Checklist

  • [ ] I have signed the Stream CLA (required)
  • [ ] This change follows zero ⚠️ policy (required)
  • [x] This change should be manually QAed
  • [ ] Changelog is updated with client-facing changes
  • [ ] New code is covered by unit tests
  • [ ] Comparison screenshots added for visual changes
  • [ ] Affected documentation updated (docusaurus, tutorial, CMS)

🎁 Meme

Provide a funny gif or image that relates to your work on this pull request. (Optional)

nuno-vieira avatar Jun 12 '24 15:06 nuno-vieira

1 Warning
:warning: Please be sure to complete the Contributor Checklist in the Pull Request description
1 Message
:book: There seems to be app changes but CHANGELOG wasn't modified.
Please include an entry if the PR includes user-facing changes.
You can find it at CHANGELOG.md.

Generated by :no_entry_sign: Danger

github-actions[bot] avatar Jun 12 '24 22:06 github-actions[bot]

StreamChat XCMetrics

target metric benchmark branch performance status
MessageList Hitches total duration 10 ms 10.01 ms -0.1% πŸ”½ 🟑
Duration 2.6 s 2.54 s 2.31% πŸ”Ό 🟒
Hitch time ratio 4 ms per s 3.93 ms per s 1.75% πŸ”Ό 🟒
Frame rate 79 fps 78.19 fps 1.03% πŸ”Ό 🟒
Number of hitches 1 1.2 -20.0% πŸ”½ πŸ”΄
ChannelList Hitches total duration 12.5 ms 19.19 ms -53.52% πŸ”½ πŸ”΄
Duration 2.6 s 2.55 s 1.92% πŸ”Ό 🟒
Hitch time ratio 5 ms per s 7.52 ms per s -50.4% πŸ”½ πŸ”΄
Frame rate 76 fps 74.17 fps 2.41% πŸ”Ό 🟒
Number of hitches 1.2 2.2 -83.33% πŸ”½ πŸ”΄

Stream-SDK-Bot avatar Jun 17 '24 22:06 Stream-SDK-Bot

StreamChat XCMetrics

target metric benchmark branch performance status
MessageList Hitches total duration 10 ms 10.01 ms -0.1% πŸ”½ 🟑
Duration 2.6 s 2.54 s 2.31% πŸ”Ό 🟒
Hitch time ratio 4 ms per s 3.95 ms per s 1.25% πŸ”Ό 🟒
Frame rate 79 fps 77.99 fps 1.28% πŸ”Ό 🟒
Number of hitches 1 1.0 0.0% πŸ”½ 🟒
ChannelList Hitches total duration 12.5 ms 28.37 ms -126.96% πŸ”½ πŸ”΄
Duration 2.6 s 2.56 s 1.54% πŸ”Ό 🟒
Hitch time ratio 5 ms per s 11.08 ms per s -121.6% πŸ”½ πŸ”΄
Frame rate 76 fps 73.72 fps 3.0% πŸ”Ό 🟒
Number of hitches 1.2 2.8 -133.33% πŸ”½ πŸ”΄

Stream-SDK-Bot avatar Jun 18 '24 13:06 Stream-SDK-Bot

StreamChat XCMetrics

target metric benchmark branch performance status
MessageList Hitches total duration 10 ms 8.34 ms 16.6% πŸ”Ό 🟒
Duration 2.6 s 2.55 s 1.92% πŸ”Ό 🟒
Hitch time ratio 4 ms per s 3.27 ms per s 18.25% πŸ”Ό 🟒
Frame rate 79 fps 78.04 fps 1.22% πŸ”Ό 🟒
Number of hitches 1 0.8 20.0% πŸ”Ό 🟒
ChannelList Hitches total duration 12.5 ms 33.38 ms -167.04% πŸ”½ πŸ”΄
Duration 2.6 s 2.55 s 1.92% πŸ”Ό 🟒
Hitch time ratio 5 ms per s 13.08 ms per s -161.6% πŸ”½ πŸ”΄
Frame rate 76 fps 73.75 fps 2.96% πŸ”Ό 🟒
Number of hitches 1.2 3.2 -166.67% πŸ”½ πŸ”΄

Stream-SDK-Bot avatar Jun 18 '24 13:06 Stream-SDK-Bot

@nuno-vieira if we would use cursor for pagination, would it solve these pagination issues? (but I guess it is a bit of a change as well)

laevandus avatar Jul 01 '24 06:07 laevandus