ember-cli-document-title icon indicating copy to clipboard operation
ember-cli-document-title copied to clipboard

Updated fastboot compatibility

Open ronco opened this issue 8 years ago • 6 comments

FastBoot is moving to a solution where the entire contents of <head> and <body> are injected into the document. In the near future title substitution will be removed entirely in favor of head substitution. This update switches the dependency on title substitution to use ember-cli-head for setting the title.

Following semver I've bumped the version since this change will require users to remove the existing <title> tag from their index.html. Suggestions for changes welcome.

/cc @tomdale @rwjblue

ronco avatar Apr 07 '16 04:04 ronco

LGTM

rwjblue avatar Apr 07 '16 11:04 rwjblue

@ronco - Can we warn folks if they forget to remove <title> from app/index.html? Or even do it for them in a blueprint?

rwjblue avatar Apr 27 '16 16:04 rwjblue

@rwjblue I was thinking of maybe updating this to remove it in a browser only initializer since this delays the title until the app is loaded in a non-fastboot scenario (see this issue on ember-page-title).

But that doesn't solve a duplicate error when you are using it with FastBoot.

ronco avatar Apr 27 '16 16:04 ronco

I appreciate the help here. I'm a bit swamped, but wanted to let you know that I'm paying attention to this.

kimroen avatar Apr 27 '16 16:04 kimroen

I'm making a new release of ember-cli-document-title today, but it doesn't look like I'll have the time to include this, unfortunately. Soon!

I'd like to have tests for this, so I created a new issue for that: https://github.com/kimroen/ember-cli-document-title/issues/52. I might just test it manually locally first and release this change if it proves to take a long time to write these test.

Some things:

  • Would the suppressBrowserRender-setting in ember-cli-head interfere with the functionality of ember-cli-document-title in any way?
  • You change all the tests to check for title inside the head in the DOM, but I'm not sure that is testing the same thing as checking document.title. Is it? Why is it better/more correct?
  • Please don't bump the version number in a PR like this. I'll do that myself after I have decided what is to be included. Don't worry about it for this time though, I'll handle it!

Thanks again, and sorry for the super-delay in getting around to checking this out.

kimroen avatar Oct 09 '16 16:10 kimroen

Is this going to get merged?

gabrielcsapo avatar Aug 12 '19 18:08 gabrielcsapo