These are chat archives for canjs/canjs

30th
Jul 2015
Chris Gomez
@akagomez
Jul 30 2015 15:46
Screen Shot 2015-07-30 at 11.45.02 AM.png
@matthewp @alexisabril @daffl
^What does “the outer scope values from the user content” mean there?
Is that the same as "the outer scope values from the component's template”?
Probably not. I just realized the "component template”/"user content differences” in the description.
Okay, let me try and re-read this.
dylanrtt
@dylanrtt
Jul 30 2015 15:49
@akagomez it means the light dom between the compent's open/close tags can only read from the outer scope, not the component's viewModel. I also found the docs on this a bit confusing
Chris Gomez
@akagomez
Jul 30 2015 15:51
It’s becoming clearer. I assumed it would be as simple as understanding that excerpt. Reading on is helping.
dylanrtt
@dylanrtt
Jul 30 2015 16:00
I think it really needs a better example, perhaps a diagram depicting what concepts like outer scope and user content mean, showing which values would be accessible where.
If I’m understanding correctly, when leakScope === truethe light DOM is rendered in the context of the components scope, and the components template is rendered with scope walking. When leakScope === falsethe light DOM is rendered in the context of the current template’s scope, and the the components template is rendered without scope walking.
Chris Gomez
@akagomez
Jul 30 2015 16:56
Here’s another way to describe what I’m interpreting: When leakScope === true the light DOM template is rendered in the context of the component’s scope with scope walking enabled. When leakScope === false, the light DOM template is rendered in its current context and the component’s template is rendered with scope walking disabled.
Do I have that right?
Actually, those two variations wound up being nearly identical.
dylanrtt
@dylanrtt
Jul 30 2015 16:58
yes it seems we are on the same page
Chris Gomez
@akagomez
Jul 30 2015 16:59
Thanks. Glad I took the time to get my head around that.
Matthew Phillips
@matthewp
Jul 30 2015 17:11
with leakScope: false the light DOM will not have access to the parent view model @akagomez
this code could use a small rewrite to be more clear
Chris Gomez
@akagomez
Jul 30 2015 17:12

But if leakScope is false:

<hello-world>Hello World</hello-world>

By “parent view model” do you mean the component’s view model?
Matthew Phillips
@matthewp
Jul 30 2015 17:13
yes
Chris Gomez
@akagomez
Jul 30 2015 17:13
Gotcha.
Matthew Phillips
@matthewp
Jul 30 2015 17:13
check the code, i think i'm right
Chris Gomez
@akagomez
Jul 30 2015 17:14
Do we have some documentation on scope walking in general?
Chris Gomez
@akagomez
Jul 30 2015 17:17
@matthewp Interesting thanks. Do we have anything documented in the context of components?
Matthew Phillips
@matthewp
Jul 30 2015 17:21
not that i can recall
Chris Gomez
@akagomez
Jul 30 2015 17:38
Got it.
Alex
@whitecolor
Jul 30 2015 20:20
@justinbmeyer any comment on docjs errors I get?
Gerard Finnerty
@halcyonandon
Jul 30 2015 21:28
I was reading about Facebook's bigpipe for optimized page loading with a component-driven architecture, https://www.facebook.com/notes/facebook-engineering/bigpipe-pipelining-web-pages-for-high-performance/389414033919
has anything similar to this been discussed or implemented with canjs?