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
F3362230: D3879.diff
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
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
Branch
inline-side-bar-ENG-530
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

lib/hooks/inline-sidebar-text.react.js
32

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.

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.