Problem/Motivation

Current toolbar can be large with a lot of enabled islands, the end part an be very long, as well as start part in some cases.

Note: we don't want a phone support, but at least a proper 1024 when there is a lot of islands enabled.

Proposed resolution

We should have a more responsive version:

Switch start button group to a dropdown.
Switch end islands buttons or dropdown in a main end dropdown.

Icons and text to define.

From my perspective this should be done mostly with js/css, but we probably need a build to have the dropdown container component.
Note: there is already a small script to reduce the size of buttons, it's a starting point: components/toolbar/toolbar.js

Reponsive toolbar

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

Another proposal would be to show only icon in smaller screen.

All island have icons, but they are not always visible:

  • Start region: visible alongside the labels (View Panels)
  • Middle region: never visible (View Panels)
  • End region: according to configuration: sometimes only icons, sometimes only panel, sometimes both (Icons)

Instead of deciding that on server side rendering, let's always render the icons (feedback from Jean: and also label, so we improve accessibility), but let's hide them on browser rendering following the same rules.

So, at smallest viewport width, we can hide all labels, show all icons.

pdureau’s picture

Issue tags: +Novice
debdeep.mukhopadhyay’s picture

Status: Active » Needs review
StatusFileSize
new438 bytes
new56.08 KB

@pdureau
I tested this issue on a 1024px resolution using the latest patch. The layout and toolbar positioning now appear correct and stable. I didn't notice any visual breaking, overlap, or alignment issues.

mogtofu33’s picture

pdureau’s picture

Hi debdeep,

Thanks for your contribution. Your patch is doing neither of the 2 proposals:

  • Jean's proposal: Switch button groups to dropdowns
  • Pierre's proposal: show only icon in smaller screen.

But your little change may be welcomed. It will be evaluated during beta2 phase.

sujal kshatri’s picture

.

debdeep.mukhopadhyay’s picture

Thank you @pdureau for the guidance.

I’ve implemented the suggestions from your last comment and refined both the CSS and JavaScript accordingly. The toolbar now behaves correctly across all states:

Normal (non-fullscreen) view uses the 3-dot dropdown without layout breakage

Fullscreen desktop shows all tools inline

Fullscreen at smaller widths collapses start/end tools into vertical dropdowns

Native elements (including the Fluid viewport select) are preserved and function correctly

Responsive behavior is now scoped only when html has no-touchevents js display-builder-is-fullscreen.

Please let me know if you’d like this shared as a patch or if further adjustments are needed.
Thanks again for your help.

pdureau’s picture

pdureau’s picture

Status: Needs review » Needs work
Issue tags: -display_builder-1.0.0-beta4 +display_builder-1.0.0-beta

Hi debdeep, Thanks a lot for your contribution. Sorry for the late review but we were focused on completing beta3.
I have rebased your branch and fixed (not all) some eslint fails.

Normal (non-fullscreen) view uses the 3-dot dropdown without layout breakage
Fullscreen desktop shows all tools inline
Fullscreen at smaller widths collapses start/end tools into vertical dropdowns

It seems you addressed Jean's proposal: "Switch button groups to dropdowns", so he will be the authority here for final review. But I believe the behavior implemented for fullscreen mode (normal button for wider viewports, dropdown for smaller viewoorts):

  • must also be the one outside of full screen mode
  • must be done button group by button group, and not for the full start or end region

Don't jump on the update right away anyway. I believe it is worth discussing the 2 proposals ("Switch button groups to dropdowns" and "how only icon in smaller screen") before working on them or on one of them. We may wrap beta4 soon, that's why i postpone to beta5.