Page MenuHomePhabricator

[native] Lift `searchUsers` and `onChangeSearchText` to `ConnectedChatThreadList`
ClosedPublic

Authored by atul on Sep 11 2023, 2:16 PM.
Tags
None
Referenced Files
F3048033: D9134.diff
Tue, Oct 22, 9:32 PM
Unknown Object (File)
Sat, Oct 19, 2:14 AM
Unknown Object (File)
Sat, Oct 19, 2:14 AM
Unknown Object (File)
Sat, Oct 19, 2:13 AM
Unknown Object (File)
Sat, Oct 19, 2:07 AM
Unknown Object (File)
Sat, Oct 12, 2:09 AM
Unknown Object (File)
Wed, Oct 2, 7:59 AM
Unknown Object (File)
Thu, Sep 26, 5:53 PM
Subscribers

Details

Summary

(I initially had a huge diff that converted ChatThreadList to a functional component and added various memoizations. However, I realized that diff would be pretty difficult to review so I'm breaking down the refactor into hopefully easier to review pieces.)

This diff is just one step in the process of converting ChatThreadList into a functional component. When this work is done, we will be able to avoid a lot of re-rendering and hopefully improve performance quite a bit.

In subsequent diffs will

  1. Lift up "search-related" JSX
  2. etc.. continue turning ChatThreadList into a functional component so we can more precisely memoize things, particularly ChatThreadListItems.

Depends on D9133

Test Plan

Search experience continues to work as expected. Can search for users/threads/etc. as before.

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

atul requested review of this revision.Sep 11 2023, 2:36 PM

please make sure to check out inline comment before landing

native/chat/chat-thread-list.react.js
132 ↗(On Diff #30942)

IIRC mixed would be a better way to type this

This revision is now accepted and ready to land.Sep 12 2023, 9:25 PM
native/chat/chat-thread-list.react.js
132 ↗(On Diff #30942)

That's fair.

In a couple diffs though I completely remove these props after merging everything into a single component, so I think it's fine to leave as-is for now since this is temporary?