Skip to main content
Added jupyter-notebook tag
Link
Guest
  • 25
  • 4
Source Link
Guest
  • 25
  • 4

Why is Voila making Ipywidgets Panels fill width?

I've been working on a geemap project in Jupyter Notebooks because that's what was recommended, but now I'm starting to look at publishing. I'm trying out Voila because it has a bunch of recommendations and looks simple, but I ran into a problem.

The Jupyter Notebook version looks like this, where the panels fit their content: Correctly rendered map

The Voila preview looks like this, where the panels fill available width: Incorrectly rendered map

The code I have for generating the panels doesn't include any parameters, so no styles and no children (I add them later, as seen below):

panel = ipywidgets.HBox(); #Initialize panel panel.children = (Btn1, Btn2) #Add children to panel Map.add_widget(panel, position="topright") #Add panel to map 

All of my panels are created in a similar way. What I would like is the Voila version to match the Jupyter Notebook layout. To be entirely honest, I'm not sure what's causing this.