Page MenuHomePhabricator

[lib] Simplify `getRelativeMemberInfos`
ClosedPublic

Authored by atul on Dec 7 2023, 11:40 AM.
Tags
None
Referenced Files
F3158506: D10233.id34589.diff
Tue, Nov 5, 9:59 PM
F3158494: D10233.id34594.diff
Tue, Nov 5, 9:57 PM
F3158263: D10233.id34389.diff
Tue, Nov 5, 9:44 PM
F3157219: D10233.diff
Tue, Nov 5, 7:42 PM
Unknown Object (File)
Tue, Oct 15, 8:50 PM
Unknown Object (File)
Tue, Oct 15, 8:50 PM
Unknown Object (File)
Sep 26 2024, 6:11 AM
Unknown Object (File)
Sep 16 2024, 1:59 PM
Subscribers
None

Details

Summary

In subsequent diff going to split into two separate functions: getLegacyRelativeMemberInfos and getMinimallyEncodedRelativeMemberInfos and then toggle between then based on whether input RawThreadInfo is minimallyEncoded or not.

Since that diff is about duplicating existing functionality and branching... figure changing the actual functionality may be annoying for reviewers even though it's minimal (?)


Depends on D10227

Test Plan

CI/flow/etc.

Diff Detail

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

Event Timeline

atul requested review of this revision.Dec 7 2023, 12:25 PM
ashoat added inline comments.
lib/selectors/user-selectors.js
74–86

With the new Flow, I wonder if you can get rid of the branching

This revision is now accepted and ready to land.Dec 8 2023, 2:52 PM
This revision was landed with ongoing or failed builds.Dec 13 2023, 1:45 PM
This revision was automatically updated to reflect the committed changes.
lib/selectors/user-selectors.js
74–86

I was about to do that, but noticed that in the currentUserID case we unshift whereas in the non-currentUserID case we push.

Don't have full context on why we need these ordered in any particular way, but didn't want to mess with existing assumptions here.

Definitely let me know if I'm missing something and I'm happy to address.