Problem/Motivation
A step's page is titled by a chain of fallbacks, and the two doorways that open a step do not use the same chain.
- The link of an External interaction: its Page title, else the interaction's own default title (
InteractionInterface::getDefaultTitle()), else the step label. - A task or an operation: the action title, else the action label, else the step label (
StepTitle::resolve()). The interaction's default title is never asked.
Example: a task whose action interaction is a payment, with no action title and no action label. Opened from the External interaction link, its page reads "Complete your payment". Opened as a task, the same page reads the step label.
Proposed resolution
Ask the interaction's default title before the step label on task and operation pages:
action title → action label → the interaction's default title → step label
- A text the author wrote still wins over a plugin default, so every page that shows an action title or an action label today keeps it.
StepTitlelives in the base module and cannot name an interaction, soStepTitle::resolve()andresolveWaitingStepTitle()take an optional closure that returns the default title. It is called only when the chain reaches it.- The task and operation page passes the interaction it already built to render the step, so no extra interaction is built.
- The route's title callback (what a breadcrumb asks) and the comment page opened from a task or an operation build the interaction only when the chain reaches the default title, so the page heading and the breadcrumb keep giving the same answer.
- The user task form (inbox) and the user operation form have no interaction: unchanged.
Remaining tasks
- Implement, with kernel tests on the task page, the operation page, the route title and the comment page.
- Update the documentation of the title chain.
User interface changes
A task or operation page whose step has no action title and no action label shows the interaction's default title, when it has one, instead of the step label. Today only the payment interaction has one.
API changes
StepTitle::resolve() and StepTitle::resolveWaitingStepTitle() take an optional default title closure.
Data model changes
None.
AI-Generated: Yes (Claude Code was used to help draft this issue summary. I reviewed it.)
Issue fork orchestra-3631383
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
mably commentedComment #4
mably commentedComment #6
mably commented