Skip to content

Consider enabling toolbar items grouping in inline and balloon builds #5597

@oleq

Description

@oleq

📝 Provide a description of the new feature

ATM automatic items grouping (a.k.a. responsive toolbar) works only in classic and decoupled editors. I wasn't enabled in inline and balloon because there's no way to have it out–of–the–box. Simply, there's no obvious size restriction for the toolbars in these editors because the toolbar element is floating and physically attached down bellow in the so-called "body" collection. There's no parent that could squeeze it or force to resize.

But there are some tricks we could use to make it happen in inline/balloon:

  • For instance, we can use an arbitrary CSS max–width on the toolbar element. It will automatically group items that do not fit. It will be static from that moment on because still there's nothing that impacts its size, but it does improve the UX

    image

  • In inline we could synchronize the max-width of the toolbar with the width of the editable it is attached to avoid this situation:

    image

    This should be fairly easy because we have a tool that can observe changes in the geometry of the editable. All we need is to read it and apply to the toolbar:

    image

  • In balloon we could do the same (max-width) maybe except that

    • we don't have control over where the toolbar is positioned,
    • and even if we had, a balloon toolbar as wide as editable still looks weird

    So in this case, we could also observe the geometry of the editable but use some sane scale factor like toolbar#max-width = 50% of editable.width.

We can start implementing those features straight away or we can first document them like

wanna save some space in balloon/inline, set max-width here and there

and see if people start using it.


@Reinmar @dkonopka @mlewand

If you'd like to see this feature implemented, add a 👍 reaction to this post.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions