Add hook to extend gin sticky actions

Created on 10 April 2025, about 1 month ago

Problem/Motivation

Currently, it's not possible to extend gin's sticky actions, as the allowed actions are hardcoded in form.theme::gin_form_after_build():

/**
 * Helper function to remember the form actions after form has been built.
 */
function gin_form_after_build(array $form, FormStateInterface $form_state): array {
  // Allowlist for visible actions.
  $includes = ['save', 'submit', 'preview'];

Steps to reproduce

I installed the contrib module workflow_buttons which adds new buttons for every allowed transition in my node. But in the end, the actions are in the dot-menu:

What I want to achieve is the following:

Proposed resolution

I added a hook "gin_extend_sticky_form_actions" so that developers can extend the set of actions to their needs.

Remaining tasks

testing?

User interface changes

-

API changes

new hook gin_extend_sticky_form_actions

Data model changes

-

I'll add a MR in no time

Feature request
Status

Active

Version

4.0

Component

Code

Created by

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024