Page MenuHomePhabricator

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

Authored by jacek on Apr 15 2022, 4:45 AM.
Tags
None
Referenced Files
F3380652: D3745.id12096.diff
Thu, Nov 28, 1:12 AM
Unknown Object (File)
Sun, Nov 24, 8:59 AM
Unknown Object (File)
Sun, Nov 24, 8:42 AM
Unknown Object (File)
Sun, Nov 24, 5:24 AM
Unknown Object (File)
Fri, Nov 22, 12:40 PM
Unknown Object (File)
Wed, Nov 13, 1:11 AM
Unknown Object (File)
Tue, Nov 12, 3:43 PM
Unknown Object (File)
Sat, Nov 9, 10:47 PM

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.