Ui-button-group and ui-radio-group display limitations

Radio Group

There is an option in the config to set the number of columns. It accept values 1 to 5 I have, let's say, 6 options to display. The widget width is "auto".

In a relatively narrow group I can set it to 3 columns: -- Width 4
image
If the group is set wider the options spread out -- Width 8


-- Width 24 (Sorry the forum does not show the difference unless you zoom in)

There is clearly space for many more columns in a wider group yet however wide it is, you can only set a maximum of 5 columns.
** 1 Why the restriction?**

Button Group

If the width of the button group is constrained, either by group width or widget width -- here 4, the options are just truncated.

You can't even rely on fitting 3 buttons in the available space because long button labels are displayed on one line, so the cut-off point changes

2 Shouldn't the width of individual buttons be set so that all of the defined options will fit in the available space, and button labels word wrap if necessary? cf Radio group

Both

3 The labels of these two widgets are positioned differently.

image

4 The options for radio group and button group are not consistent.

Radio Group: Value, Label

Button Group: Label, Value

It was inherited from Dashboard 1.0 - I'd be happy to remove it.

Reasonable, although that then changes the height of the widget, so should we instead truncate the text?

Can you open an issue for that please?

And this too please

Sounds good to me.
Is it possible to also have a minimum radio button width, with an override of the option, to alleviate a situation like this in a narrow group?

The radio group labels do word wrap, changing the widget height. See the self-inflicted extreme instance above.
I agree there are times when you want to constrain a widget to the screen space you designed it for.
These two widgets are closely related and they should probably have similar behaviour.
It's a tricky decision to wrap or to truncate, particularly when dealing with responsive dashboards.
Would a setting at dashboard theme level be able to constrain all widgets to the width [and height?[ allotted to them?

#3, 4 Will do.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.