ember.js
ember.js copied to clipboard
[WIP] deprecate view registry
This fixes an issue where event dispatching stops working if id is passed with splattributes, because elementId will diverge from the actual id, causing the element to not be found during event dispatching.
~~This patch does not fix the elementId divergent problem, but changes the framework code to not rely on elementId and use a weak map instead. I have ideas for fixing the elementId issue, and making it optional, but I'll probably submit it separately.~~ (It's fixed.)
It's probably best to review this commit-by-commit.
This also removes the view registry private API. The theory is that there are very few addons that uses it, and we can transition them to using the new Ember.ViewUtils.getElementView instead.
Should -view-registry go through an intimate API deprecation re: usages in the wild?
Should -view-registry go through an intimate API deprecation re: usages in the wild?
I did review usages on EmberObserver.com and I do not think the limited usage merits intimate API deprecation. The usages in addons that are maintained (releases in the last year or so) are mostly official packages (@ember/test-helpers, ember-resolver in the MU flagged code, etc), the usages in maintained non-official addons seem to mostly be in custom testing utilities and actually do have a nice API to migrate to.
@chancancode - Should we close, or revive?
huh yes, I thought we did the elementId fix already.. did we not?
Ah we did in fact land #17818 at least. We can probably just remove this now since the inspector switched to using the debug render tree. ~~Though I just added a test in #19382 that uses the view registry because I was lazy. 😉~~
@chancancode is this still relevant?
Is this still relevant? It is labeled wip.