Page MenuHomePhabricator

[web] Introduce member action callbacks in `ThreadMember` component
ClosedPublic

Authored by jacek on Mar 9 2022, 5:29 AM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Nov 25, 2:09 PM
Unknown Object (File)
Mon, Nov 25, 12:58 PM
Unknown Object (File)
Wed, Nov 20, 4:30 PM
Unknown Object (File)
Nov 16 2024, 8:55 PM
Unknown Object (File)
Nov 16 2024, 8:28 PM
Unknown Object (File)
Nov 16 2024, 6:28 PM
Unknown Object (File)
Nov 8 2024, 12:42 PM
Unknown Object (File)
Nov 5 2024, 8:28 PM

Details

Summary

Introduce callbacks in menu in ThreadMember component - the same that are used in mobile app.

Test Plan

The actions can be tested after introducing memebrs modal

Diff Detail

Repository
rCOMM Comm
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

tomek added 1 blocking reviewer(s): atul.

Accepting, but adding @atul as a blocking reviewer just to clarify language questions

web/modals/threads/members/member.react.js
71 ↗(On Diff #10204)

It might be a good idea to get some input from a native speaker (maybe @atul). I usually prefer using toggle to indicate that we're alternating between two states and switch if there are more possible states. Is that interpretation correct and we should prefer toggle, or is switch also clear in this case?

I think that onSwitchAdmin could mean that we have an admin and now we want to make some other user an admin.

136 ↗(On Diff #10204)

Another language question: is onRemoveUser misleading in this context? For me onRemoveUser means that somethings happens when we remove a user. But in this case, this happens on click, so either we should have onClick={removeUser} or onClick={onClickRemoveUser}. Does that make sense?

Resigning since I responded to the language question but didn't do a full review

web/modals/threads/members/member.react.js
71 ↗(On Diff #10204)

I agree that toggle would make more sense than switch since

  • there are two possible states and toggle makes it clear we are dealing with a boolean
  • switch seems like the admin role is being passed around... but I guess the function is called switchMemberAdminRoleInThread?

Maybe something like onMemberAdminRoleToggled? That might be too long? Can't think of anything else at the moment

This revision is now accepted and ready to land.Mar 14 2022, 4:49 PM