Page MenuHomePhabricator

[lib] [refactor] [ENG-530] add memo in inline sidebar hook
ClosedPublic

Authored by benschac on May 2 2022, 8:25 AM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Sep 18, 4:27 PM
Unknown Object (File)
Sat, Sep 14, 9:10 AM
Unknown Object (File)
Sat, Sep 14, 9:10 AM
Unknown Object (File)
Sat, Sep 14, 9:10 AM
Unknown Object (File)
Sat, Sep 14, 9:10 AM
Unknown Object (File)
Sat, Sep 14, 9:03 AM
Unknown Object (File)
Wed, Aug 28, 8:03 AM
Unknown Object (File)
Mon, Aug 26, 4:13 AM

Details

Summary

updating the hook per my comment in my last diff: https://phabricator.ashoat.com/D3879#inline-23803

Test Plan

use the application like normal. replied should reflect in a sidebar as they do normally.

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

benschac retitled this revision from [lib] [refactor] [ENG-530] add memo and nullish check in hook to [lib] [refactor] [ENG-530] add memo and nullish check in hook inline sidebar hook.
ashoat requested changes to this revision.May 2 2022, 8:36 AM
ashoat added inline comments.
lib/hooks/inline-sidebar-text.react.js
17 ↗(On Diff #12134)

Why are you changing this?

  1. If threadInfo is typed correctly, there should be no reason for the ?. operator here
  2. This change seems like it makes it possible for repliesCount to be 0. I don't think we want that, but I'm not sure

If you feel strongly about this change it should probably be in a separate diff.

This revision now requires changes to proceed.May 2 2022, 8:36 AM
benschac retitled this revision from [lib] [refactor] [ENG-530] add memo and nullish check in hook inline sidebar hook to [lib] [refactor] [ENG-530] add memo and nullish check in hook.May 2 2022, 8:41 AM
benschac added inline comments.
lib/hooks/inline-sidebar-text.react.js
17 ↗(On Diff #12134)

I don't feel strongly. That makes sense now that I'm looking at it for a second time.

remove nullish check and optional flag

benschac retitled this revision from [lib] [refactor] [ENG-530] add memo and nullish check in hook to [lib] [refactor] [ENG-530] add memo in inline sidebar hook .May 2 2022, 8:48 AM
This revision is now accepted and ready to land.May 2 2022, 8:52 AM