Add Workflow Transition Modal extension example#30
Merged
Conversation
Companion example for the Workflow Transition Modal extension points added in pimcore/studio-ui-bundle#3647. Demonstrates injecting a custom 'Reviewers' field into the workflow transition modal via the new center slot, and reading the submitted values on the backend through a workflow.completed event subscriber that enriches the workflow note. - Frontend: WorkflowModalExtensionPlugin registers a ReviewersField component to element.editor.workflow.modal.slots.center, filtered to the simple_approval / request_review transition via useWorkflow. - Config: example 'simple_approval' state_machine workflow. - Backend: WorkflowReviewersSubscriber appends the requested reviewers to the workflow note on workflow.simple_approval.completed.request_review.
- Bump @pimcore/studio-ui-bundle from the stale 1.0.0-canary.20260211 pin to the 2026.1.4 stable release. This resolves the 4 pre-existing type errors on main (renamed DynamicTypeObjectLayout*/AbstractObjectLayout* symbols and the DynamicTypeGDPRProviderRegistry export) that have kept check-types red since April. - Add temporary suppressions to the workflow-modal-extension example for the two symbols that only exist in pimcore/studio-ui-bundle#3647 (the public useWorkflow export and the workflow.modal slot config), which is not yet in any published release. Each directive is marked with a TODO to remove it once #3647 ships and the SDK pin is bumped. check-types, lint and build all pass locally against 2026.1.4.
studio-ui-bundle#3647 is now merged and published in 1.0.0-canary.20260601-121358-42aa95d, which exports the public useWorkflow hook and the workflow.modal slot config the example uses. - Pin @pimcore/studio-ui-bundle to that canary (exact, not a range: a >= range would resolve to stable 2026.1.4, which predates #3647). - Remove the temporary @ts-expect-error / eslint-disable directives from the workflow-modal-extension example; it now type-checks and lints cleanly against the real SDK API.
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.
Companion example for the Workflow Transition Modal extension points from pimcore/studio-ui-bundle#3647 (merged).
ReviewersFieldto theelement.editor.workflow.modal.slots.centerslot for thesimple_approval/request_reviewtransition.simple_approvalworkflow.WorkflowReviewersSubscriberappends the submitted reviewers to the workflow note.Requires the canary SDK that includes #3647.