/
fluid-work IRC Logs-2013-09-10

fluid-work IRC Logs-2013-09-10

[07:25:07 CDT(-0500)] <amilchev> Justin_o: Hi, I was about to write in the mailing list but maybe here it would be better .. tell me if you have 5-10 minutes

[07:29:57 CDT(-0500)] <Justin_o> amilchev: sure

[07:33:51 CDT(-0500)] <amilchev> Justin_o: to pick up from your last email - I successfully appended the small markup into the DOM but failed to instantiate the panel so that the change is applied - the selectors are still looked for BEFORE they have been appended

[07:35:06 CDT(-0500)] <amilchev> Justin_o: I tried appending in the preInitFunction (instead of finalInit), but it didn't work at all. Am I supposed to do sth like this https://github.com/fluid-project/infusion/blob/master/src/components/uiOptions/js/UIOptions.js#L403-L414 ?

[07:35:12 CDT(-0500)] <Justin_o> amilchev: can you tell me a bit more about when you want the subcomponent to be instantiated, and how you are trying to do it

[07:36:26 CDT(-0500)] <Justin_o> amilchev: we'd probably rather do things more declaratively if possible. Some of the code hasn't been fully brought up to modern practices yet.

[07:37:17 CDT(-0500)] <amilchev> Justin_o: um.. I didn't add the small panels as subcomponents, but as gradeNames

[07:38:57 CDT(-0500)] <amilchev> Justin_o: what I want is the big panel to manage its selectors after the appending has finished

[07:39:29 CDT(-0500)] <Justin_o> amilchev: are all of your changes in the divide-and-conquer branch?

[07:40:47 CDT(-0500)] <amilchev> Justin_o: I haven't pushed them yet, but it's only slightly different from what is currently there - and I don't think this issue has anything to do with this difference

[07:40:57 CDT(-0500)] <Justin_o> amilchev: okay

[07:41:53 CDT(-0500)] <amilchev> Justin_o: sorry in case now is not a comfortable time, I don't mean to be disturbing

[07:41:53 CDT(-0500)] <Justin_o> let me take another look.. so to be clear what you want is to manually append the template for keyEcho into the DOM and have the DOM binder work for the selectors pertaining to it.

[07:41:55 CDT(-0500)] <Justin_o> ?

[07:42:12 CDT(-0500)] <Justin_o> amilchev: it's okay.. i have some time now

[07:42:15 CDT(-0500)] <amilchev> yes

[07:43:45 CDT(-0500)] <amilchev> https://github.com/radmanovi4/prefsEditors/blob/divide-and-conquer/src/shared/adjusters/js/speakTextCollectivePanel.js#L145 this line works properly now, but I haven't pushed

[07:48:04 CDT(-0500)] <Justin_o> amilchev: i'd guess the approach you'd probably want to take is to add an event to fire after you append the template. Then you'd bind a listener to this event and do your calls with the selectors here

[07:50:49 CDT(-0500)] <amilchev> Justin_o: "do your calls with the selectors here" - I have nothing to do with these selectors manually, I just want them to be rendered (and shown of course)

[07:54:16 CDT(-0500)] <Justin_o> amilchev: hmm.. okay.. not really sure what you need then.. i have the template being rendered fine for me, with the changes i mentioned to you yesterday.

[07:54:42 CDT(-0500)] <Justin_o> amilchev: when do you use this template that.. which I guess is what the real issue is

[07:55:16 CDT(-0500)] <amilchev> Justin_o: so you have the checkbox "Echo letter after typed" at the bottom ?

[07:57:21 CDT(-0500)] <Justin_o> amilchev: yes.. it's in the markup.. it might be in the wrong place though as it is a sibling to <div class="preferences">

[07:58:37 CDT(-0500)] <amilchev> Justin_o: oh yes, it is in the markup, but is it rendered as the other three checkboxes?

[07:59:18 CDT(-0500)] <amilchev> Justin_o: when you run https://github.com/radmanovi4/prefsEditors/blob/divide-and-conquer/demos/speakTextAdjusterGroup/index.html this file

[07:59:27 CDT(-0500)] <amilchev> in node-webkit

[08:00:10 CDT(-0500)] <Justin_o> amilchev: you mean like the one labelled "Uppercase Letters"

[08:00:32 CDT(-0500)] <amilchev> yes

[08:03:08 CDT(-0500)] <Justin_o> amilchev: yes and no.. it would have the same style if there was any text label. but there isn't so it's kind of hidden.. if i force text in there it looks the same. however it's not in the same container so the positioning is also different

[08:04:03 CDT(-0500)] <amilchev> Justin_o: same here

[08:04:50 CDT(-0500)] <Justin_o> amilchev: okay.. so you want it in the preferences container?

[08:05:35 CDT(-0500)] <amilchev> Justin_o: by the way, is the checkbox styled? here it isn't ..

[08:05:57 CDT(-0500)] <Justin_o> amilchev: it is

[08:08:49 CDT(-0500)] <Justin_o> amilchev: do you want me to push up my changes for you to look at.. see how it is compared to what you want?

[08:10:58 CDT(-0500)] <amilchev> Justin_o: that'd be great! I just pushed my work btw

[08:11:13 CDT(-0500)] <Justin_o> amilchev: thanks.. i'll let you know when it's up.

[08:11:48 CDT(-0500)] <amilchev> Justin_o: thank you

[08:21:23 CDT(-0500)] <Justin_o> amilchev: sorry it took a bit longer because i started over from your new code.. anyways.. not a whole lot of changes… just added an event that i used to set the label of the checkbox with. https://github.com/jobara/prefsEditors/commit/c45b8fc5aceeaf950b444dfc6731efdae3da3352

[08:21:56 CDT(-0500)] <Justin_o> amilchev: this is just a quick example.. it should probably be done differently depending on what you want to do exactly

[09:07:50 CDT(-0500)] <Justin_o> amilchev: how are things going?

[09:28:49 CDT(-0500)] <amilchev> Justin_o: I got it shown now, too

[09:30:47 CDT(-0500)] <amilchev> Justin_o: but I want it connected to the schema

[09:32:10 CDT(-0500)] <amilchev> Justin_o: as it is related to keyEcho in the protoTreee - I want the switch to represent the state in the model and get the label from the appropriate messagekey

[09:32:59 CDT(-0500)] <amilchev> Justin_o: sorry if I didn't make it clear before

[09:43:00 CDT(-0500)] <amilchev> Justin_o: I have to go now, if you link the checkbox to the schema (otherwise it's useless), it'd be great if you pushed your code again! Bye for now and thanks for the time.

[10:33:37 CDT(-0500)] <jessm> fluid-everyone: standup?

[11:32:46 CDT(-0500)] <system64> Hello michelled, could I PM you?

[11:55:09 CDT(-0500)] <jhung> Justin_o: I've added the More Text floating issue to Jira. http://issues.gpii.net/browse/GPII-203

[11:58:02 CDT(-0500)] <Justin_o> jhung: thanks

[11:58:23 CDT(-0500)] <michelled> system64: sure

[12:36:10 CDT(-0500)] <Justin_o> cindyli: was looking at the stuff for amilchev this morning. He want's to basically add another template to pull in. The trick is how to get it in and how to use it.

[12:36:49 CDT(-0500)] <cindyli> Justin_o: is amilchev using schema version of UIO?

[12:37:19 CDT(-0500)] <cindyli> what's special with that "another template"? one panel with 2 templates?

[12:38:33 CDT(-0500)] <Justin_o> cindyli: yes.. he's using the schema and yes.. seems like multiple templates for a single panel.. now sure what the renderer will do with this.. but assuming it works.. how would you get that other template in.. the easiest solution of course would be to have 1 template only, but i guess it would be nice to support multiple templates to make things more modular

[12:40:35 CDT(-0500)] <cindyli> Justin_o: i don't think our current aux schema supports loading multiple templates for one single panel. we can extend to support that.

[12:41:02 CDT(-0500)] <Justin_o> cindyli: i'm thinking the integrator will have to pass it in to their generated UIO as another option to the templateLoader or we could fix the auxschema

[12:41:06 CDT(-0500)] <cindyli> needs more thinking on how to support since each template needs to know which selector for it to render

[12:41:38 CDT(-0500)] <Justin_o> cindyli: what do you mean

[12:42:08 CDT(-0500)] <cindyli> let me find some panel code

[12:45:28 CDT(-0500)] <Justin_o> cindyli: okay, thanks

[12:46:12 CDT(-0500)] <cindyli> here it is, Justin_o - https://github.com/fluid-project/infusion/blob/master/src/components/uiOptions/js/StarterGrades.js#L244, right now, the panel container is enough since one panel only renders one template. If this panel takes in two templates, panel needs to be aware of where they are rendered. 2 css selectors I think

[12:47:11 CDT(-0500)] <Justin_o> cindyli: i'm hoping that the renderer can just handle that, but don't know for sure..

[12:47:27 CDT(-0500)] <Justin_o> i'd have to ask Bosmon or run some tests

[12:47:50 CDT(-0500)] <cindyli> agree

[12:47:50 CDT(-0500)] <Justin_o> cindyli: but yes, if it doesn't that would be another big hurdle

[12:48:00 CDT(-0500)] <cindyli> ya

[12:52:53 CDT(-0500)] <Justin_o> cindyli: so any thoughts on how to get the templates in.. if we change the auxiliary schema i think we should take in a string for the simple case and an object for multiple templates

[12:53:11 CDT(-0500)] <Justin_o> what do you think and how will this affect things internally

[12:53:12 CDT(-0500)] <Justin_o> ?

[12:59:22 CDT(-0500)] <cindyli> Justin_o: I agree with the change you suggested for the aux schema. the part i'm not sure about is whether renderer component support multiple template rendering, if it does, it should be easy to modify the aux builder. otherwise, we may need multiple panels or sub-panels for rendering multiple templates. let me take a look at the render component unit tests.

[13:00:13 CDT(-0500)] <Justin_o> cindyli: okay… let me know if you see anything.. if not i'll try to make a quick test

[13:00:20 CDT(-0500)] <Justin_o> or example

[13:00:28 CDT(-0500)] <cindyli> sure

[13:10:57 CDT(-0500)] <cindyli> Justin_o: don't see a unit test that renders multiple templates with one single renderer component

[13:11:13 CDT(-0500)] <Justin_o> cindyli: okay.. i'll try to make a test for it.

[13:11:27 CDT(-0500)] <cindyli> ok. thanks, Justin_o

[13:25:51 CDT(-0500)] <Bosmon> Hi cindyli, Justin_o - can you explain what you mean by "multiple template rendering"?

[13:26:29 CDT(-0500)] <Justin_o> Bosmon: great you are here.. if you have multiple templates in your resources block.. when the render is working will it look at all of them?

[13:29:45 CDT(-0500)] <Bosmon> Justin_o - "not really" : P

[13:29:57 CDT(-0500)] <Bosmon> But in particular, what do you want it to do with them?

[13:31:52 CDT(-0500)] <Justin_o> Bosmon: well now that i'm thinking about it again.. i guess the renderer wouldn't really know where to put things, how to combine the templates. Anyways.. the issue is around the complex panels.. have you had any more thoughts about this? amilchev is trying to combine panels through grade merging.. to create a complex panel from several simple ones.. but he wanted to not have to create a new combined template.

[13:32:59 CDT(-0500)] <Bosmon> Justin_o - so how would you like to describe this "combined template", without having to write it?

[13:37:15 CDT(-0500)] <Justin_o> Bosmon: that's a good question since it will be hard to know how to assemble them..

[13:37:34 CDT(-0500)] <Bosmon> Justin_o - what I suggest is, that you write a "template-rendering component"

[13:37:35 CDT(-0500)] <Justin_o> Bosmon: do you have an idea of how we should be creating these types of complex panels?

[13:37:48 CDT(-0500)] <Justin_o> Bosmon: what would that be?

[13:37:50 CDT(-0500)] <Bosmon> Which accepts a "meta-template" with some empty divs in it, a bunch of selectors, and the component templates

[13:38:08 CDT(-0500)] <Bosmon> It then uses the renderer to produce a set of "UIVerbatim" component in order to render the combined template

[13:38:29 CDT(-0500)] <Justin_o> Bosmon: so you mean a sort of template template

[13:38:34 CDT(-0500)] <Bosmon> Yes

[13:38:35 CDT(-0500)] <Justin_o> and we render a combined template

[13:38:45 CDT(-0500)] <Justin_o> okay.. interesting idea..

[13:39:05 CDT(-0500)] <Bosmon> This still leaves you with the problem of actually doing the rendering at the end, of course ....

[13:39:42 CDT(-0500)] <Bosmon> Well, ironically, you don't really want a "combined template" since that's exactly what the renderer for the component panels can't accept

[13:40:43 CDT(-0500)] <Bosmon> The way the current renderer is, you will need to do the rendering in two stages

[13:40:55 CDT(-0500)] <Bosmon> But in general you won't be able to combine the panels through straightforward grade merging

[13:41:02 CDT(-0500)] <Bosmon> YOu will need to create a special "grade-combining grade"

[13:41:21 CDT(-0500)] <Bosmon> Since you will need to insert an extra lifecycle step to subvert the normal action of the renderewr

[13:42:24 CDT(-0500)] <Justin_o> Bosmon: not sure if this causes more issues.. but the rendering is triggered by UIO as it expects the templates to be ready after the templateLoader

[13:42:34 CDT(-0500)] <Justin_o> if i remember things correctly

[13:42:57 CDT(-0500)] <Bosmon> Yes well, tinkering with the event boiling for that is the easy part of the problem

[13:43:43 CDT(-0500)] <Justin_o> Bosmon: uh oh.. what's the hard part

[13:44:41 CDT(-0500)] <cindyli> the part to create a special "grade-combining grade", i guess

[13:45:10 CDT(-0500)] <Justin_o> cindyli: (smile)

[13:45:28 CDT(-0500)] <cindyli> it sounds pretty hard to me at least (smile)

[13:46:57 CDT(-0500)] <Justin_o> cindyli, Bosmon: yes.. i still don't fully know what it entails

[13:47:25 CDT(-0500)] <Justin_o> and how to subvert the normal action of the renderer

[13:53:17 CDT(-0500)] <Bosmon> Well, it is only the "grade-combining grade" that will contain any unusual code

[13:53:38 CDT(-0500)] <Bosmon> The subpanels themselves will be essentiall normal renderer components

[13:54:42 CDT(-0500)] <cindyli> Justin_o, Bosmon: i'm thinking this process is like what fluid.uiOptions is doing now. fluid.uiOptions is a view component that takes in one template which has a few empty divs for panels. its subcomponents are panel renderer components. what if we create this sort of generic component that replicates this structure and behavior… what do you think?

[13:56:21 CDT(-0500)] <Bosmon> cindyli - yes

[13:56:42 CDT(-0500)] <Bosmon> With the one complication that if you indeed use this component itself for UIO, it will need to accept one like itself as children in addition to standard renderer components

[13:57:15 CDT(-0500)] <Bosmon> This suggests that you will end up creating a new "parent grade" factored off from RendererComponent itself, once this work is completed fully

[13:57:53 CDT(-0500)] <Justin_o> Bosmon: you mean using the rendererComponent as grade

[13:57:54 CDT(-0500)] <Justin_o> ?

[13:57:56 CDT(-0500)] <cindyli> whoa. that sounds quite tricky

[13:58:46 CDT(-0500)] <Bosmon> That bit can be left till last : P

[13:59:49 CDT(-0500)] <Bosmon> Just "get it working" first : P

[14:00:02 CDT(-0500)] <Bosmon> As colinclark will remark when he wakes up..... "ship it"!

[14:00:08 CDT(-0500)] <cindyli> lol

[14:16:32 CDT(-0500)] <Justin_o> cindyli: you want to pair on this tomorrow?

[14:16:40 CDT(-0500)] <cindyli> sure, Justin_o

[14:23:06 CDT(-0500)] <colinclark> SHIP IT

[14:23:12 CDT(-0500)] <colinclark> SHIP.IT!

[14:34:36 CDT(-0500)] <Justin_o> colinclark: (smile)