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

Fix title rendering with FastBoot #119

Merged
merged 2 commits into from
Jan 15, 2018
Merged

Conversation

CvX
Copy link
Contributor

@CvX CvX commented Jan 14, 2018

Problem: Version 4.0.2 (PR #117) broke title rendering in apps that are using FastBoot.
It looks like title tag is being removed after the rendering? I'm not sure what the order of the actions exactly is, but the bottom line is: FastBoot server renders the title, and then, in the browser, after rendering settles, title tag is gone.

My fix is simple: since we already require title tag to be removed from index.html (if the app uses FastBoot), then there's no need to remove that tag in run-time (during neither SSR or in browser). So instead of checking for FastBoot's environment, we can check if FastBoot is present at all.

That's only a temporary solution, ideally we would implement the idea by @mydea #117 (comment) 🚀(the mentioned change has been merged into ember-cli-head, but the new release has not been published yet).

To avoid such breakages in the future, there should be tests added for FastBoot integration and possibly a second dummy app that utilizes ember-engines. I'll try look into it (though if anyone would like to jump on it, be my guest 😅).

@tim-evans
Copy link
Contributor

Thanks for the detailed write-up @CvX

I'm not using FastBoot, so it would be the best to have a FastBoot test suite to make sure regressions don't show up. I appreciate the changes, and will get them out ASAP

@tim-evans tim-evans merged commit 63c267e into ember-cli:latest Jan 15, 2018
@openhouse
Copy link

I thought I was having this problem, but actually I needed to add {{head-layout}} to application.hbs as detailed here: https://github.com/tim-evans/ember-page-title/releases/tag/4.0.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants