Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Angle Bracket invocation on blueprints #17625

Closed
ppcano opened this issue Feb 17, 2019 · 6 comments
Closed

Angle Bracket invocation on blueprints #17625

ppcano opened this issue Feb 17, 2019 · 6 comments

Comments

@ppcano
Copy link
Contributor

ppcano commented Feb 17, 2019

Related to #17524

Blueprints are a good mechanism to learn the framework API. If we are updating the docs to the Angle Bracket syntax; I think we should update also the code generated by the blueprints.

@ppcano
Copy link
Contributor Author

ppcano commented Feb 17, 2019

@MelSumner This is likely an issue that could be included on the Octane Tracking issue

@rwjblue
Copy link
Member

rwjblue commented Feb 18, 2019

Yep, totally!

@ppcano
Copy link
Contributor Author

ppcano commented Feb 24, 2019

@rwjblue

The component blueprint can create a nested component or receive the path option but as far as I know the angle bracket syntax does not support nested components.

I thought that the blueprint could fallback to the curly bracket syntax when angle bracket is not possible. Does this make sense?

@sukima
Copy link
Contributor

sukima commented Feb 25, 2019

Has there been any progress on this or is it an Octane only thing. Can I start looking into this now? (I have no job at the moment) or should I move on to another issue?

@sukima
Copy link
Contributor

sukima commented Feb 25, 2019

Regarding blueprints. If I understand the issue a blueprint can generate a component in any directory structure needed (including nested components). However I don't recall the blueprints generating invocations of such components. What I mean is that it can place the files in nested directories but then it is up to the user to invoke it. In this case the distinction to support both angle brackets vs curly brackets is some what a moot point.

It would seem to me the scope of the blueprint to recognize a nested component might be nothing more then to print out a warning message on the console that the user must use curly brackets to invoke the component.

sukima added a commit to sukima/ember.js that referenced this issue Feb 28, 2019
Prior to this change, the blueprints generated curly brace syntax for
the component-test.

This change will default to generating the angle bracket syntax unless
it finds the component being generated has any nesting (which is not
supported by angle bracket syntax) in which case it fallsback to the
curly bracket syntax.

Fixes emberjs#17625
sukima added a commit to sukima/ember.js that referenced this issue Feb 28, 2019
Prior to this change, the blueprints generated curly brace syntax for
the component-test.

This change will default to generating the angle bracket syntax unless
it finds the component being generated has any nesting (which is not
supported by angle bracket syntax) in which case it fallsback to the
curly bracket syntax.

Fixes emberjs#17625
Based on an original implementation by @ppcano
@rwjblue
Copy link
Member

rwjblue commented Feb 28, 2019

However I don't recall the blueprints generating invocations of such components.

ember generate component foo-bar generates both a component and a component test, that test includes invocations of the component. I believe that is specifically what this issue is referring to.

sukima added a commit to sukima/ember.js that referenced this issue Feb 28, 2019
Prior to this change, the blueprints generated curly brace syntax for
the component-test.

This change will default to generating the angle bracket syntax unless
it finds the component being generated has any nesting (which is not
supported by angle bracket syntax) in which case it fallsback to the
curly bracket syntax.

Fixes emberjs#17625
Based on an original implementation by @ppcano
@rwjblue rwjblue closed this as completed in a7eab12 Mar 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants