HomePhabricator
Diffusion Comm d6fb44cfa346

[web] refactored ThreadPicker from class based to functional

Description

[web] refactored ThreadPicker from class based to functional

Summary:
refactored the ThreadPicker component to be a functional component now. The purpose of this was to optimize the searching and filtering of threads through the useMemo hook. Again there is no UI for this diff due to Search breaking the app since the focusing/blurring of the picker component prevents input in Search


ENG-1914

Depends on D5239

Test Plan:
To test the search feature, please modify the return function:

return (
  <div
    className={css.container}
    tabIndex="0"
    ref={pickerDivRef}
    // onBlur={closePicker}
    onKeyDown={onPickerKeyDown}
    // onMouseDown={onMouseDown}
  >
    <Search
      searchText={searchText}
      onChangeText={onChangeSearchText}
      placeholder="Search chats"
    />
    {options}
  </div>
);

You will also need to import the Search component from ../components/search.react at the top of the file

Once you have the Search component being returned you can add a new entry in the calendar and test that the search feature is working as expected

Reviewers: atul, rohan, abosh, tomek

Reviewed By: atul

Subscribers: ashoat, tomek, atul, abosh

Differential Revision: https://phab.comm.dev/D5289

Details

Provenance
ginsuAuthored on Oct 3 2022, 12:16 PM
Reviewer
atul
Differential Revision
D5289: [web] refactored ThreadPicker from class based to functional
Parents
rCOMM3ea219748a79: [web] implemented search feature for Thread Picker
Branches
Unknown
Tags
Unknown