Support Gin Admin theme's MoreActions button

Created on 2 July 2024, 6 months ago
Updated 30 July 2024, 5 months ago

Problem/Motivation

Latest version of Gin Admin theme β†’ hides actions behind a more actions button unless it is identified as a #gin_action_item.

Proposed resolution

Add the #gin_action_item to the $workflow_submit_action element.

✨ Feature request
Status

Needs review

Version

1.8

Component

User interface

Created by

πŸ‡ΊπŸ‡ΈUnited States greenskin

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

Comments & Activities

  • Issue created by @greenskin
  • Status changed to Needs review 6 months ago
  • πŸ‡ΊπŸ‡ΈUnited States greenskin
  • πŸ‡³πŸ‡±Netherlands johnv
  • Status changed to Needs work 6 months ago
  • πŸ‡³πŸ‡±Netherlands johnv

    I tested Gin 8.x-3.0-rc12 (administration theme).
    I installed it as default theme, not only as administrative theme.
    I tested the following:
    - node view mode (with Transition form as formatter): works fine without patch
    - node edit view: action buttons are hidden/removed (but patch does not help)
    - node workflow history tab: action buttons work fine without patch.
    - block with workflow transition form (after adding block to theme layout).

    So, in my system, all-but the edit mode work fine, but the patch does not help.
    Do I need to do anything more?

  • πŸ‡΅πŸ‡ΉPortugal rfmarcelino

    #2 worked for me
    Before:

    After:

  • πŸ‡³πŸ‡±Netherlands johnv

    OK, I see now, I did not find the 'More actions button.
    I guess this title is better.

  • Status changed to RTBC 6 months ago
  • πŸ‡³πŸ‡±Netherlands johnv
    • johnv β†’ committed c1aeafd5 on 8.x-1.x
      Issue #3458569 by greenSkin, rfmarcelino: Disable Gin Admin theme's...
  • πŸ‡³πŸ‡±Netherlands johnv
  • Status changed to Fixed 6 months ago
  • πŸ‡³πŸ‡±Netherlands johnv
  • πŸ‡ΊπŸ‡ΈUnited States todea

    Similar issue, we are using Workflow 8.x-1.7 and Gin 8.x-3.0-rc13. For the nodes where we use workflow, the Save & Delete actions are removed. Save is replaced w/ "Update workflow".

    If we switch back to Claro as the admin theme, then save and delete properly display.

  • πŸ‡³πŸ‡±Netherlands johnv

    @todea, I am sorry, where do you see those buttons/tasks?
    I cannot find the phrase 'Update workflow' in the repository. Is it the name of a transition label (admin/config/workflow/workflow/workflow1/transition_labels), or are you perhaps using core Workflows (mind the trailing 's') instead of this contrib module?

  • πŸ‡³πŸ‡±Netherlands johnv

    @todea, in my case, the buttons 'Save', 'Preview', 'Delete', are replaced by 1 button 'Save'. the Preview and Delete buttons are not visible (there is no 'more actions' dropdown menu). I guess this is not caused by the Workflow module.

  • πŸ‡ΊπŸ‡ΈUnited States todea

    @johnv, yeah I'm not sure why this is happening. I am using this "workflow" module, version 8.x-1.7. I see a 'Update workflow' button label in src\Form\WorkflowTransitionForm.php. This occurs on the add/edit screen for an "event" node on our site.

  • πŸ‡ΊπŸ‡ΈUnited States todea

    It looks like the issue was caused by having the "Workflow transition form" on our form display. When I change that display to check boxes or select list, then the normal node save/delete actions come back.

  • πŸ‡ΊπŸ‡ΈUnited States greenskin

    Looks like something when building the transition form in WorkflowManager::getWorkflowTransitionForm() is causing the additional actions (e.g., preview, delete, etc) to disappear.

  • πŸ‡ΊπŸ‡ΈUnited States greenskin

    Dug a little deeper and the issue with the missing actions looks to be with Gin and how it's altering actions for the content form. Gin is effectively setting the actions based on the transition form and not the actual node content form (see GinContentFormHelper::formAlter()). Because the workflow transition form is altered after the node form, the workflow transition actions take precedence for Gin. I'm not sure there's anything specific the workflow module can do here other than work with gin maintainers for a solution.

  • πŸ‡³πŸ‡±Netherlands johnv

    Indeed, GinContentFormHelper::formAlter() is the problem. It assumes that a button 'submit exists', which is not the case with workflow action buttons. Not sure yet why the 'preview' button has gone.
    (There is a 'postponed' issue that requests a reshuffle of the action buttons, leaving the submit button untouched (except for the title perhaps). I cannot find is now. )

  • Status changed to Needs work 5 months ago
  • πŸ‡³πŸ‡±Netherlands johnv

    Perhaps we need some modifiction in function _workflow_transition_form_get_action_buttons().

  • Status changed to Needs review 5 months ago
  • πŸ‡ΊπŸ‡ΈUnited States greenskin

    Added an issue πŸ“Œ Actions broken when using workflow transition form Active with a merge request in Gin's issue queue to ignore the workflow transition form IDs. That issue fixes the general missing actions, while the patch from #2 here resolves the drop button getting hidden behind "More actions".

Production build 0.71.5 2024