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

[Feature Request]: Using the PasswordInput there is no option to gray out the toggle for show/hide password #17148

Open
1 task done
aknguyen7 opened this issue Aug 12, 2024 · 5 comments

Comments

@aknguyen7
Copy link

aknguyen7 commented Aug 12, 2024

The problem

Using the PasswordInput there is no option to gray out the toggle for show/hide password

The solution

We'd like the ability to able to have the toggle password enable/disable (gray out), hide/show as we have the scenario in edit case of a secret where we do not know the actual value of the secret, we only know that the value is being set so we display with ******, having the ability to disable the toggle password can help eliminate the confusion. Taylor Jones asked to open a carbon issue during Carbon office hour last month.

Examples

https://react.carbondesignsystem.com/?path=/docs/components-passwordinput--overview

Application/PAL

No response

Business priority

Medium Priority = upcoming release but is not pressing

Available extra resources

No response

Code of Conduct

Copy link
Contributor

Thank you for submitting a feature request. Your proposal is open and will soon be triaged by the Carbon team.

If your proposal is accepted and the Carbon team has bandwidth they will take on the issue, or else request you or other volunteers from the community to work on this issue.

@tay1orjones
Copy link
Member

@aknguyen7 Would <TextInput type="password" /> work for your use case? It should be functionally equivalent to PasswordInput without the toggle button.

@aknguyen7
Copy link
Author

@tay1orjones the PasswordInput work better for our case as we still need the toggle button but with ability to enable/disable it

@tay1orjones
Copy link
Member

@aknguyen7 We chatted about this as a team today but weren't sure about a couple details of your use case. If the hide/show button could be disabled, when/why would you mark it disabled? and when/why would you make it enabled again?

@aknguyen7
Copy link
Author

@tay1orjones Hi Taylor, for our case where we managed secrets, after a secret already created when a user go to that secret page to do an edit/update we do not display the actual secret (since we don't have that data) so we display ********* as the value in the PasswordInput, we would need to disable the toggle button as enable it will not shown the actual secret just ******** again). When the user start typing to edit/change then we would enable the toggle button. Let me know if you still have questions. Thanks for consider it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Later 🧊
Development

No branches or pull requests

3 participants