-
Notifications
You must be signed in to change notification settings - Fork 286
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
Only application present in View Tree #419
Comments
Looking more at the view and then in rendering performance, it doesn't seem to be recognizing the views/templates at all. For example this is rendering performance. However if I go into the Routes tab the currently active route is bolded Some more info incase it helps
Looking at this #248 it may be related to @ToddSmithSalter's solution UPDATE: I have checked through the Routes tab and all the controllers and nothing seemed to be out of line. I also tried going back to the earlier versions but it breaks specifically at 1.13.0 |
I will note that our app heavily relies on views, would having these be the cause? |
👍 |
@Frozenfire92 I see an application view in the view tree. What's missing, the index view? Or are there other views that should be visible? |
Hey @teddyzeenny You are correct that more views should be visible. If you look the Application view in the view tree also says its an inline template and its view/component is an unknown mixin I've attached a screenshot of what it looks like in 1.12 and below Upgrading to 1.13.6 didn't work unfortunately. I will try and reproduce it in jsbin now. Also there was one other user on the forums who had this here I will try and ping him in here for more info |
I wasn't able to reproduce immediately with a jsbin http://emberjs.jsbin.com/bovusipafa/2 this is much simpler than our app, I will try and add more characteristic things our app has when I have time |
Tried upgrading to 1.13.8 but the issue persists. I didn't see your comment about ember-cli, we are using grunt with emberTemplates and concat. In the discussion linked above the other person who had the issue was using ember-cli |
@Frozenfire92 - Can you confirm you are on 1.9.x of the inspector? It fixed a number of issues with the view tree, so I just want to make sure we are talking about the latest release version.... |
Yep I'm on 1.9.0 Edit: Just tried on firefox aswell and the same thing occurs |
Still present in ember 1.13.9 |
Has anyone tinkered with this at all? I'm also using liquid-fire and all the liquid-fire components show up when I click on the components box, but none of my controllers / routes |
Confirmed that this also happens in firefox for me as well |
I created a almost empty project and I run it via both: ember-cli and ember-rails |
digging a little in the inspector code, I found that templates compiled with ember-rails does not include the attribute here: |
I can confirm one of the reason is ember-liquid-fire, or other addons relied on it, more importantly, a I found that if you drag the I guess this is some sort of edge case of view tree rendering parse, for now I just remove all addons that rely on Don't sure other possibilities, just my personal experience. |
Now I have just made another test to confirm.
Then I manually removed that And that is how rails-ember compiles their templates, without inclusion of |
this is required to make `moduleName` meta key available in the compiled template to allow view tree inspection. the problem is reported at emberjs/ember-inspector#419
Those changes make template compilation process produce `moduleName` meta key in the result. This make possible to ember-inspector inspect the app view tree and fixes the issue reported in ember-inspector. emberjs/ember-inspector#419 those changes have to be used in combination with changes in barber gem from this pull request tchak/barber#53.
I have changed the template compilation process for ember-rails with the changes above, and now the view tree inspector works fine with ember 1.13. When the compilation happens using HTMLBars.compile I added an extra parameter to include the mentioned To do so, barber needs to accept compilation options (tchak/barber#53) and ember-handlebars-template need to provide them (tricknotes/ember-handlebars-template#14). |
Those changes make template compilation process produce `moduleName` meta key in the result. This make possible to ember-inspector inspect the app view tree and fixes the issue reported in ember-inspector. emberjs/ember-inspector#419 those changes have to be used in combination with changes in barber gem from this pull request tchak/barber#53.
Now I released a ember-handlebars-template@0.6.0 thanks to @formigarafa . Could someone try it? |
I also experience this issue caused by Liquid Fire. I confirm that dragging the liquid div below the application div as @nightire suggests is a valid workaround. Can you please fix this? |
PLEASE, this is so annoying! >_< |
I've started a bounty for this issue: https://freedomsponsors.org/issue/781/only-application-present-in-view-tree Please join! $10 so far. |
Looks like this is the problematic line:
Ember Inspector seems to assume that the views will form a tree with a single root view, whose element will be the only element at that level of the DOM with an However, liquid-fire and/or ember-wormhole violate this assumption with their "warping" behavior that places ember view containing elements directly below the app's rootElement (i.e. as siblings of the application view). Manually moving these warped elements after the application view in the Chrome inspector works around this, because the above CSS selector then selects the appropriate element as the application view. To solve this, it seems like we have a few options:
I was going to take a stab at this (option 1 specifically), but I'm unable to get a clean checkout to build on my local machine (I'll file a separate issue for that). |
We could simply update this selector |
@lolmaus we could, but that would (a) prevent devs from inspecting the warped views themselves, and (b) tightly couple ember inspector to liquid-fire & wormhole. If those addons ever changed their DOM structure, inspector might then need to change. And there may be other, less popular addons that do similar things (now or in the future) - how do we make sure those all are supported? Ultimately, I think the root problem is the mismatch between the inspector's ideas of the view tree (that it has a single root) and reality (there can be multiple roots). I think the best way to avoid more bugs / special casing in the future is to change inspector to match the reality of Ember's view system. |
@davewasmer Sure, but having that workaround is better than nothing, right? We could do that and keep looking for a better solution. |
@lolmaus personally, I think the "move the warped elements to after the application's element in Elements panel" is enough of a workaround to avoid shipping an intermediate solution that would be replaced shortly thereafter by a long term solution. |
This should exclude liquid-fire elements or various others that add classes to the application container ember-view. If you were adding your own classes to the application container, this would break, but I think this supports the majority of cases, and application wrappers are disabled by a lot of people these days anyway. Resolves #419
…ses (#874) This should exclude liquid-fire elements or various others that add classes to the application container ember-view. If you were adding your own classes to the application container, this would break, but I think this supports the majority of cases, and application wrappers are disabled by a lot of people these days anyway. Resolves #419
…ses (emberjs#874) This should exclude liquid-fire elements or various others that add classes to the application container ember-view. If you were adding your own classes to the application container, this would break, but I think this supports the majority of cases, and application wrappers are disabled by a lot of people these days anyway. Resolves emberjs#419
I have been working on upgrading to 1.13 and have noticed that my view tree is quite off. I tried cloning and building from source but the same issue
The text was updated successfully, but these errors were encountered: