ember-cli-head icon indicating copy to clipboard operation
ember-cli-head copied to clipboard

suppressBrowserRender should either be renamed or updated

Open reidab opened this issue 6 years ago • 4 comments

As of 0.4.0, the suppressBrowserRender option doesn't really do what it says on the tin. Since the instance-initializer no longer injects {{head-layout}}, returning early from it doesn't actually suppress any rendering.

reidab avatar Nov 06 '17 18:11 reidab

cc @rondale-sc

rwjblue avatar Nov 06 '17 19:11 rwjblue

@reidab I think maybe that shouldn't be config anymore. Since the consuming application is responsible now for when head-layout component gets rendered I'd expect to have that logic co-located with the component call.

Something like:

{{#if fastboot.isFastBoot }}
  {{ head-layout }}
{{/if}}

If that is the case we need to update the README to remove suppressBrowserRender as an option. And remove any logic around it.

@rwjblue thoughts?

rondale-sc avatar Nov 20 '17 19:11 rondale-sc

Just a heads up - we are using this to dynamically select which CSS gets loaded for our app, when we disable the suppressBrowserRender in fastboot when the app rehydrates the css vanishes as everything in {{head-layout}} gets removed. Not sure what the right name for this variable is but it most likely needs to stay around to prevent triggering a CSS reload.

nolman avatar Apr 30 '18 21:04 nolman

I have been running into this issue as well. Fastboot+Ember renders the head, along with all of its special bits (meta tags, structured data etc) Ember comes down the pipe and crushes all of those bits.

If I do what @rondale-sc suggests (wrap the {{head-layout}} in a {{fastboot.isFastBoot}} check. It fixes my problem.

Duder-onomy avatar Dec 12 '18 23:12 Duder-onomy