Page MenuHomePhabricator

[lib, web] [feat] [ENG-536] hook up sidebar data to search modal
AbandonedPublic

Authored by tomek on May 16 2022, 2:31 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Nov 20, 11:59 PM
Unknown Object (File)
Wed, Nov 20, 5:00 PM
Unknown Object (File)
Wed, Nov 20, 5:00 PM
Unknown Object (File)
Wed, Nov 20, 5:00 PM
Unknown Object (File)
Wed, Nov 20, 5:00 PM
Unknown Object (File)
Sat, Nov 16, 12:33 AM
Unknown Object (File)
Sat, Nov 9, 3:49 PM
Unknown Object (File)
Sat, Nov 9, 3:49 PM

Details

Summary

Add search sidebar functionality to search modal

I still need to style the sidebar items and the modal when it doesn't have content which I'll update in a following diff.

web:

CleanShot 2022-05-16 at 18.00.57.gif (462×800 px, 831 KB)

native:
CleanShot 2022-05-16 at 18.00.57.gif (462×800 px, 831 KB)

Test Plan

Go to sidebar in web/ and native. Test functionality. Both should work as they did before. Web UI should be updated

Diff Detail

Repository
rCOMM Comm
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

benschac added inline comments.
lib/hooks/search-sidebars.js
71 ↗(On Diff #12776)

clear query isn't used now that we're using <SearchModal>

tomek requested changes to this revision.May 19 2022, 1:25 AM

After this diff, something is wrong with the design of the hook. We have two ways of updating the search text: by calling the hook with different text and by calling onChangeSearchText. Could you spend some time searching for a design which is easier to reason about? If there's none, please try to explain why do we need to have these complicated state transitions.

This revision now requires changes to proceed.May 19 2022, 1:25 AM
tomek abandoned this revision.
tomek edited reviewers, added: benschac; removed: tomek.

The task from the title https://linear.app/comm/issue/ENG-536/sidebar-list-modal-re-style - is marked as done. If we decide to do something more about that issue, it would be probably easier to do it from scratch instead of figuring out how to make this stack solve the problem.