Skip to content

Workspace Actions: Restore waiting state for buttons with additional options (closes #22551)#22554

Draft
iOvergaard wants to merge 1 commit intomainfrom
v17/bugfix/22551-save-and-publish-button-state
Draft

Workspace Actions: Restore waiting state for buttons with additional options (closes #22551)#22554
iOvergaard wants to merge 1 commit intomainfrom
v17/bugfix/22551-save-and-publish-button-state

Conversation

@iOvergaard
Copy link
Copy Markdown
Contributor

Summary

Fixes the missing in-flight/loading state on workspace action buttons with additional options — most visibly Save and publish on multi-variant sites.

Root cause

UmbWorkspaceActionElement.#onClick guarded this._buttonState = 'waiting' behind !this._additionalOptions. UmbDocumentSaveAndPublishWorkspaceAction.hasAdditionalOptions() returns true whenever the site has more than one culture variant, so every multilingual install suppressed the spinner and the button jumped directly from idle to ✓.

Introduced in v15.3.0 via #18299. A later PR (#19535) restored success/failed for these buttons but not waiting. This has affected v15/v16/v17.

Change

Removed the _additionalOptions guard so waiting is set on every click (unless the action is a link). The variant-picker modal still opens on top of the button, so the spinner is effectively hidden during selection, but becomes visible as soon as the modal closes and the publish request is in flight — which is the window the reporter was missing.

Also dropped the stale comment block in #initButtonStateReset that explained the old suppression behavior.

Fixes #22551

Test plan

  • Single-variant site: click Save and publish, observe spinner → tick
  • Multi-variant site: click Save and publish, pick variants, confirm — spinner visible between modal close and response, then tick
  • Throttle network to Slow 3G to make the pending window large enough to observe
  • Publish failure path still shows ✗ (no regression on success/failed)
  • Other workspace actions that use additional options (e.g. Save with variants) still behave correctly

…options

The waiting state was suppressed whenever a workspace action reported
hasAdditionalOptions() (e.g. Save and publish on multi-variant sites),
so users saw the button jump straight from idle to the success tick
with no in-flight feedback.

Always set 'waiting' on click (unless the action is a link). The
variant-picker modal still opens on top of the button, so the spinner
is effectively invisible during selection — but it becomes visible
as soon as the modal closes and the publish request is in flight.

Fixes #22551
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Save and Publish button state does not reflect current status

1 participant