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

Dynamic var params #14357

Closed
wants to merge 3 commits into from
Closed

Dynamic var params #14357

wants to merge 3 commits into from

Conversation

ef4
Copy link
Contributor

@ef4 ef4 commented Sep 26, 2016

This is a feature under discussion in RFC 95, implemented behind a symbol.

It allows components to access dynamically scoped variables via:

import { DYNAMIC_VAR_PARAMS } from 'ember-glimmer/utils/process-args';
MyComponent.reopenClass({
  [ DYNAMIC_VAR_PARAMS ]: [ 'outletState' ]
})

I intend to use it next within the LinkComponent as part of a refactor to make link-to cleaner and faster.

This PR depends on glimmerjs/glimmer-vm#332 and #14355.

@homu
Copy link
Contributor

homu commented Sep 27, 2016

☔ The latest upstream changes (presumably #14361) made this pull request unmergeable. Please resolve the merge conflicts.

This cleans up and unifies the handling of curly comopnent arguments. It splits the work into two distinct phases

 - gatherArgs assembles an EvaluatedArgs that combines all variations of positional and named arguments into a single EvaluatedArgs object
 - ComponentArgs.create takes the EvaluatedArgs and produces the curly-component specific attrs & props structures with mutable cells, etc.
This is a feature under discussion in [RFC 95](emberjs/rfcs#95), implemented behind a symbol.

It allows components to access dynamically scoped variables via:

```js
import { DYNAMIC_VAR_PARAMS } from 'ember-glimmer/utils/process-args';
MyComponent.reopenClass({
  [ DYNAMIC_VAR_PARAMS ]: [ 'outletState' ]
})
```

I intend to use it next within the LinkComponent as part of a refactor to make link-to cleaner and faster.
@homu
Copy link
Contributor

homu commented Sep 29, 2016

☔ The latest upstream changes (presumably #13996) made this pull request unmergeable. Please resolve the merge conflicts.

@rwjblue
Copy link
Member

rwjblue commented Oct 27, 2016

I think that we decided not to move forward on this (and emberjs/rfcs#95 ended up sticking to get-outlet-state and set-outlet-state). I'm going to close this (based on that assumption), please reopen if you disagree...

@rwjblue rwjblue closed this Oct 27, 2016
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

Successfully merging this pull request may close these issues.

None yet

3 participants