The logic was almost identical between platforms.
https://linear.app/comm/issue/ENG-10655/move-reactions-logic-to-specs
Depends on D14611
Differential D14612
[lib] Extract common logic from reaction hooks Authored by tomek on Apr 28 2025, 3:20 PM.
Details The logic was almost identical between platforms. https://linear.app/comm/issue/ENG-10655/move-reactions-logic-to-specs Depends on D14611 React to a message on both platforms in thin and thick threads.
Diff Detail
Event TimelineComment Actions LGTM, but we can probably simplify it more later. Comment Actions I think it is a good idea to simplify this, but I'm not sure if in this direction. The pattern that we can see here is quite unique - usually, we handle errors on a different layer than this, which is evident from the fact that other protocol functions don't need to receive an alert handler. So in this case I think that we should replicate the approach from other places and move the error handling to the component level. Regarding adding a utility that shows this kind of alert, I agree that this will simplify some places now, but these places probably shouldn't use this pattern in the first place. So after making our UI more consistent, I would expect that there won't be any need to have this utility. |