Unify with siblings

46 views
Skip to first unread message

Bartek Marcinowski

unread,
Sep 22, 2013, 1:57:04 PM9/22/13
to c2-...@googlegroups.com
Hi,

I'm just starting with c2 and trying get the hang of it in a simple app. However, I have a problem with using unify. I am rendering data in a table from an atom and want to have an additional row with inputs for adding an item, as well as a "table empty" message when there is no data. Unify however requires being an only child, so I cannot put any rows next to those managed by it. I noticed there was a commit in singult (5d41597) which removed functionality that would allow this. Is this something that would be implemented in the future in some way or am I just doing it wrong? I'd be grateful for any information or tips about how this can be handled.

Cheers,
Bartek

Kevin Lynagh

unread,
Sep 22, 2013, 2:06:34 PM9/22/13
to c2-...@googlegroups.com
I'm currently working on a new DOM-manipulation library that builds on top of the good parts of Angular.js and Singult, so I don't plan on doing any new development on Singult.

As for your particular issue, you could express it in a semantically cleaner way by separating out your data rows (what you're using unify with) from the controls.
You could put the controls outside of the table entirely, of course, but since it sounds like you want them inside the table maybe you could use multiple table bodies.
There's nothing in the spec (http://www.w3.org/TR/html5/tabular-data.html#the-tbody-element) that says you can only have one <tbody> element, after all = )

cheers,

Kevin


--
You received this message because you are subscribed to the Google Groups "C2-cljs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to c2-cljs+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.



--
Kevin Lynagh
Keming Labs
http://keminglabs.com
888.502.1042

Bartek Marcinowski

unread,
Sep 22, 2013, 3:54:50 PM9/22/13
to c2-...@googlegroups.com
Wow, thanks for the speedy reply! Will the new library be open-sourced as well? Does this also mean that c2 may at some point move to use the new library or will it not be developed much anymore? 

I guess I simply assumed that you can only have one <tbody>, though it seems that the spec actually explicitly mentions that you can have many: (http://www.w3.org/TR/html5/tabular-data.html#the-table-element), so that is the best way to go for me if I am to stick with unify being an only child. Thanks a lot!

Cheers,
Bartek

Kevin Lynagh

unread,
Sep 22, 2013, 6:02:06 PM9/22/13
to c2-...@googlegroups.com
Wow, thanks for the speedy reply! Will the new library be open-sourced as well? Does this also mean that c2 may at some point move to use the new library

Yep and Yep, though it may be a while before I come up with something that I'm happy with.

cheers,

Kevin
Reply all
Reply to author
Forward
0 new messages