[ALOY-80] Establish Ti.UI.iPad.SplitWindow markup syntax
|Affected Version/s||2012 Sprint 14|
|Fix Version/s||2012 Sprint 14|
DescriptionRight now, the markup syntax for
Ti.UI.iPad.SplitWindowassumes that it has 2 children, and that each is a
Ti.UI.Window. It also assumes that the first window is the
masterViewand that the second is the
detailView. While this convention over configuration may fit for this component, I wanted to throw out a few alternatives to see what others think.
Add custom attribute to child windows
<SplitWindow ns="Ti.UI.iPad"> <Window split="master"/> <Window split="detail"/> </SplitWindow>
Enforce IDs of master and detail (I don't like this one, but it's a possibility)
<SplitWindow ns="Ti.UI.iPad"> <Window id="master"/> <Window id="detail"/> </SplitWindow>
Check class for master and detail
<SplitWindow ns="Ti.UI.iPad"> <Window class="master otherclass"/> <Window class="detail"/> </SplitWindow>
Use an entirely new markup
<SplitWindow ns="Ti.UI.iPad"> <Master> <!-- Implicitly creates a window, so you can put any markup in here -> </Master> <Detail></Detail> </SplitWindow>
Thoughts?I kinda like the entirely new markup, cause its clear what's going and you don't need to explicitly list the Window. Though perhaps it is overkill for a component that has a pretty specific configuration. Anyone else?
- Tony Lukasavage 2012-07-02 We can revisit later if necessary
- Russell McMahon 2012-07-16 I like the new markup. I sent the ticket to Rick for his feedback.
- Russell McMahon 2012-07-17 Added on behalf of Rick Blalock... "I don't have much of an opinion on this. The only one I didn't like was the one where the window had an attribute called "split". All the other ones made enough sense to me and are basically the same from my POV. From an engineering POV there might be a downside to having it's own custom tag but I can't think of what that would be off the top of my head. I assume in examples #2 and #3 you could make the window wrap other markup too. Either way, most of those look good to me."
- Tony Lukasavage 2012-07-17 FYI, this is currently implemented simply as the first window in the hierarchy being the master, the second is the detail.