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 Syntax #16688

Closed
21 tasks done
rwjblue opened this issue May 25, 2018 · 4 comments
Closed
21 tasks done

Angle Bracket Invocation Syntax #16688

rwjblue opened this issue May 25, 2018 · 4 comments
Labels

Comments

@rwjblue
Copy link
Member

rwjblue commented May 25, 2018

Summary

Now that the Angle Bracket Invocation RFC has been merged (🎉) this issue aims to track landing the functionality proposed there behind the EMBER_GLIMMER_ANGLE_BRACKET_INVOCATION feature flag.

Where possible individual items will cross link to the related section of the RFC.

Features

  • Static invocation of existing Ember.Component based components via angle brackets with "capital case" component naming (e.g. <FooBar></FooBar> would find app/components/foo-bar.js). Relevant RFC Section
  • Allowing single word component names (as long as they begin with a capital letter). Relevant RFC Section
  • Support for passing named arguments into the component being invoked (e.g. <FooBar @foo={{somethingSpecial}}></FooBar>).
  • Support for passing HTML attributes Relevant RFC Section
    • Should add the specified attributes to an element containing ...attributes
    • Should add the specified attributes to the wrapping element when tagName is not ''
    • Attributes should be added after those specified by the component itself (and therefore "overridable")
    • class attribute should be merged with those in the specified element
  • Block support
    • Block can be passed to the invoked component and yielded to.
    • has-block should be false for "self closing" invocations (e.g. <FooBar />)
    • has-block should be true for normal (not self closing) invocations (e.g. <FooBar></FooBar>)
  • Dynamic Invocations Relevant RFC Section
    • Allow invocation of block params within scope (casing rules are not applicable)
    • Allow invocations that are path lookups (e.g. <this.foo></this.foo>)
    • Allow invocations that are named blocks (e.g. <@foo></@foo>)

Implementation TODO's

@rwjblue
Copy link
Member Author

rwjblue commented May 25, 2018

Updated checklist to mark off items from #16686.

@rwjblue
Copy link
Member Author

rwjblue commented May 29, 2018

Marked has-block support completed (as of #16697) as well as one of the implementation TODO's.

@rwjblue
Copy link
Member Author

rwjblue commented Jun 1, 2018

Updated for items completed in #16704.

@rwjblue
Copy link
Member Author

rwjblue commented Jun 1, 2018

This is now enabled by default on canary, and barring any additional issues will be included in the 3.4 series of releases.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant