Problem/Motivation
We had a report on usability with a better separation of Controls to avoid misclick.
Since we had multiple back and forth on the default profile button position to mitigate misclick.
Let's find a definitive solution instead of this and avoid people manipulating their own profile to reach the same problem.
Steps to reproduce
Proposed resolution
Do not hide Publish / Restore / Revert (for entity override), History clear if they are not usable like now, just keep them disabled when available but not clickable. So the interface say the same without appearing actions.
Remaining tasks
User interface changes
API changes
Data model changes
| Comment | File | Size | Author |
|---|
Issue fork display_builder-3613490
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
pdureau commentedThe report from November 2025 got at least two advice related to the toolbar buttons:
OK, I may have a proposal where the state buttons island is never totally hidden.
We can use a "Split button":
Definition: https://www.nngroup.com/articles/split-buttons/
Example: https://getbootstrap.com/docs/5.3/components/dropdowns/#split-button
Available in Drupal Core as "dropbutton" render element: www.drupal.org/docs/develop/user-interface-standards/dropdown-buttons
Unfortunately not available in Shoelace as far as I know.
The default action is Publish, the secondary actions are "Restore" and "Revert":

It is OK to have a single secondary action:

The split button is never hidden and always take the same horizontal space, whatever the current data state:
It is not shifting other buttons left and right anymore, so we can position it at the end of the end region, just before the "Back" button, because the less "hot" is a button, the further from the center it belongs:

What do you think about this?
Comment #3
mogtofu33 commentedThere is a dropdown in shoelace but then I think it's a menu, worth to try. And for History clear?
Comment #4
pdureau commentedWorth to try, indeed. The most important is to let people know there are actions available or not in the dropdown without clicking on it, just be checking if enabled/disabled state of the dropdown button:

History clear button would not be such a problem if those 3 conditions are met:
Comment #5
pdureau commentedSo I guess, we are not in review anymore :)
Comment #6
mogtofu33 commented❌ The scope of the issue is with own profile, we must have a solid solution and ignore the default profile as a solution.
❌ Because of width change it has impact on potential buttons before and after, and it already shift a bit because of the number in undo/redo when going from 1 to 2 digit.
Perhaps but I do not think it is worth adding complexity.
Other tools analysis
Seems other tools do not bother that much with undo/redo; they show no history and do not indicate limits when there is probably.
Except Canvas with a granularactions validation system.
Looks like when published/save local history undo/redo is flushed, but not sure as I test the tools in demo mode.
In comparaison we hover over-engineered the logs feature but in the same time make it less not friendly than other tool as the logs panel show the history, you can navigate only with undo/redo and cannot point or revert a specific action.
Time to keep it simple:
As history can populate a lot of revisions (20x..) it is probably good to have somewhere a way to delete revisions, but it is already an action in display_builder_dev_tools, it is probably enough for now.
As we rely on Drupal config it should by itself not be propagated in production deploy so our workflow is clean imho.
Comment #7
mogtofu33 commentedComment #8
mogtofu33 commentedComment #9
mogtofu33 commentedComment #11
mogtofu33 commentedFor review removed clear, and dropdown publish.
A follow up will be with logs island closer to the history feature.
Comment #12
mogtofu33 commentedPushed a minor visual fix for color and width, with this fix setup it's harder to test icons only or icon+label option, decided to remove it for now.
Comment #13
pdureau commentedOK, I will pull before resuming my ongoing review.
Comment #14
pdureau commentedBefore reviewing, just a check:
Horizontal shifting
❌ Because the dropdown is removed instead of disabled when there is no actions, we are missing the goal of not shifting horizontally the toolbar layout when the state change.
Other feedback
Sorry to put this in the table again but the context is evolving: is this the opportunity to merge
SaveStatusintoStateButtons?SaveStatusis always taking the same horizontal space now (it was not the case at the beginning), so it will not mess with our efforts and it doesn't need to be put at the start regionAlso, I saw the removal of HtmxEvents::onClear(), does that mean
ApiController::clear()may also be removed? If the clear feature move from Display Builder UI to the Drupal Admin UI (i have no opinion about this, just chatting), we may reach the scope of #3577222: Instance history steps settings and ability to disable, using a contrib module like revision_manager, or implementing our own entity operation in /admin/structure/display-builder/instancesI guess you are exploring something like the pop-up panel triggered from HistoryButtons you told me about? That's interesting.
Comment #15
mogtofu33 commentedRestore is available only if a past saved state exist, and I am not sure we really start with a saved version for all display cases.
Yes it need review, we already have a functional issue for that: #3613399: Entity override Revert -> Restore logic, imho revert is a very specific behavior, as it need a specific mental process which is not explicit, for me it is a candidate for trim (remove from config, let only power user enable it).
I do not think it is relevant, Save status act as well on undo/redo, contextual menu... But I am open to an issue to discuss the best approach.
Imho there is a lot of other tasks to do to simplify, as per #3616033: Reduce ProfileViewBuilder options, and current event attachment of saveStatus justify it's own plugin.
Yes the shift is back but not the root fix on misclick as restore/revert are not accessible. It only concern EntityView/Override, I will see to keep it disabled then.
Yes I forgot API removal. Will remove.
Comment #16
pdureau commentedOK, convinced :)
I also see the shift in PageLayout for example, and I guess it is also in ViewDisplay, so it would be great if we success disabling the dropdown instead of removing it when the revision is published.
Comment #17
mogtofu33 commentedCaret always visible and better clean of
clear().Comment #18
pdureau commentedcool
Comment #19
mogtofu33 commented