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

Command icon 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

mogtofu33 created an issue. See original summary.

pdureau’s picture

We had a report on usability with a better separation of Controls to avoid misclick.

The report from November 2025 got at least two advice related to the toolbar buttons:

  • "don't put a button deleting the data forever close to the buttons using the data" > that's why we are not activating "clear logs" by default
  • "don't shift" buttons position left and right according to the live state > that's why we put State buttons at the start of the end region today

Do not hide Publish / Restore / Revert

OK, I may have a proposal where the state buttons island is never totally hidden.

We can use a "Split button":

A split button is a dual-function menu button that offers a default action as well as the possibility of choosing a different action by selecting from a set of alternatives.

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":
default

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:

  • If "Publish" is not available (because not activated in config and/or revision already published), the main button is disabled but the secondary actions are still available:
  • If "Publish" is available but no secondary actions are available (because not activated in config or because the current state doesn't allow them), the second part of the split button is disabled:

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?

mogtofu33’s picture

There is a dropdown in shoelace but then I think it's a menu, worth to try. And for History clear?

pdureau’s picture

There is a dropdown in shoelace but then I think it's a menu, worth to try.

Worth 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:

And for History clear?

History clear button would not be such a problem if those 3 conditions are met:

  • clear is disabled by default > ✅ already the case, if casual users have the risk if misclick, it will not be because of Display Builder, but because of the site admin which edit the Profile
  • button position is not shifting left and right > ✅ it will be better when we the change in StateButtons
  • clear action can be undo and/or have a confirmation step > how can we do that?
pdureau’s picture

Status: Needs review » Needs work

So I guess, we are not in review anymore :)

mogtofu33’s picture

Assigned: mogtofu33 » pdureau

clear is disabled by default > ✅ already the case, if casual users have the risk if misclick, it will not be because of Display Builder, but because of the site admin which edit the Profile

❌ The scope of the issue is with own profile, we must have a solid solution and ignore the default profile as a solution.

button position is not shifting left and right > ✅ it will be better when we the change in StateButtons

❌ 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.

clear action can be undo and/or have a confirmation step > how can we do that?

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:

  • Remove undo/redo digit -> ✅ no more shift anywhere
  • Remove clear -> ✅ no more shift anywhere

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.

mogtofu33’s picture

Assigned: pdureau » mogtofu33
mogtofu33’s picture

Assigned: mogtofu33 » Unassigned
Status: Needs work » Active
Issue tags: +display_builder-1.0.0-beta7
mogtofu33’s picture

Parent issue: » #3613194: [meta] Next beta

mogtofu33’s picture

Assigned: Unassigned » pdureau
Status: Active » Needs review

For review removed clear, and dropdown publish.

A follow up will be with logs island closer to the history feature.

mogtofu33’s picture

Pushed 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.

pdureau’s picture

Pushed 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.

OK, I will pull before resuming my ongoing review.

pdureau’s picture

Assigned: pdureau » mogtofu33
Status: Needs review » Needs work
StatusFileSize
new54.15 KB

For review removed clear, and dropdown publish.

Before reviewing, just a check:

  • "Publish" and "Restore" are always available in the same time, right? When the current revision is not published.
  • "Revert" is specific to EntityViewOverride and is not dependent to the published state (except the fact that the display mus have been published at least once, but taht's out of scope of this analysis) so is displayed for all revisions

Horizontal shifting

aa

❌ 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 SaveStatus into StateButtons?

  • it will save a plugin to manage, both in codebase and in admin UI config
  • the information the 2 islands are related to the same states (saved, published, reverted...) and will more understandable if they are always physically close in the UI
  • SaveStatus is 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 region

Also, 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/instances

A follow up will be with logs island closer to the history feature.

I guess you are exploring something like the pop-up panel triggered from HistoryButtons you told me about? That's interesting.

mogtofu33’s picture

"Publish" and "Restore" are always available in the same time, right? When the current revision is not published.

Restore 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.

Revert" is specific to EntityViewOverride and is not dependent to the published state (except the fact that the display mus have been published at least once, but taht's out of scope of this analysis) so is displayed for all revisions

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).

is this the opportunity to merge SaveStatus into StateButtons?

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.

it will save a plugin to manage

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.

Horizontal shifting

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.

Also, I saw the removal of HtmxEvents::onClear(), does that mean ApiController::clear() may also be removed?

Yes I forgot API removal. Will remove.

pdureau’s picture

and current event attachment of saveStatus justify it's own plugin.

OK, convinced :)

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.

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.

mogtofu33’s picture

Assigned: mogtofu33 » pdureau
Status: Needs work » Needs review

Caret always visible and better clean of clear().

pdureau’s picture

Assigned: pdureau » mogtofu33
Status: Needs review » Reviewed & tested by the community

cool

mogtofu33’s picture

Assigned: mogtofu33 » Unassigned
Status: Reviewed & tested by the community » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

  • mogtofu33 committed d1ad6876 on 1.0.x
    task: #3613490 Misclick on controls states and history
    
    By: mogtofu33
    By...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.