Page MenuHomePhabricator

[native] Remove `renderSearch` in `ChatThreadList` and inline `ChatThreadListSearch` directly
ClosedPublic

Authored by atul on Sep 14 2023, 1:41 PM.
Tags
None
Referenced Files
F3359534: D9208.id31213.diff
Sun, Nov 24, 9:35 AM
F3359493: D9208.id31214.diff
Sun, Nov 24, 9:27 AM
F3359247: D9208.diff
Sun, Nov 24, 8:04 AM
Unknown Object (File)
Wed, Nov 20, 3:43 PM
Unknown Object (File)
Wed, Nov 20, 8:13 AM
Unknown Object (File)
Tue, Nov 19, 6:02 PM
Unknown Object (File)
Sun, Oct 27, 12:55 AM
Unknown Object (File)
Sun, Oct 27, 12:55 AM
Subscribers

Details

Summary

Instead of passing a function to create ChatThreadListSearch we can inline the component directly.

As part of this we also replace additionalProps w/ more precise innerSearchAutoFocus and innerSearchActive props.


Depends on D9207

Test Plan

Search experience continues to look and work as expected. Set logs in all expected callbacks to ensure that they fired as expected. Made sure that x-icon and "Cancel" button continue to look and behave as before.

Diff Detail

Repository
rCOMM Comm
Branch
master
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

atul published this revision for review.Sep 14 2023, 1:41 PM
tomek added inline comments.
native/chat/chat-thread-list.react.js
361 ↗(On Diff #31154)

We can use a shorthand

364 ↗(On Diff #31154)

We can also consider having an early return

This revision is now accepted and ready to land.Sep 18 2023, 3:58 AM
native/chat/chat-thread-list.react.js
361 ↗(On Diff #31154)

I'd prefer to be explicit here

364 ↗(On Diff #31154)

Will update to early return

address feedback: early-return