yapplabs / ember-wormhole

Render a child view somewhere else in the DOM.
MIT License
284 stars 62 forks source link

Renders in place in Fastboot environment #86

Closed sevab closed 7 years ago

sevab commented 7 years ago

I'm running on 2.10.0 and there seems an issue where all wormholes are rendered in place in Fastboot environment, E.g:

<div id="destination"></div>
{{#ember-wormhole to="destination"}}
  <p>Hello world!</p>
{{/ember-wormhole}}

{{!-- renders to: --}}
<div id="destination"></div>
<div id="ember2023" class="ember-view">
    <p>Hello world!</p>
</div>

Not sure if this is expected behavior when in Fastboot or a bug.

simonihmig commented 7 years ago

Seeing the same. Already spent some good amount of time investigating this. Will post updates once I see what is going on there...

simonihmig commented 7 years ago

Did invest quite some time on this, and had some lenghty discussions at the #-fastboot Slack channel. At least for Glimmer2, the willRender component hook will definitely not be called in FastBoot. This means the magic that ember-wormhole does is not triggered, and I currently see no way to make this happen, other than Glimmer2 at some point offers a direct API for ember-wormhole's use case (this was planned, no idea what the status is).

sandydoo commented 7 years ago

96 provides a fix for this issue. So far I've been using it in development locally for over a month without issues, but consider it experimental until someone with more runloop/fastboot/wormhole experience confirms it's a viable fix. A merge would probably require everyone to decide on a fastboot testing strategy, so might be a while till that happens.