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)
Tue, Sep 10, 8:16 PM
Unknown Object (File)
Sun, Aug 25, 9:03 PM
Unknown Object (File)
Sun, Aug 25, 9:03 PM
Unknown Object (File)
Sun, Aug 25, 9:03 PM
Unknown Object (File)
Sun, Aug 25, 9:02 PM
Unknown Object (File)
Sun, Aug 25, 8:56 PM
Unknown Object (File)
Thu, Aug 22, 3:59 PM
Unknown Object (File)
Wed, Aug 21, 11:30 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.