widgetti / widgetti/ipyvuetify

Adding ipywidgets without an extra div

Open
#291 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
355
Forks
61
PR merge metrics
No merged PRs in 30d

Description

Hi!
When I use ipywidgets inside of ipyvuetify widget, they are wrapped in a <div stye="height: 100%;"></div>. This doesn't allow customizing layout with flexbox, because I can't change the class or style of this wrapper. Is it possible to display ipywidgets without an extra div? It seems that when I put ipywidgets widget inside another ipywidgets widget (VBox), there is no extra div.

Example:

image

import ipywidgets as w
import ipyvuetify as v

button = w.Button(description="ipywidgets button")

label = v.Html(tag="span", children=["Example label"])

v_button = v.Btn(children=["Vue Button"])

input = w.BoundedFloatText(
    value=10,
    layout=w.Layout(width="auto", min_width="var(--jp-widgets-inline-width)", flex="1 0 100%"),
)

example = v.Html(
    tag="div",
    style_="display: flex; flex-flow: row nowrap; align-items: center;",
    children=[label, v_button, input],
)

# solara run example.py:example

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Run the provided example with solara run example.py:example and inspect the rendered widget tree around the ipywidgets children. Trace how ipyvuetify renders embedded ipywidgets and where the extra wrapper is introduced. Done means flexbox customization works without an unmodifiable wrapper, while existing nested-widget behavior remains intact.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
frontend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.