Skip to content

Conversation

@rwjblue
Copy link
Member

@rwjblue rwjblue commented Jul 21, 2016

  • Add an injection to ensure that component's all get the -view-registry:main injected.
  • Replace usage of Ember.View.views as the fallback registry, with a custom fallback registry that is only used when views/components are instantiated outside of the DI system.

@rwjblue rwjblue force-pushed the pass-through-view-registry branch 2 times, most recently from 4bd494c to 5c107eb Compare July 21, 2016 20:52
@krisselden
Copy link
Contributor

should not be injected to every component, only the renderer and eventdispatcher need this.

@rwjblue
Copy link
Member Author

rwjblue commented Jul 21, 2016

@krisselden - Sounds good. Will update.

@krisselden
Copy link
Contributor

The renderer can register a view and the event dispatcher looks it up. Putting _viewRegistry on every component then dereferencing it up via every component is crappy.

@rwjblue
Copy link
Member Author

rwjblue commented Jul 21, 2016

@krisselden - Components (in HTMLBars) currently have a _viewRegistry property (and in fact this is how the registration happens in view_support mixin's register method), should I change that to have the renderer itself register views? If yes, should that change be applied to both HTMLBars and Glimmer?

@krisselden
Copy link
Contributor

the dom state should call register on the renderer, I don't think the fallback registry is important. I think it is cruft from when views may or may not have had an env and/or Ember.View.views

@rwjblue rwjblue force-pushed the pass-through-view-registry branch 2 times, most recently from 53bb9b6 to 3b4f1dd Compare July 21, 2016 22:55
@rwjblue
Copy link
Member Author

rwjblue commented Jul 21, 2016

@krisselden - OK, updated to avoid threading the view registry around, and instead rely on the renderer to do the work.

Copy link
Member Author

Choose a reason for hiding this comment

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

Removed this test, since it is asserting a thing that is actually not valid (we do not want a _viewRegistry set on view/component instances at all).

@rwjblue rwjblue force-pushed the pass-through-view-registry branch 2 times, most recently from ac8b47e to 2a233df Compare July 21, 2016 23:07
* Remove usage of `Ember.View.views`. This has not been exposed since 1.x.
* Use the renderer to update view registry.
@krisselden krisselden merged commit 6933403 into emberjs:master Jul 22, 2016
@chadhietala
Copy link
Contributor

@rwjblue Does this properly enable #13505?

@krisselden
Copy link
Contributor

@chadhietala only in the sense that the test has been removed.

@rwjblue rwjblue deleted the pass-through-view-registry branch July 22, 2016 12:19
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.

4 participants