Comments (3)
I'm making a bit of progress here, but I need to sort out how exactly children work in feathers. I've read up on containers and browsed the code a bit, so I have a few questions for @joshtynjala
- Most components are not containers and so one should not add arbitrary children to them. Those that have a
@defaultXmlProperty
should have the "child markup" fed into that property, e.g. what you've attempted in the post linked above should ideally read as<FormItem text="User Name"><TextInput prompt="[email protected]"/></FormItem>
, right? - Are "simple containers" the only components that can have arbitrary children?
I've also seen there are data containers, but I think for now they'll have to be treated like normal controls and a more ergonomic integration can still be done later.
from coconut.feathersui.
Those that have a @defaultXmlProperty should have the "child markup" fed into that property
Yeah, I added @defaultXmlProperty
to define what property should be used to handle children of the XML element. It is intended for an MXML-like environment (I have a background in Adobe Flex, and I have previously offered MXML support in the Starling version of Feathers UI, so I eventually want to support the same in the Haxe version). However, I don't see why coconut.feathersui cannot make use of this metadata too.
I am also willing to add more metadata, specifically for coconut.feathersui. Please let me know if there's anything that I could expose that would help you.
Most components are not containers and so one should not add arbitrary children to them.
Are "simple containers" the only components that can have arbitrary children?
Correct. Most Feathers UI components should not have arbitrary children added to them. LayoutGroup
, ScrollContainer
, and their subclasses (such as Panel
) can be treated as having arbitrary children.
I also recently added HDividedBox
and VDividedBox
too. I don't think I've added those to the "simple containers" section of the docs yet.
e.g. what you've attempted in the post linked above should ideally read as , right?
Yes, this would be even better than what I originally posted. If you can detect that the property is of type DisplayObject
(or a subclass of DisplayObject
), and enforce only one child in the markup, that would be pretty cool.
from coconut.feathersui.
Also, I just want to say thank you for looking into this!
from coconut.feathersui.
Related Issues (5)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from coconut.feathersui.