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)
Sun, Oct 27, 12:45 AM
Unknown Object (File)
Tue, Oct 22, 1:15 PM
Unknown Object (File)
Tue, Oct 22, 9:04 AM
Unknown Object (File)
Tue, Oct 22, 8:50 AM
Unknown Object (File)
Tue, Oct 22, 8:34 AM
Unknown Object (File)
Tue, Oct 22, 8:34 AM
Unknown Object (File)
Tue, Oct 22, 7:13 AM
Unknown Object (File)
Tue, Oct 22, 3:30 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
Lint
Lint Not Applicable
Unit
Tests Not Applicable

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 ↗(On Diff #39871)

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