-
Notifications
You must be signed in to change notification settings - Fork 26
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
feat(fields/password): add show/hide button #555
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for working on this. The approach is good, you just forgot to do a couple of things 😉
@@ -56,6 +56,7 @@ import OrigExpandIcon from './svg/expand.react.svg'; | |||
import OrigExportIcon from './svg/export.react.svg'; | |||
import OrigExternalLinkIcon from './svg/external-link.react.svg'; | |||
import OrigEyeCrossedIcon from './svg/eye-crossed.react.svg'; | |||
import OrigEyeIcon from './svg/eye.react.svg'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
need to remember to document this for the changelog
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code looks good to me. Thanks. Only blocked by the other PR and the state.
I think we are missing the initial state still.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you also add a VRT for showing the password?
I think we agreed with Malcolm to have it on the input not group. The group can test it in a rtl spec. |
@emmenko I don't think it makes sense to an interaction based test for showing password (ie, click with puppeteer, and then take percy snapshot), as all we would be testing is that the text changes, and the prop is passed to PasswordInput. We already visually test Password input in those states based on the isPasswordVisible prop. |
953f4d7
to
4f3626f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alright, it's good for me then!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Everything looks good to me! Maybe just need a design review of the percy diffs? 🙏
Is someone from design team reviewing the VRT diffs? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice 🎢 !
/cc @filippobocik can you check the VRT diffs? |
Works great, thanks! One little addition: If the PasswordField is disabled or read only, the show / hide button should be hidden. Gonna check out Percy afterwards. |
4f3626f
to
85539aa
Compare
@filippobocik I've updated the behaviour. |
Good stuff @jonnybel! ⛱ 🎉 |
Keeping your commits to match the changelog entries was 🔥 💯 @jonnybel |
Summary
Closes #551.
Description
Behaviour:
Removed the
isPasswordVisible
prop from thePasswordField
.