Still on Drupal 7? Security support for Drupal 7 ended on 5 January 2025. Please visit our Drupal 7 End of Life resources page to review all of your options.
Problem/Motivation
Having the save button in the top horizontal toolbar for content editor screens is a huge time saver. I was wondering if it would be possible to move the save button into the toolbar for other admin screens as well e.g. edit content type
Steps to reproduce
N/A feature request
Proposed resolution
Move action buttons to sticky header, show more actions kebab menu and move secondary actions into menu
User interface changes
Moves actions to sticky header
Setting:
Feature:
Comment | File | Size | Author |
---|---|---|---|
#31 | sidebar_icon_new.png | 7.5 KB | onnia |
#31 | sidebar_icon_old.png | 6.8 KB | onnia |
#12 | proof-of-concept.gif | 219.74 KB | saschaeggi |
gin and save.png | 283.75 KB | heiket |
Issue fork gin-3356717
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 #2
heiket CreditAttribution: heiket at Sparks Interactive commentedComment #3
heiket CreditAttribution: heiket at Sparks Interactive commentedComment #4
saschaeggiThis is also on our roadmap. If you have dev resources to implement this, we can move ahead with this.
Comment #5
heiket CreditAttribution: heiket at Sparks Interactive commentedPerfect. I will get somebody on this asap!
Comment #6
saschaeggi@HeikeT any news on this? :)
Comment #10
lroelsLooking good and I agree this would be a timesaver.
Only place I still notice the button on the bottom is on block forms.
Might need to add this unless this is an intentional exception.
Comment #11
saschaeggi@LRoels fixed, thank you!
Comment #12
saschaeggiI've pushed another change to include a proof of concept to move other actions to a kebab menu. It uses a container so it would be possible to move things in or out of that menu, but by default we would show all buttons which are not primary functions (submits) to that kebab menu.
Comment #13
saschaeggiComment #14
saschaeggiComment #15
saschaeggiWe're making big progress here, I'm very exciting to finally have this unified across the UI 🎉
Comment #16
saschaeggiComment #17
saschaeggiComment #18
jrockowitz CreditAttribution: jrockowitz as a volunteer and at Webform module Open Collective, The Big Blue House commentedThis looks and feels like a nice improvement to the Webform form builder UI. There are a few minor issues that probably need to be fixed via Webform.
For example, the form builder uses Ajax to refresh to table when an element is added or updated. The 'Save' button is fine but the status message is not displaying and fading away.
Comment #20
volkerk CreditAttribution: volkerk at Thunder commentedI tested this and moving the action buttons to static on configuration pages is a nice touch!
About the more actions dropdown I had a few thougths.
Also might be nice to have that configurable.
Comment #21
saschaeggi@volkerk
I'd rather have it consistent.
We actually thought about that as well, if you add
'#gin_action_item' => true
to form action items, they will always be visible (credit to Jürgen)The sidebar can be toggled with a shortcut. But we might want to move the toggle anyway to the sidebar element itself. Can be done in a follow-up though.
Comment #22
saschaeggiComment #23
saschaeggiComment #27
saschaeggiAdding credits from people testing 👀
Comment #28
saschaeggiThank you everyone involved here! This is a huge deal and will pave the way to integrate this into Core at a later point ❤️✊
Comment #29
saschaeggiSpecial thanks to Jürgen with all your help, this would habe not been possible without your help!
Comment #30
saschaeggiComment #31
onnia CreditAttribution: onnia commentedI could not find any reason why the sidebar icon has been changed? To my eye that looks odd. Can I get some arguments why this has been done?
https://git.drupalcode.org/project/gin/-/merge_requests/420/diffs#6b572a...
Comment #32
fmacia CreditAttribution: fmacia commentedMaybe an automatic exception for the delete button could be made? I expect some less technical users losing their mind over the delete button "disappearing" from the form.
Comment #33
zebda CreditAttribution: zebda commentedIs there a way to get all the options out of the kebab menu? I don't find it very user friendly.
Comment #34
rajab natshah CreditAttribution: rajab natshah as a volunteer and at Vardot commentedThank you, Sascha, for having this in Gin + thanks for the API for it.
With further testing and trying to change the logic on the unlock or delete buttons.
Experimented with the Gin API on this
Any one can custom
The direction went to follow with the new change by the Gin Admin theme
Which could work with the following and a bit of styling
When the Workflow module is enabled
Reverting
Suggesting that maybe Gin could have support for the Moderation status position, when the workflow module is enabled, and the content/entity is configured to use it.
Comment #36
zebda CreditAttribution: zebda commented@Rajab I tried your code in the hook_form_alter but it doesn't work. How do you use this to exclude items from being hidden?
-- Update
My fault. It had to be in the hook_form_alter after all. For some reason my head turned the TRUE in to a FALSE because it was a negative statement. I should NOT be in the kebab menu. Any how the code works. Thanks a lot.