Layout is 'blindly' used, we should check if it is a component
Open
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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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