Page MenuHomePhabricator

[web] [feat] [ENG-991] add promote api call to promote menu drop down
AbandonedPublic

Authored by benschac on Apr 14 2022, 12:49 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Nov 5, 6:03 AM
Unknown Object (File)
Sun, Nov 3, 5:16 PM
Unknown Object (File)
Wed, Oct 16, 8:40 AM
Unknown Object (File)
Wed, Oct 16, 8:40 AM
Unknown Object (File)
Wed, Oct 9, 6:32 PM
Unknown Object (File)
Wed, Oct 9, 6:20 PM
Unknown Object (File)
Wed, Oct 9, 5:51 PM
Unknown Object (File)
Sep 27 2024, 8:57 AM

Details

Summary

Add API call, makes promote menu button promote thread to chat list item, still need loading and error states. This is just making the API call, and the already implemented functionality for promoting thread in the shared redux store.

Screen Recording 2022-04-14 at 03.54.02 PM.gif (12 MB)

Test Plan

click the promote button on a thread that's promoteable. The logic for thread promotion showing correct sub-threads coming in the next diff.

Diff Detail

Repository
rCOMM Comm
Branch
benjamin/eng-991-promote-sidebar-to-subthread-on-web
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

benschac edited the test plan for this revision. (Show Details)
jacek added inline comments.
web/chat/thread-menu.react.js
211–213

Do we need to wrap it in try... catch... block just to call console.error(e)? Isn't the exception shown in console anyway - without this block?
I don't think we have such a convention, as I searched through web code, and found that we use try... catch only in a few places where we're somehow handling an error by e.g. setting the state, and even then we throw an error again in catch.

This revision now requires changes to proceed.Apr 15 2022, 2:40 AM

this diff isn't relevant anymore after I refactored the onClickPromoteThread call into a hook in D3746

web/chat/thread-menu.react.js
211–213

I just copy pasted what was here: https://github.com/CommE2E/comm/blob/master/native/chat/settings/thread-settings-promote-sidebar.react.js#L80

but, I changed throw to console.error. Yeah, I agree with you, having the console.error doesn't do anything.

additionally, this diff isn't relevant anymore after I refacted the onClickPromoteThread call into a hook in D3746