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, Jul 6, 1:54 PM
Unknown Object (File)
Sun, Jun 30, 11:48 AM
Unknown Object (File)
Sun, Jun 30, 5:20 AM
Unknown Object (File)
Sat, Jun 29, 5:05 PM
Unknown Object (File)
Fri, Jun 28, 7:06 AM
Unknown Object (File)
Mon, Jun 24, 10:05 PM
Unknown Object (File)
Mon, Jun 17, 8:09 PM
Unknown Object (File)
Mon, Jun 17, 3:31 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
Lint Not Applicable
Unit
Tests Not Applicable

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 ↗(On Diff #13626)

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 ↗(On Diff #13626)

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 ↗(On Diff #13626)

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

Support alternative button variants