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
F3295113: D3382.id10204.diff
Sat, Nov 16, 8:55 PM
F3294876: D3382.id10525.diff
Sat, Nov 16, 8:28 PM
F3294092: D3382.diff
Sat, Nov 16, 6:28 PM
Unknown Object (File)
Fri, Nov 8, 12:42 PM
Unknown Object (File)
Tue, Nov 5, 8:28 PM
Unknown Object (File)
Oct 16 2024, 8:31 AM
Unknown Object (File)
Oct 14 2024, 1:03 AM
Unknown Object (File)
Oct 14 2024, 1:03 AM

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
Branch
jacek/members-actions-callbacks
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

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

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

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