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)
Mon, Nov 25, 1:40 AM
Unknown Object (File)
Sun, Nov 24, 9:49 PM
Unknown Object (File)
Wed, Nov 13, 2:09 AM
Unknown Object (File)
Sat, Nov 2, 4:22 PM
Unknown Object (File)
Sat, Nov 2, 4:22 PM
Unknown Object (File)
Sat, Nov 2, 4:21 PM
Unknown Object (File)
Sat, Nov 2, 4:16 PM
Unknown Object (File)
Oct 16 2024, 6:36 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.