Page MenuHomePhabricator

[lib] Introduce `useAvailableThreadMemberActions` and consume in `web/Member`
ClosedPublic

Authored by atul on May 6 2024, 12:23 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Nov 29, 4:50 PM
Unknown Object (File)
Fri, Nov 29, 4:34 PM
Unknown Object (File)
Fri, Nov 29, 2:37 PM
Unknown Object (File)
Fri, Nov 29, 1:02 PM
Unknown Object (File)
Sat, Nov 23, 5:30 PM
Unknown Object (File)
Thu, Nov 21, 2:21 AM
Unknown Object (File)
Thu, Nov 21, 2:21 AM
Unknown Object (File)
Sun, Nov 10, 11:41 AM
Subscribers
None

Details

Summary

Similar to getAvailableThreadMemberActions but consumes useThreadHasPermission instead of threadHasPermission.

Also consume hook in web/Member to show usage.

Test Plan

flow + close reading for now

Logged return value of getAvailableThreadMemberActions before and useAvailableThreadMemberActions after to ensure that they remained the same.

Before:

d3e5af.png (406×480 px, 40 KB)

After:

b6778a.png (300×780 px, 34 KB)

Diff Detail

Repository
rCOMM Comm
Branch
master
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

atul requested review of this revision.May 6 2024, 12:52 PM

Will getAvailableThreadMemberActions be deprecated at the end of this stack? If not, I think it would be good to factor out the logic instead of copy-pasting

lib/shared/thread-utils.js
1696

Nit

This revision is now accepted and ready to land.May 6 2024, 1:02 PM

rebase before addressing feedback

atul edited the test plan for this revision. (Show Details)

Will getAvailableThreadMemberActions be deprecated at the end of this stack? If not, I think it would be good to factor out the logic instead of copy-pasting

Gets deleted in D11914