Workspace Actions: Restore waiting state for buttons with additional options (closes #22551)#22554
Draft
iOvergaard wants to merge 1 commit intomainfrom
Draft
Workspace Actions: Restore waiting state for buttons with additional options (closes #22551)#22554iOvergaard wants to merge 1 commit intomainfrom
iOvergaard wants to merge 1 commit intomainfrom
Conversation
…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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.#onClickguardedthis._buttonState = 'waiting'behind!this._additionalOptions.UmbDocumentSaveAndPublishWorkspaceAction.hasAdditionalOptions()returnstruewhenever 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/failedfor these buttons but notwaiting. This has affected v15/v16/v17.Change
Removed the
_additionalOptionsguard sowaitingis 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
#initButtonStateResetthat explained the old suppression behavior.Fixes #22551
Test plan