Skip to content

Use design sytem colors for password strength meter#9811

Merged
aduth merged 1 commit intomainfrom
aduth-pw-strength-lgds
Dec 21, 2023
Merged

Use design sytem colors for password strength meter#9811
aduth merged 1 commit intomainfrom
aduth-pw-strength-lgds

Conversation

@aduth
Copy link
Contributor

@aduth aduth commented Dec 20, 2023

🛠 Summary of changes

Refactors password strength styling, with the only user-facing visual effect being that it adopts standard design system colors for password feedback.

Originally this started as a continuation of the work in #9799 to eliminate the few remaining usages of clearfix. Incrementally, this also works toward a broader refactor of the password strength implementation toward frontend conventions (ViewComponent, TypeScript, BEM CSS class naming, per-component stylesheet).

📜 Testing Plan

Verify no regression in the behavior of password feedback being shown:

  1. Go to http://localhost:3000
  2. Sign in
  3. From account dashboard, click "Edit password"
  4. (Reauthenticate if prompted)
  5. Enter a "New password" value
  6. Observe password strength feedback

👀 Screenshots

Strength Before After
Very Weak before-very-weak after-very-weak
Weak before-weak after-weak
Average before-average after-average
Good before-good after-good
Great before-great after-great

changelog: User-Facing Improvements, Password Strength, Use consistent colors for password strength feedback
.pw-average {
.pw-bar:nth-child(-n + 2) {
background-color: $average;
.pw-weak &:nth-child(-n + 1) {
Copy link
Contributor

Choose a reason for hiding this comment

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

looks like pw-weak , etc are defined in packs/pw-strength.js, should we update that to use the expanded password-strength__weak style or just leave it?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yep, I've got a lot more planned here for follow-on pull requests, and this is one of them. The problem I've had with password strength is that every time I've tried to touch it in the past, I end up doing a major overhaul, so I'm trying to do this a little more incrementally this time 😅

@aduth
Copy link
Contributor Author

aduth commented Dec 20, 2023

Related Slack thread for UX feedback: https://gsa-tts.slack.com/archives/C05R6BLVAQG/p1703086772393729

@aduth aduth merged commit f00bb67 into main Dec 21, 2023
@aduth aduth deleted the aduth-pw-strength-lgds branch December 21, 2023 13:41
@jmdembe jmdembe mentioned this pull request Dec 21, 2023
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