-
Notifications
You must be signed in to change notification settings - Fork 27
Bug 1942137: Add show/hide password feature via new ValidatedPasswordField component #524
Conversation
valid bug 1942137 |
🚀 Deployed Preview: http://konveyor-forklift-ui-pr-524-preview.surge.sh ✨ Compare with current main branch: http://konveyor-forklift-ui-preview.surge.sh |
Codecov Report
@@ Coverage Diff @@
## main #524 +/- ##
==========================================
+ Coverage 59.70% 59.91% +0.20%
==========================================
Files 133 134 +1
Lines 4301 4323 +22
Branches 1069 1076 +7
==========================================
+ Hits 2568 2590 +22
Misses 1709 1709
Partials 24 24
Continue to review full report at Codecov.
|
label="Password" | ||
isRequired | ||
fieldId="vmware-password" | ||
/> | ||
<ValidatedTextInput | ||
field={vmwareForm.fields.fingerprint} | ||
label="Certificate SHA1 Fingerprint" | ||
label="SHA-1 Fingerprint" |
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.
"Fingerprint" should be "fingerprint", per PF4 guidelines.
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.
Agh dammit, thanks @apinnick. Will fix in another PR.
Resolves #468 (https://bugzilla.redhat.com/show_bug.cgi?id=1942137)
Also resolves #452 in the interest of time, because separate PRs for these two fixes would conflict.
Adds a new common component
ValidatedPasswordField
which adds a show/hide icon button on the right side of the field. Replaces the plain password input with this component in 3 places: VMware provider password, OpenShift provider SA token, and ESXi host admin password.The first commit puts the toggle icon next to the field label like it's done in MTC today, but then @vconzola pointed out that the PatternFly login page example has the icon in an InputGroup next to the input field (see patternfly/patternfly-react#5481), so the second commit switches to that design.
I had to duplicate some of the code from the lib-ui ValidatedTextInput component since it doesn't support InputGroups. We can add that feature to lib-ui and simplify this code in the future. Opened migtools/lib-ui#55 to track this.