widgetti / widgetti/solara

Layout is 'blindly' used, we should check if it is a component

Open
#77 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
2.2k
Forks
202
Avg merge
4h 36m
Merged PRs (30d)
3

Description

# sol.py
from ipywidgets import Layout, Button
page = Button()
# solara run sol.py

Will not give a nice error msg, but: traitlets.traitlets.TraitError: The 'children' trait of a Sheet instance contains an Union of a List which expected a DOMWidget or a unicode string, not the Layout Layout().

cc @mangecoeur

Contributor guide

Open the contributing guide

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 reproduction in sol.py with solara run sol.py and inspect how the Button's Layout reaches the Sheet children trait. Confirm the change produces a clear error when a Layout is used where a component is expected, while valid component usage continues to work.

Written by the indexing model from the issue text.

Assessment

Tech stack
jupyter, python
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 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.