feat: #3610434 Add a reusable ReviewInteractionBase: render domain content above the embedded comment/outcome decision

Follows #3610065 (interactions own their completion). Adds an abstract ReviewInteractionBase in orchestra_interaction for the recurring "render the thing being reviewed, then decide" shape, so interactions stop hand-wiring the same content-plus-decision embed.

What

  • ReviewInteractionBase (new, @api): renders a subclass's domain body via reviewBody(), then embeds the CommentForm (the node's outcome buttons over an optional comment) beneath it. The decision resumes through the context's continuation handle, so a review completes under whichever doorway opened it (a bearer link, an assigned task, a pulled operation), with no per-doorway code.
  • CommentDecisionConfigTrait (new): the shared required + comment_variable settings, so CommentInteraction and the base configure them without duplication. The comment-to-variable mapping stays the existing CommentVariableTrait.
  • WebformInteraction read-only review mode refactored onto the base. This also gives it the require-a-comment and store-comment-in-variable support the standalone comment interaction already had (the review previously embedded the form without them).

Design notes

  • CommentInteraction deliberately keeps redirecting to its own page and does not derive from the base; it only shares the config trait.
  • The base's respond() is overridable, so a subclass with more than one presentation mode (as WebformInteraction has, its collect and editable-review modes redirect to the form) calls reviewResponse() only for its review path.

Tests

  • New ReviewInteractionBaseTest (kernel): the body-plus-embedded-decision assembly, the required flag reaching the embedded form, the config round-trip, and resultVariables() mapping the comment only when a variable is set.
  • The full orchestra_interaction and orchestra_interaction_webform kernel suites pass unchanged.

Merge request reports

Loading