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
F3487642: D4311.id13837.diff
Wed, Dec 18, 8:35 AM
F3487148: D4311.diff
Wed, Dec 18, 7:05 AM
Unknown Object (File)
Wed, Dec 4, 12:47 PM
Unknown Object (File)
Nov 17 2024, 3:50 AM
Unknown Object (File)
Nov 9 2024, 8:53 PM
Unknown Object (File)
Nov 9 2024, 4:02 PM
Unknown Object (File)
Oct 25 2024, 9:26 PM
Unknown Object (File)
Oct 15 2024, 9:32 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