Page MenuHomePhabricator

[native, lib, web] move search sidebar functionality to lib hooks
ClosedPublic

Authored by benschac on May 12 2022, 2:37 PM.
Tags
None
Referenced Files
F1596969: D4022.id12969.diff
Fri, Apr 19, 6:12 PM
F1596968: D4022.id12814.diff
Fri, Apr 19, 6:12 PM
F1596967: D4022.id12807.diff
Fri, Apr 19, 6:12 PM
F1596966: D4022.id12771.diff
Fri, Apr 19, 6:12 PM
F1596965: D4022.id12743.diff
Fri, Apr 19, 6:12 PM
F1596964: D4022.id12595.diff
Fri, Apr 19, 6:12 PM
F1596963: D4022.id12821.diff
Fri, Apr 19, 6:12 PM
F1596962: D4022.id12746.diff
Fri, Apr 19, 6:12 PM

Details

Summary

move sidebar search to lib/hooks from web,native

Test Plan

use feature in both web and native

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

ashoat requested changes to this revision.May 12 2022, 3:42 PM
ashoat added inline comments.
lib/hooks/search-sidebars.js
11–12 ↗(On Diff #12598)

Missing $ReadOnly :(

This revision now requires changes to proceed.May 12 2022, 3:42 PM
lib/hooks/search-sidebars.js
10–13 ↗(On Diff #12653)

Think we can do something like this?

lib/hooks/search-sidebars.js
10–13 ↗(On Diff #12653)

that looks chill. Going to try it.

ashoat requested changes to this revision.May 15 2022, 9:40 PM
ashoat added inline comments.
lib/hooks/search-sidebars.js
11–12 ↗(On Diff #12677)

Missing $ReadOnly... again :( :(

This revision now requires changes to proceed.May 15 2022, 9:40 PM

Requesting review so this diff gets back in @ashoat's queue. I have a question about readonly syntax.

lib/hooks/search-sidebars.js
11–12 ↗(On Diff #12677)

I don't understand why this isn't valid. We're using a $ReadonlySet.

If you look at the previous diff changes, I had a ReadOnly, but @atul made that suggestion to use $ReadOnlySet which seems like it's just a convenience thing.

My understanding is:
$ReadOnly<Set<string>> is equal to $ReadOnlySet<string>

CleanShot 2022-05-16 at 10.31.03@2x.png (920×1 px, 129 KB)

lib/hooks/search-sidebars.js
11–12 ↗(On Diff #12677)

I think what's missing is the plus signs in front of text and results?

ashoat added 1 blocking reviewer(s): atul.

Very concerning that @benschac is confused about the difference between making a property of an object read-only, versus making the value stored in that property read-only. These are different concepts and it's critical that everybody on the team understands the difference.

My time is really limited, so would appreciate if @benschac could try to learn about the difference here without requiring my involvement. @benschac, if this is still confusing can you try to maybe consult @atul to learn more about what's going on here?

Additionally, there are still objects here that are not $ReadOnly!! I don't know how this is confusing... literally just look at every single object, and make sure each property has a plus sign. Please don't pass this back to me until this is addressed... it's been months of me repeating this feedback over and over, and it gets 10x more frustrating for me each time I have to repeat it.

lib/hooks/search-sidebars.js
18–20 ↗(On Diff #12746)

Missing $ReadOnly... again... again :( :( :(

lib/hooks/search-sidebars.js
31 ↗(On Diff #12821)

listData gets renamed to sidebars in this diff: https://phabricator.ashoat.com/D4067

This revision is now accepted and ready to land.May 19 2022, 12:21 PM