Skip to content

[FEATURE ember-module-unification] Support name-spaced lookups#15967

Closed
iezer wants to merge 1 commit intoemberjs:masterfrom
iezer:isaac/namespaced-mu-components
Closed

[FEATURE ember-module-unification] Support name-spaced lookups#15967
iezer wants to merge 1 commit intoemberjs:masterfrom
iezer:isaac/namespaced-mu-components

Conversation

@iezer
Copy link
Contributor

@iezer iezer commented Dec 12, 2017

To support module unification, Ember needs to be able to pass lookup strings that have an an addon namespace, for example, "component::my-addon:my-input"

Related PRs:

Prior work: #15368

@mixonic

@iezer
Copy link
Contributor Author

iezer commented Dec 14, 2017

I opened ember-cli/ember-resolver#216 in ember-resolver to support the namespaces in the first parameter to resolve rather than requiring the third, rawString parameter. I have an ember app running with an end-to-end test. Here are two scenarios I tested:

Component

  • template has {{my-addon::my-component}}
    • ember calls ember-cli-resolver with resolver.resolve('component:my-addon::my-component')
      • ember-cli-resolver calls glimmer-resolver with this._glimmerResolver.resolve('component:my-addon::my-component')
        • glimmer-resolver looks in the correct location in requirejs.entries: component:/my-addon/components/my-component

Component Template

  • template has {{my-addon::my-component}}
    • ember calls ember-cli-resolver with resolver.resolve('template:components/my-addon::my-component')
      • ember-cli-resolver calls glimmer-resolver with this._glimmerResolver.resolve('template:my-component', 'template:/my-addon/')
        • glimmer-resolver looks in the correct location in requirejs.entries: template:/my-addon/components/my-component

Service Inject

  • Service is injected via foo: service('my-addon::foo')
    • ember calls ember-cli-resolver with resolver.resolve('service:my-addon::foo')
      • ember-cli-resolver calls glimmer-resolver with this._glimmerResolver.resolve('service:foo' 'service:/my-addon/')
        • glimmer-resolver looks in the correct location in requirejs.entries: service:/my-addon/services/foo

@iezer
Copy link
Contributor Author

iezer commented Dec 16, 2017

Other branch with rawString parameter https://github.com/iezer/ember.js/tree/isaac/namespace-raw-string

@iezer iezer force-pushed the isaac/namespaced-mu-components branch 2 times, most recently from e3ad52a to 86d6b55 Compare January 12, 2018 16:39
@mixonic
Copy link
Member

mixonic commented Mar 4, 2018

This has been supplanted by #16158

@mixonic mixonic closed this Mar 4, 2018
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.

2 participants