Skip to content

Comments

Add initial Group members screen#1079

Merged
thomasiles merged 7 commits intomainfrom
add-users-screen
Apr 8, 2024
Merged

Add initial Group members screen#1079
thomasiles merged 7 commits intomainfrom
add-users-screen

Conversation

@thomasiles
Copy link
Contributor

Add new page to show members of a Group

Trello card: https://trello.com/c/o7SAFAWi/1401-add-screens-for-managing-existing-users-in-groups

This PR starts the work for managing members of a group.

It only tackles the basic journey of showing the members of a group. This is what members of a group with the role editor will see. Other members, group admins, org admins and super admins will all have options for adding and removing users fro the group.

image

When the group doesn't have any members, I've added some new content (which can be changed). I think this screen won't happen often but super admins and org admins might see it if all members are removed from a group:
image

Link from the group page:
image

Things to consider when reviewing

  • Ensure that you consider the wider context.
  • Does it work when run on your machine?
  • Is it clear what the code is doing?
  • Do the commit messages explain why the changes were made?
  • Are there all the unit tests needed?
  • Has all relevant documentation been updated?

Copy link
Contributor

@DavidBiddle DavidBiddle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code looks great, works on my machine, and good content too 💯

thomasiles and others added 7 commits April 8, 2024 09:07
To show the list of users within a group as shown in the designs, we
need a new route.

A new subresrouce is created with only the index. It's called
group_members to follow the convention of group_forms.

"Members" is the content designers choice for users belonging to a
group.
A new view and specs are added following the designs for listing members
of a group.

The action buttons and button to add new members hasn't been added.

They will be added in later commits.
Add a new controller for the group_members resource.

The only action is to list the members of the Group.
Only users who are members of a Group should be able to view the list of
members.
Add a link to the Group#show page to the new page to list members.

Use the list component to contain the change group name and group
members links.

Using the govuk-button group would layout the links horizontally on
desktop and stack them on mobile.

Instead, we use a list, which follows the way we do it with the options
when editing pages.
Add a new feature test for showing the the members of a group.
Co-authored-by: hannahkc <hannah.cooper@digital.cabinet-office.gov.uk>
@sonarqubecloud
Copy link

sonarqubecloud bot commented Apr 8, 2024

Quality Gate Passed Quality Gate passed

Issues
3 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@thomasiles thomasiles merged commit 23ac73f into main Apr 8, 2024
@thomasiles thomasiles deleted the add-users-screen branch April 8, 2024 08:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants