Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Descendants of "Template-only components" has wrong _targetObject #15977

Closed
kategengler opened this issue Dec 13, 2017 · 10 comments
Closed

Descendants of "Template-only components" has wrong _targetObject #15977

kategengler opened this issue Dec 13, 2017 · 10 comments
Assignees
Labels

Comments

@kategengler
Copy link
Member

kategengler commented Dec 13, 2017

As discussed here: emberjs/rfcs#278 (comment)

For convenience sake, here is a demo app using Ember canary and a tree of:

application.hbs
> template-only-component
>> non-template-only-component
>>> another regular component
> partial
>> another regular component

Partials are not visible in the tree in the Ember Inspector but components beneath them are visible. Template-only components are not visible in the Ember Inspector, as expected, but regular components used in those template-only components are also not visible (unexpected).

Edit: added link to demo app, oops

@chancancode chancancode changed the title Descendants of "Template-only components" are not visible in the Ember Inspector Descendants of "Template-only components" has wrong _targetObject Dec 14, 2017
@chancancode
Copy link
Member

chancancode commented Dec 14, 2017

I found the bug. The problem is that the (curly) component tries to point its _targetObject to the outer scope's {{this}}, which is null in the case of a template-only component.

@rwjblue @krisselden what should be the right semantics here?

(It is only tangentially related the ember-inspector in that it is trying to use _targetObject to find a view's "controller parent")

@rwjblue
Copy link
Member

rwjblue commented Dec 14, 2017

I mentioned this in slack, but just wanted to clarify here also. I do not believe this is a bug in the feature. Having a _targetObject of null is exactly the semantics that I would expect. If this breaks functionality in the inspector, we should absolutely provide a better mechanism than _targetObject...

@rwjblue
Copy link
Member

rwjblue commented Apr 21, 2018

@chancancode / @kategengler - Did we decide that this wasn't an issue, or is there still something that needs addressing here?

@kategengler
Copy link
Member Author

I haven't checked the inspector's current behavior yet, but if it still does not show the tree of components beneath the template-only component, I'd say that's a problem.

@pixelhandler
Copy link
Contributor

@chancancode @kategengler @rwjblue is this still an issue, perhaps we should close or create a new reproduction of this, what do you think?

@kategengler
Copy link
Member Author

I believe this is still an issue; we discussed it just last Thursday at the Release team meeting.

@rwjblue
Copy link
Member

rwjblue commented Oct 2, 2018

Concretely, the issue is that the inspector currently does not support displaying these files (the description here is out of date IMHO).

@rwjblue
Copy link
Member

rwjblue commented Oct 2, 2018

Maybe we could migrate to emberjs/ember-inspector#870 though?

@RobbieTheWagner
Copy link
Member

@rwjblue I'm fine with tracking in inspector, we definitely need a game plan to support all the various possible component types, tagless, template only, etc.

@locks
Copy link
Contributor

locks commented Mar 26, 2019

Tracking at Ember Inspector.

@locks locks closed this as completed Mar 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants