Skip to content

Improve command notification to show result if toast has closed#6922

Merged
JamesNK merged 1 commit intomainfrom
jamesnk/toast-notification-improvement
Dec 11, 2024
Merged

Improve command notification to show result if toast has closed#6922
JamesNK merged 1 commit intomainfrom
jamesnk/toast-notification-improvement

Conversation

@JamesNK
Copy link
Copy Markdown
Member

@JamesNK JamesNK commented Dec 10, 2024

Description

This is the dashboard UI changes from - #6625. The server changes in that PR need work, but the dashboard UI stuff can be improved now.

When a command is started a toast is immediately shown. It is open for 5 seconds. When the command is finished the toast is updated to show the result.

Previously if the toast had closed because it ran for more than 5 seconds then the UI wouldn't display the result. This PR improves logic so that if the original toast is still open then it is updated and kept open longer. And if it is closed then a new toast is displayed.

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?

Copy link
Copy Markdown
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.

Copilot reviewed 2 out of 2 changed files in this pull request and generated no suggestions.

Comments skipped due to low confidence (1)

src/Aspire.Dashboard/Model/DashboardCommandExecutor.cs:33

  • The new behavior for handling toast display and closing should be covered by tests to ensure it works as expected.
// When a resource command starts a toast is immediately shown.

@JamesNK JamesNK merged commit 98a7dcd into main Dec 11, 2024
@JamesNK JamesNK deleted the jamesnk/toast-notification-improvement branch December 11, 2024 00:38
@github-actions github-actions bot locked and limited conversation to collaborators Jan 10, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants