-
Notifications
You must be signed in to change notification settings - Fork 166
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Data Children: show props.children in the inspector component section #5686
Comments
We should do this in a way that it takes the component annotations into account:
Maybe we should even extend the API so you can associate a custom control to the children prop (e.g. if you want define a custom label, or put it into a folder, or add a segment control to choose between options, etc). |
ruggi
added a commit
that referenced
this issue
Jun 6, 2024
**Problem:** The children prop for components is not shown in the inspector. **Fix:** - Show the `children` prop in the inspector and allow changing it, via either a cartouche or number/string inputs - Allow setting children elements when asking for a prop update - For number and string children, use string/number inputs - or the default JSX component (or cartouche for data references) otherwise - If the selected component does not support children, don't show it https://github.com/concrete-utopia/utopia/assets/1081051/a66df108-2812-4c7d-9d65-aa83f8641bc6 **Manual Tests:** I hereby swear that: - [x] I opened a hydrogen project and it loaded - [x] I could navigate to various routes in Preview mode Fixes #5686
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Problem:
it feels weird to see
name
as a data cartouche in the navigator for<h2>{name}</h2>
, but the inspector's component section is empty. we want the component section to be able to show anything which might require data picking!proposed solution:
Show props.children as a separate entry at the bottom of the component section!
Question: should we show the component section with props.children for selected elements which would otherwise not show the component section, such as div, h1, h2, etc? I personally feel like yes we should
The text was updated successfully, but these errors were encountered: