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)
Sun, Mar 31, 1:20 PM
Unknown Object (File)
Sun, Mar 31, 1:17 PM
Unknown Object (File)
Mar 5 2024, 6:01 AM
Unknown Object (File)
Mar 5 2024, 6:01 AM
Unknown Object (File)
Mar 5 2024, 6:01 AM
Unknown Object (File)
Feb 22 2024, 11:43 PM
Unknown Object (File)
Feb 22 2024, 10:36 PM
Unknown Object (File)
Feb 22 2024, 2:30 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.