Page MenuHomePhabricator

[web] Fetch latest messages in chat list
AbandonedPublic

Authored by michal on Jun 16 2023, 3:39 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Nov 9, 4:30 PM
Unknown Object (File)
Fri, Oct 18, 9:01 AM
Unknown Object (File)
Fri, Oct 18, 9:00 AM
Unknown Object (File)
Fri, Oct 18, 8:51 AM
Unknown Object (File)
Sep 18 2024, 1:59 PM
Unknown Object (File)
Sep 15 2024, 5:21 PM
Unknown Object (File)
Sep 15 2024, 5:17 PM
Unknown Object (File)
Sep 15 2024, 4:49 PM
Subscribers

Details

Summary

Part of ENG-3976
Fetches more messages for threads, when the user is near the end of the thread list.
Additionaly if there not enough threads to fill the whole thread list, onItemsRendered doesn't fire (quirk of react-window) so we wouldn't fetch more messages. Because of that there's an useEffect that calculates if the current thread list is smaller than the total height and if yes tries fetching more messages.

Depends on D8234

Test Plan

Try scrolling the thread list and check if threads are correctly loading and there are no jumping threads.

Diff Detail

Repository
rCOMM Comm
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

web/chat/chat-thread-list.react.js
73

Why is this hardcoded? Why cannot messages for 'Background' be fetched here?

98–100

In the first run totalHeight is sizes.search, so it is greater than currentHeight which is 0. Why do any messages get fetched?

109

Is this necessary?

We are changing the approach for this task, so I'm abandoning this diff. More info in the linear task.