Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show user status as tag instead of strikethrough #2713

Merged
merged 4 commits into from
Feb 15, 2024

Conversation

CristinaRO
Copy link
Contributor

@CristinaRO CristinaRO commented Feb 13, 2024

The strikethrough is not part of the design system, so we've decided to use the govuk-tag style instead.

The design on the card showed green for active users, grey for suspended users, but there were no examples of locked or invited users.

I've chosen to only use green for active users, and grey for all other statuses.

Trello

Screenshots

Users - before

Screenshot 2024-02-13 at 20 10 33

Users - after

Screenshot 2024-02-13 at 19 28 38

API users - before

Screenshot 2024-02-14 at 17 00 25

API users - after

Screenshot 2024-02-15 at 12 41 14

This application is owned by the Access & Permissions team.

⚠️ This repo is Continuously Deployed: make sure you follow the guidance ⚠️

Follow these steps if you are doing a Rails upgrade.

@CristinaRO CristinaRO force-pushed the 280-use-govuk-tags-for-user-status branch 2 times, most recently from b2fa1fc to 39b356b Compare February 13, 2024 20:32
Copy link
Contributor

@chrislo chrislo left a comment

Choose a reason for hiding this comment

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

Looks like you might need to make govuk_tag available in the tests but otherwise this looks good to me 👍

@CristinaRO CristinaRO force-pushed the 280-use-govuk-tags-for-user-status branch from 39b356b to 61c1ec5 Compare February 14, 2024 12:25
The strikethrough is not part of the design system, so we've decided to
use the govuk-tag style instead.

The design on the card showed green for active users, grey for suspended
users, but there were no examples of locked or invited users.

I've chosen to only use green for active users, and grey for all other
statuses.

At James' suggestion, I created a new method, `status_with_tag`, to
avoid changing the display in other places where `status` is used, such
as the CSV export of the users, and the summary view for user edit pages
@CristinaRO CristinaRO force-pushed the 280-use-govuk-tags-for-user-status branch from 61c1ec5 to 35d09cb Compare February 14, 2024 17:19
Calum suggested it would be preferable to show API users' "Status"
(instead of "Suspended?") on the API users table, similar to the Users
table.

This allows us to show the status tag as "Active" or "Suspended", in a
similar way to the Users table, to create consistent expectations for
users of the interface.
Now that we are showing the API users' status similar to the users'
status, we can use the same helper method in the view. (There is
precedent for this, as the edit view uses the same method,
`summary_list_item_for_status`, for users and API users.)
Copy link
Contributor

@chrislo chrislo left a comment

Choose a reason for hiding this comment

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

Looks good to me!

@CristinaRO CristinaRO merged commit 79ac989 into main Feb 15, 2024
16 checks passed
@CristinaRO CristinaRO deleted the 280-use-govuk-tags-for-user-status branch February 15, 2024 14:02
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.

2 participants