Page MenuHomePhabricator

[web] Introduce a modal that allows adding new friends / blocking users
ClosedPublic

Authored by tomek on Jun 21 2022, 6:00 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Nov 9, 8:53 PM
Unknown Object (File)
Sat, Nov 9, 4:02 PM
Unknown Object (File)
Fri, Oct 25, 9:26 PM
Unknown Object (File)
Oct 15 2024, 9:32 AM
Unknown Object (File)
Oct 14 2024, 5:41 PM
Unknown Object (File)
Oct 14 2024, 12:46 AM
Unknown Object (File)
Oct 14 2024, 12:46 AM
Unknown Object (File)
Oct 14 2024, 12:46 AM

Details

Summary

The modal uses search modal internally and can be configured by setting name, labels and action (friend / block).

Depends on D4310

Test Plan

Render the modal with some props and check if it looks correctly - it should match friend / block list modal.
Check if users are filtered according to excludedStatuses and if clicking the confirm button updates their status.

Diff Detail

Repository
rCOMM Comm
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

tomek requested review of this revision.Jun 21 2022, 6:09 AM
atul added inline comments.
web/settings/relationship/add-users-list-modal.react.js
50

It seems a little strange to me that we're passing this generator function as the child prop of SearchModal

I'm used to the children prop being typed as React.Node or string... but I guess this makes sense the way SearchModal is being re-used

This revision is now accepted and ready to land.Jun 21 2022, 12:55 PM
web/settings/relationship/add-users-list-modal.react.js
50

Agree it's weird to use children like this, but I've previously been convinced about @palys-swm on it in some scenario (don't think it was SearchModal, but maybe). @palys-swm can you remind me what the justification is here?

web/settings/relationship/add-users-list-modal.react.js
50

It was the same component - SearchModal. I described the rationale in the comment https://phab.comm.dev/D3494#96476

Support alternative button variants