-
Notifications
You must be signed in to change notification settings - Fork 757
Add toggle button for secret visibility in InteractionsInputDialog #13584
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
base: main
Are you sure you want to change the base?
Conversation
- Added JavaScript function to toggle input type between text and password - Added FluentButton with eye icons next to SecretText inputs - Implemented state management for visibility tracking - Added CSS styling for the toggle button layout - Used existing GridValueMaskShowValue/HideValue resource strings Co-authored-by: JamesNK <303201+JamesNK@users.noreply.github.com>
src/Aspire.Dashboard/Components/Dialogs/InteractionsInputDialog.razor.cs
Outdated
Show resolved
Hide resolved
src/Aspire.Dashboard/Components/Dialogs/InteractionsInputDialog.razor.cs
Outdated
Show resolved
Hide resolved
src/Aspire.Dashboard/Components/Dialogs/InteractionsInputDialog.razor.cs
Outdated
Show resolved
Hide resolved
…RenderAsync, use SafeDisposeAsync - Removed _secretTextVisibility dictionary, tracked on InputViewModel.IsSecretTextVisible property instead - Moved OnAfterRenderAsync back to original location after OnParametersSet - Used JSInteropHelpers.SafeDisposeAsync for proper JS module disposal - Simplified IsSecretTextVisible method by directly accessing property - Made GetSecretTextIcon static as it doesn't access instance data Co-authored-by: JamesNK <303201+JamesNK@users.noreply.github.com>
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 13584Or
iex "& { $(irm https://raw.githubusercontent.com/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 13584" |
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.
Pull request overview
This PR adds password visibility toggle functionality to secret text inputs in the InteractionsInputDialog, allowing users to reveal or hide password values using eye/eye-off icons.
Key changes:
- Added toggle button with eye icons to SecretText inputs for showing/hiding password text
- Implemented JavaScript interop to toggle input type between "password" and "text"
- Added
IsSecretTextVisibleproperty toInputViewModelto track visibility state per input field
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
InputViewModel.cs |
Added IsSecretTextVisible property to track visibility state |
InteractionsInputDialog.razor.js |
Added JavaScript function to toggle password input type |
InteractionsInputDialog.razor.css |
Updated CSS for flex container layout and spacing |
InteractionsInputDialog.razor.cs |
Added JS interop setup, toggle handler, and icon getter method |
InteractionsInputDialog.razor |
Added toggle button UI next to SecretText inputs |
InteractionInputField.razor |
Renamed CSS class and adjusted progress ring styling |
Description
Adds a toggle button to SecretText inputs in
InteractionsInputDialogthat allows users to reveal/hide password text. The button displays to the right of the input field using eye icons consistent with the dashboard's existing masking UI.Update: Moved toggle button inside text box area. This UX pattern is more popular

Implementation:
typeattribute between "password" and "text"InputViewModel.IsSecretTextVisibleproperty to support multiple password fields in same dialogGridValueMaskShowValue/HideValueresource strings andIcons.Regular.Size16.Eye/EyeOfficonsJSInteropHelpers.SafeDisposeAsyncfor proper JS module disposal with circuit disconnect handlingFiles changed:
InteractionsInputDialog.razor- Added toggle button UI to SecretText caseInteractionsInputDialog.razor.cs- State management and JS interopInteractionsInputDialog.razor.js- Toggle functionInteractionsInputDialog.razor.css- Flex layout stylingInputViewModel.cs- AddedIsSecretTextVisibleproperty for tracking visibility stateChecklist
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.