Skip to content

Conversation

@JamesNK
Copy link
Member

@JamesNK JamesNK commented Jun 26, 2025

Description

  • Rename interaction input names to be generalizable to website and CLI
  • Improve input dialog to focus first element on load and to submit on enter

Checklist

  • Is this feature complete?
    • Yes. Ready to ship.
    • No. Follow-up changes expected.
  • Are you including unit tests for the changes and scenario tests if relevant?
    • Yes
    • No
  • Did you add public API?
    • Yes
      • If yes, did you have an API Review for it?
        • Yes
        • No
      • Did you add <remarks /> and <code /> elements on your triple slash comments?
        • Yes
        • No
    • No
  • Does the change make any security assumptions or guarantees?
    • Yes
      • If yes, have you done a threat model and had a security review?
        • Yes
        • No
    • No
  • Does the change require an update in our Aspire docs?

@JamesNK JamesNK added area-dashboard area-app-model Issues pertaining to the APIs in Aspire.Hosting, e.g. DistributedApplication labels Jun 26, 2025
Copy link
Contributor

Copilot AI left a 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 generalizes interaction input names across services and UI and enhances the input dialog UX by auto-focusing the first field, submitting on Enter, and preventing dismissal on overlay click.

  • Renames enum and model input types (Password→SecretText, Select→Choice, Checkbox→Boolean) in proto, mapping, service, and view models
  • Updates the input dialog component to focus the first element on load, submit on Enter, and prevent dismissal on overlay click

Reviewed Changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/Aspire.Hosting/Dashboard/proto/dashboard_service.proto Renamed enum values for generalizable input types
src/Aspire.Hosting/Dashboard/DashboardServiceData.cs Updated checkbox handling to use Boolean input type
src/Aspire.Hosting/Dashboard/DashboardService.cs Adjusted switch mapping to new input type names
src/Aspire.Hosting/ApplicationModel/IInteractionService.cs Updated XML docs and enum members to match renamed input types
src/Aspire.Dashboard/Model/InputViewModel.cs Switched Select check to Choice input type
src/Aspire.Dashboard/Components/Interactions/InteractionsProvider.cs Added PreventDismissOnOverlayClick to message box dialogs
src/Aspire.Dashboard/Components/Dialogs/InteractionsInputDialog.razor.cs Added element refs, auto-focus logic, and renamed submit method
src/Aspire.Dashboard/Components/Dialogs/InteractionsInputDialog.razor Wired OnValidSubmit, added hidden submit button, updated bindings
playground/Stress/Stress.AppHost/Program.cs Updated sample code to use new Choice/SecretText/Boolean types
Comments suppressed due to low confidence (2)

src/Aspire.Hosting/Dashboard/DashboardServiceData.cs:177

  • The comment on the previous line still refers to "checkbox" but the code now handles a Boolean input type. Consider updating the comment to reflect "Boolean" for clarity.
                            if (requestInput.InputType == Aspire.DashboardService.Proto.V1.InputType.Boolean)

src/Aspire.Dashboard/Components/Dialogs/InteractionsInputDialog.razor.cs:55

  • The new auto-focus behavior in OnAfterRenderAsync isn't covered by existing tests. Consider adding a component or integration test to verify that the first input element is focused when the dialog loads.
    protected override Task OnAfterRenderAsync(bool firstRender)

@JamesNK JamesNK enabled auto-merge (squash) June 26, 2025 02:06
@JamesNK JamesNK merged commit 96458bc into main Jun 26, 2025
252 checks passed
@JamesNK JamesNK deleted the jamesnk/interaction-input-rename-ux-improvement branch June 26, 2025 02:14
@github-actions github-actions bot locked and limited conversation to collaborators Jul 26, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-app-model Issues pertaining to the APIs in Aspire.Hosting, e.g. DistributedApplication area-dashboard

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants