Skip to content

Normalize referrer and lookupString, add config flag#198

Merged
mixonic merged 1 commit intomasterfrom
pass-referrer-v2
Jul 2, 2017
Merged

Normalize referrer and lookupString, add config flag#198
mixonic merged 1 commit intomasterfrom
pass-referrer-v2

Conversation

@mixonic
Copy link
Member

@mixonic mixonic commented Jul 1, 2017

  • The referrer from Ember is not an absolute specifier. Do some string
    munging to clean it up. We would like this to be a build step
    on Ember template compilation at some point.
  • Ember tries to namespace components with components/ as a specifier
    namespace. Drop that, since MU rules say to look in the components
    collection anyway.
  • Add config to disable templates from being resolved locally in routes.

Supersedes #196, compatible with glimmerjs/glimmer-resolver#17

@mixonic mixonic force-pushed the pass-referrer-v2 branch from 9bad9b9 to 12e4397 Compare July 1, 2017 19:09
if (lookupString.indexOf('template:components/') === 0) {
if (referrer) {
// make absolute
let appName = this.config.app.rootName;
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be app.name or app.rootName?

@mixonic mixonic force-pushed the pass-referrer-v2 branch from 12e4397 to 2abc64f Compare July 1, 2017 19:15
if (lookupString.indexOf('template:components/') === 0) {
if (referrer) {
// make absolute
let appName = this.config.app.rootName || 'app';
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mixonic mixonic force-pushed the pass-referrer-v2 branch 4 times, most recently from 6d99bfa to ddac8d3 Compare July 1, 2017 22:43
@mixonic
Copy link
Member Author

mixonic commented Jul 1, 2017

With updates re: glimmerjs/glimmer-resolver#17 (comment)

@mixonic mixonic force-pushed the pass-referrer-v2 branch from ddac8d3 to 3c961a6 Compare July 1, 2017 22:45
* The referrer from Ember is not an absolute specifier. Do some string
  munging to clean it up. We would like this to be a build step
  on Ember template compilation at some point.
* Ember tries to namespace components with `components/` as a specifier
  namespace. Drop that, since MU rules say to look in the components
  collection anyway.
* Resolve with only a bare type and a referrer to look up route
  templates.
* Bump @glimmer/resolver
@mixonic mixonic force-pushed the pass-referrer-v2 branch from 3c961a6 to 5f425d6 Compare July 2, 2017 01:14
@mixonic mixonic merged commit 6614e68 into master Jul 2, 2017
@mixonic mixonic deleted the pass-referrer-v2 branch July 2, 2017 01:26
This was referenced Jul 2, 2017
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