Page MenuHomePhabricator

[web] use AddUsersList in SubchannelMembers
ClosedPublic

Authored by ginsu on Feb 13 2024, 11:35 PM.
Tags
None
Referenced Files
Unknown Object (File)
Apr 8 2024, 10:07 AM
Unknown Object (File)
Apr 8 2024, 10:07 AM
Unknown Object (File)
Apr 8 2024, 10:07 AM
Unknown Object (File)
Apr 8 2024, 10:07 AM
Unknown Object (File)
Apr 8 2024, 10:07 AM
Unknown Object (File)
Apr 1 2024, 7:36 AM
Unknown Object (File)
Mar 11 2024, 6:19 AM
Unknown Object (File)
Mar 7 2024, 4:09 AM
Subscribers

Details

Summary

This diff updates the SubchannelMembers to use the new AddUsersList that the add friends + add members modals uses. When I first initially attempted to implement this, I was running into an issue where the users in this list were not a part of the parent channel and instead I was seeing other users not apart of the parent channel or community

This was caused because I was initially using useAddMembersListUserInfos which has different logic for selecting members than what I needed for when you create a potential sub channel. To fix this I created a new hook called useSubchannelAddMembersListUserInfos which uses the logic previously found in SubchannelMembers for selecting the correct potential users and transformed that data to what was needed for the AddUsersList component

Linear task: https://linear.app/comm/issue/ENG-6735/add-member-list-for-subchannel-creation-is-not-reflecting-the-correct

Depends on D10994

Test Plan

Please see the demo video below

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

ginsu edited the test plan for this revision. (Show Details)
ginsu added reviewers: atul, inka.
atul added inline comments.
web/modals/threads/create/compose-subchannel-modal.react.js
260–263 ↗(On Diff #37056)

Wouldn't hurt to memoize here.

This revision is now accepted and ready to land.Feb 14 2024, 5:54 PM

address feedback + rebase before landing

This revision was landed with ongoing or failed builds.Feb 15 2024, 4:26 AM
This revision was automatically updated to reflect the committed changes.