emberjs / ember-inspector

Adds an Ember tab to the browser's Developer Tools that allows you to inspect Ember objects in your application.
MIT License
966 stars 286 forks source link

Introduce API to allow objects to "opt out" of introspection on specific properties. #1110

Open rwjblue opened 4 years ago

rwjblue commented 4 years ago

In #1106, we introduced a obj instanceof GlimmerComponent style check because @glimmer/component@1.0.0 includes a few properties that throw errors when accessed (they are not intended to be used in Ember, and we provide helpful errors so that folks don't try to use them due to typing inconsistencies between Ember and Glimmer.js). In order to remove our special exemption for @glimmer/component I'd like to propose adding a mechanism that can be used to instruct the ember-inspector to completely ignore specific properties.

Off the top of my head, I have two proposed solutions here:

Either of these would work, or we can pick another path, but I'd like to decide a resolution so that we can remove the need to special case @glimmer/component as done in #1106.

patricklx commented 1 year ago

I guess this is fixed by the linked PR? There would also have been this possiblity: https://github.com/emberjs/ember-inspector/wiki/customize-debug-info-of-components