Page MenuHomePhabricator

[lib,native,web] move inline sidebar text to shared hook in lib
ClosedPublic

Authored by benschac on Apr 29 2022, 12:39 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Jan 16, 1:31 PM
Unknown Object (File)
Sun, Jan 12, 8:46 AM
Unknown Object (File)
Fri, Jan 10, 7:00 PM
Unknown Object (File)
Tue, Jan 7, 8:16 AM
Unknown Object (File)
Tue, Jan 7, 8:16 AM
Unknown Object (File)
Tue, Jan 7, 8:15 AM
Unknown Object (File)
Tue, Jan 7, 8:09 AM
Unknown Object (File)
Sun, Jan 5, 6:21 PM

Details

Summary

While looking into https://linear.app/comm/issue/ENG-530/inline-sidebar-re-style for web, I noticed that code in inline sidebar is exactly the same in native/ moving this code to a shared hook seemed like the logical choice moving forward with the feature. Additionally, the native design is very close to the web design so I should update them both at the same time to keep consistency.

Test Plan

Everything should work the same as it did before in both web/native. This code controls the text under a message when I new sidebar is created.

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

lib/hooks/inline-sidebar-text.react.js
32 ↗(On Diff #12122)

I feel like this should be in a useMemo. I'm going to make a new diff since this diff is purely about moving code around.

lib/hooks/inline-sidebar-text.react.js
32 ↗(On Diff #12122)

Thanks for factoring this out! I didn't look too closely at the red/green... assuming that this is just a simple move

This revision is now accepted and ready to land.May 2 2022, 11:36 AM

Thanks for factoring this out! I didn't look too closely at the red/green... assuming that this is just a simple move

Yes, I literally didn't change anything, just moved and deleted.