xxxButtonGroup automatic multiple row layout

Hi,

Until bokeh v1.0.4, by using the following code:

from bokeh.io import output_file, show
from bokeh.layouts import column,row
from bokeh.models.widgets import Button, RadioButtonGroup, Select, Slider

output_file("layout_widgets.html")

# create some widgets
slider = Slider(start=0, end=10, value=1, step=.1, title="Slider")
button_group1 = RadioButtonGroup(labels=["Option {:d}".format(i+1) for i in range(10)], active=0)
select = Select(title="Option:", value="foo", options=["foo", "bar", "baz", "quux"])
button_1 = Button(label="Button 1")
button_2 = Button(label="Button 2")

slider2 = Slider(start=0, end=10, value=1, step=.1, title="Slider")
button_group2 = RadioButtonGroup(labels=["Option {:d}".format(i+101) for i in range(10)], active=0)
select2 = Select(title="Option:", value="foo", options=["foo", "bar", "baz", "quux"])
button_11 = Button(label="Button 1")
button_12 = Button(label="Button 2")
show(row(column(button_1, slider, button_group1, select, button_2, width=300),column(button_11,slider2,button_group2, select2,button_12,width=300)))

I got an automatic RadioButtonGroup layout on multiple rows depending to the width of the parent column like this(left part), now with bokeh version post 1.0.4, I get the right part:

Does it exist a way to get the same behavior in lastest bokeh versions ?
The only workaround I have found, is to create an upper metaRadioButtunGroup object embedding 4 (or more depending to column width) RadioButtonGroup and managing the routing of the events and so on. It is not simple and beautiful :wink:

Thank you by advance
BR
Vincent

Hi @Vincent_LeDahu I am afraid I don’t have any great news to report. There was a huge push to re-work the Bokeh layout system since 1.4, and in general many things got much, much better as part of that. But a few things did not get better, and this is one of those things. I would suggest making a GitHub issue to discuss things on the tracker.

Thanks @Bryan
The issue #9216 tracks this point https://github.com/bokeh/bokeh/issues/9216
BR
Vincent

@Vincent_LeDahu thanks for the pointer, I think marking as a discussion made that get lost in the big pile of issues. I have re-triaged as a bug so hopefully we can figure it out in one of the next few releases.

Thank you very much @Bryan
It will ease my app using dynamic number of labels into RadioButtonGroup in order to select POIs
BR