ember.js icon indicating copy to clipboard operation
ember.js copied to clipboard

[WIP] deprecate view registry

Open chancancode opened this issue 6 years ago • 7 comments

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.

chancancode avatar Mar 26 '19 21:03 chancancode

Should -view-registry go through an intimate API deprecation re: usages in the wild?

mixonic avatar Mar 29 '19 18:03 mixonic

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.

rwjblue avatar Apr 01 '19 15:04 rwjblue

@chancancode - Should we close, or revive?

rwjblue avatar Feb 10 '21 15:02 rwjblue

huh yes, I thought we did the elementId fix already.. did we not?

chancancode avatar Feb 10 '21 18:02 chancancode

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 avatar Feb 10 '21 18:02 chancancode

@chancancode is this still relevant?

locks avatar Feb 05 '22 19:02 locks

Is this still relevant? It is labeled wip.

kategengler avatar Dec 12 '23 16:12 kategengler