Allow properties on functions to be watchable/streamable#11642
Allow properties on functions to be watchable/streamable#11642machty wants to merge 1 commit intoemberjs:masterfrom
Conversation
There was a problem hiding this comment.
Maybe export this, so you can use it below in key-stream?
There was a problem hiding this comment.
I did until async dependency undefineds made me want to cry to the point of sneaking this in. I can take a stab at it again when I emotionally recover.
There was a problem hiding this comment.
Ahh, understood, makes sense. This is fine then...
|
👍 - just left a few small comments |
|
likely needs to be featureflagged unless it is deemed a bugfix. |
|
cc @krisselden |
|
@stefanpenner - It seems like a bugfix to me... |
|
seems good, @machty travis is complaining. |
|
@rwjblue ya, sounds good. |
|
Will fix the issues shortlay. |
|
Not sure if this is really a big deal but it surprised me that my first stab at a test case failed due to expecting the |
|
Can I understand the use-case where observing a function is actually desired? |
|
@stefanpenner my old better actions rfc outlines use cases. Basically I want to be able to support the pattern of where |
|
@machty ya still feels kinda funky, but you are likely correct. |
|
I'm not sold on @machty's inclination for putting the pending property on the action function, but regardless I am +1 for this patch! It seems reasonable. |
|
I might not even be sold on it but can't experiment without it and seems like it should work either way. |
ya, although quirky, i think it totally reduces WATs without introducing much cost at all Sorry @machty if you felt i was being overly negative. My goal was to fill in my own blanks. |
0d44c53 to
4070c7e
Compare
|
@machty ping |
Allows things like {{foo.bar}} to bind properly
when foo is a function
Use cases: the function form of
emberjs/rfcs#2
4070c7e to
adbb301
Compare
|
Sorry, finally had some time to dig into the failing tests a bit more... there are some CollectionView tests that are failing because there is internal logic that expands to checking/watching I'm kind of ready to throw in the towel on this one unless folk actually think this is a useful thing to have around. I don't think it's really worth much deeper investigating, but if someone more familiar with some of these internals has a moment to pair, maybe it's an easy thing to fix. |
|
I'm unsure how to fix this. Without introducing special casing for function specific built ins. The scenario you describe may actually be worth cleaning up and removing from ember. Although that may be more work then you are interested in. Silly edge cases |
Allows things like {{foo.bar}} to bind properly when foo is a function
Use cases: the function form of
emberjs/rfcs#2