Skip to content

Show success/failed state for workspace buttons with additional options #19535

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

Conversation

madsrasmussen
Copy link
Contributor

This PR enables the success/failure state for workspace buttons with additional options. We still do not display the waiting state, as it does not make sense to show when a dialog is open.

@Copilot Copilot AI review requested due to automatic review settings June 12, 2025 09:20
Copy link
Contributor

@Copilot 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 enables showing the success or failure state on workspace action buttons even when additional options are present, and automatically resets the state after a delay.

  • Always sets _buttonState to 'success' or 'failed' regardless of _additionalOptions
  • Introduces #initButtonStateReset() to clear the state after 2 seconds
  • Removes the previous guard around setting the button state
Comments suppressed due to low confidence (1)

src/Umbraco.Web.UI.Client/src/packages/core/workspace/components/workspace-action/default/workspace-action-default-kind.element.ts:144

  • Add a unit or integration test to verify that _buttonState resets to undefined after the 2-second delay, covering this new behavior.
setTimeout(() => {

@iOvergaard iOvergaard merged commit 75ee1e6 into main Jun 27, 2025
27 checks passed
@iOvergaard iOvergaard deleted the v16/bugfix/show-save-checkmark-when-button-have-additional-options branch June 27, 2025 11:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants