[Experimental] List widgets generic experimental#184
Conversation
|
This seems like a big improvement to me, being able to drop List Item into any of the list types. What do you guys think? I'm just going to look at it from a user/functional level at this point, not digging into the code. Here are some problems I see:
|
|
Oops, bumped the close & comment button accidentally. |
|
|
It's probably about time we try to truly realize the whole "zones" vision in the first place. We've always kind of avoided it. The real zones feature would be to have geometric hints about where children belong within a widget. For allowing only one image widget, the way that should work is that there is a special image zone on the left, that can contain zero or one images and nothing else. Then the middle zone can contain N Text widgets, or whatever else is allowed. The right zone can contain zero or one List Buttons. What should really happen is that when you hover an Image over the List Item anywhere, it realizes that images are only allowed in the left image zone, and the placeholder shows up there. In a case where a widget can potentially be dropped in multiple zones, it should be placed in the current zone where the mouse is hovering, or if not allowed there, it should geometrically find the nearest appropriate zone. I'm not sure if we really have a case where that would happen though. |
|
Re: widget scope htmlSelector, yeah I already wanted to do that for widgets to reduce the repetition in the existing classes. I was thinking of it as a "default html selector" -- it could possibly be called that. I remember thinking that it could get a little confusing with the common properties though. But it's probably fine. It's probably a best practice not to put the html selector in the common properties, make that something that is overridden if need be per widget. |
We can define a "morph" function for a zone so that When adding a child, it can be morphed to another type. With this feature, we can have a generic widget in the palette which can adapt to different types of containers when dropped on them.
Looking for parent zone with the same name. If found, extend it with descendant zone, otherwize add a new zone.
|
Replaced by #196 |
|
close it. |
Trying to implement list widgets using generic listitem. Please review it and give some overall comments.