ember-angle-brackets-codemod icon indicating copy to clipboard operation
ember-angle-brackets-codemod copied to clipboard

[BUGFIX] Contextual component variable transformation

Open rajasegar opened this issue 5 years ago • 4 comments

Fixes #220

I set out to solve the blockParams problem , now I have one more failing test case @tylerturdenpants @Turbo87 Anything I am missing here?

rajasegar avatar Jan 12 '20 05:01 rajasegar

@rajasegar I should have a branch pushed to origin for working on this issue. Let’s collaborate. My implementation keeps track of scope (yours might, but I have looked into it) and takes a more conservative approach to the transform when we can decide if a plain value is being yield or a contextual component.

tylerturdenpants avatar Jan 12 '20 10:01 tylerturdenpants

FWIW with the new path param of the visitor this kind of tracking becomes a lot easier :wink:

Turbo87 avatar Jan 12 '20 10:01 Turbo87

@Turbo87 thats awesome. I haven’t had a chance to catch up. My current implementation was fairly straight forward, would like your thoughts on it anyway. Be that as it may might point was to make sure @rajasegar knew we could collaborate before he went any further or he can continue fixing it if he likes.

tylerturdenpants avatar Jan 12 '20 10:01 tylerturdenpants

quick question on this: Isn't it this supposed to be a feature? looking at this ember doc https://guides.emberjs.com/release/upgrading/current-edition/templates/ "Yielded components can also be invoked with angle bracket syntax".

The problem I see is that the codemod doesn't do this consistently

sophiaonion avatar Jan 16 '20 02:01 sophiaonion