Page MenuHomePhabricator

[web] Introduce "Add Members" button in `MembersModal`
ClosedPublic

Authored by jacek on Apr 15 2022, 4:45 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Nov 3, 2:50 PM
Unknown Object (File)
Sun, Oct 27, 10:10 PM
Unknown Object (File)
Wed, Oct 23, 6:43 AM
Unknown Object (File)
Tue, Oct 22, 10:49 PM
Unknown Object (File)
Sun, Oct 20, 7:20 PM
Unknown Object (File)
Sun, Oct 20, 12:38 PM
Unknown Object (File)
Sat, Oct 19, 11:16 AM
Unknown Object (File)
Sat, Oct 19, 11:16 AM

Details

Summary

Introduce button in Members modal launching "AddMembrsModal". The button is displayed if user has "ADD_MEMBERS" permission.

Screenshot_Google Chrome_2022-04-15_140135.png (809×482 px, 30 KB)

Test Plan

Launch members modal from thread action menu in some community thread. The button should be displayed and launching "AddMembersModal"

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

atul added inline comments.
web/modals/threads/members/members-modal.react.js
89–92 ↗(On Diff #11515)

Wonder if it would be cleaner to pull this outside of the React.useMemo?

This revision is now accepted and ready to land.Apr 15 2022, 10:45 AM
web/modals/threads/members/members-modal.react.js
89–92 ↗(On Diff #11515)

I missed this comment, sorry.
I'm not sure if it would be cleaner, but we agreed with Tomek, that it could improve performance a bit - the memo wouldn't depend on the whole threadInfo.
I'll move it outside.

Move canAddMembers outside the useMemo.