nextstrain / nextstrain.org

The Nextstrain website
https://nextstrain.org
GNU Affero General Public License v3.0
88 stars 49 forks source link

Groups: Add UI for managing members in Group #804

Open joverlee521 opened 6 months ago

joverlee521 commented 6 months ago

Context

The API endpoints for listing group members were added in https://github.com/nextstrain/nextstrain.org/pull/581 but we have not surfaced it through the group's splash page. I think this UI has been discussed before but I couldn't find any existing issue for it.

This was prompted by @trvrb's comment on Slack:

Just like on GitHub you can see who has view / edit access to a repo you have access to. Currently you can see which groups you belong to as a user, but you can't see which users belong to groups. However, you'd only want this to be visible to people you belong to the group. I don't think immediate priority, but would be nice.

Note this is specifically only considered existing members of existing Groups. New users/members flow is being considered in https://github.com/nextstrain/nextstrain.org/issues/729. New Groups flow is being considered in TBD.

Proposal

Add a new page for each group (/groups/<groupName>/settings/members) that should only be visible to members of the Group. The members page would list all existing members of a Group with their username + roles

If on the page as an "owner" of the Group, there should be additional UI options.

  1. The role becomes a drop down to update the member's role.
  2. A "Remove" button next to each member to remove the them from the group.
  3. Form for adding members, with input for username (of existing Nextstrain user) and drop down for role.
    • would be nice if username input autocompletes with existing usernames, but that can be added later

Both [2] and [3] probably should have confirmation modals. Should a member be allowed to remove themselves from a Group even if they are not an owner?

tsibley commented 5 months ago

This is part of the larger umbrella of UI for Groups. https://github.com/nextstrain/private/issues/57