-
Notifications
You must be signed in to change notification settings - Fork 12
Fix: ember-page-title errors when head format template contains <title>
#3933
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
Open
FadhlanR
wants to merge
2
commits into
main
Choose a base branch
from
cs-9807-fix-ember-page-title-when-head-format-template-contains-title
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+86
−75
Open
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,54 +1,48 @@ | ||
| <!doctype html> | ||
| <html lang="en"> | ||
| <head> | ||
| <meta charset="utf-8" /> | ||
| <title>Boxel</title> | ||
| <meta name="description" content="" /> | ||
| <meta name="viewport" content="width=device-width, initial-scale=1" /> | ||
|
|
||
| {{content-for "head"}} | ||
|
|
||
| <link integrity="" rel="stylesheet" href="{{rootURL}}assets/vendor.css" /> | ||
| <link | ||
| integrity="" | ||
| rel="stylesheet" | ||
| href="{{rootURL}}assets/@cardstack/host.css" | ||
| /> | ||
| <link | ||
| href="{{rootURL}}boxel-favicon.png" | ||
| rel="shortcut icon" | ||
| type="image/x-icon" | ||
| /> | ||
| <link href="{{rootURL}}boxel-webclip.png" rel="apple-touch-icon" /> | ||
| <link rel="preconnect" href="https://fonts.googleapis.com" /> | ||
| <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin /> | ||
| <link | ||
| href="https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500;1,600;1,700&family=IBM+Plex+Sans:ital,wght@0,100..700;1,100..700&family=IBM+Plex+Serif:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500;1,600;1,700&display=swap" | ||
| rel="stylesheet" | ||
| /> | ||
|
|
||
| {{content-for "head-footer"}} | ||
|
|
||
| <meta data-boxel-head-start /> | ||
| <meta data-boxel-head-end /> | ||
|
|
||
| </head> | ||
| <body> | ||
| <script type="x/boundary" id="boxel-isolated-start"></script> | ||
| <script type="x/boundary" id="boxel-isolated-end"></script> | ||
|
|
||
| <!-- in case embercli's hooks insn't run, | ||
|
|
||
| <head> | ||
| <meta charset="utf-8" /> | ||
| <meta name="description" content="" /> | ||
| <meta name="viewport" content="width=device-width, initial-scale=1" /> | ||
|
|
||
| {{content-for "head"}} | ||
|
|
||
| <link integrity="" rel="stylesheet" href="{{rootURL}}assets/vendor.css" /> | ||
| <link integrity="" rel="stylesheet" href="{{rootURL}}assets/@cardstack/host.css" /> | ||
| <link href="{{rootURL}}boxel-favicon.png" rel="shortcut icon" type="image/x-icon" /> | ||
| <link href="{{rootURL}}boxel-webclip.png" rel="apple-touch-icon" /> | ||
| <link rel="preconnect" href="https://fonts.googleapis.com" /> | ||
| <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin /> | ||
| <link | ||
| href="https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500;1,600;1,700&family=IBM+Plex+Sans:ital,wght@0,100..700;1,100..700&family=IBM+Plex+Serif:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500;1,600;1,700&display=swap" | ||
| rel="stylesheet" /> | ||
|
|
||
| {{content-for "head-footer"}} | ||
|
|
||
| <meta data-boxel-head-start /> | ||
| <title>Boxel</title> | ||
| <meta data-boxel-head-end /> | ||
|
|
||
| </head> | ||
|
|
||
| <body> | ||
| <script type="x/boundary" id="boxel-isolated-start"></script> | ||
| <script type="x/boundary" id="boxel-isolated-end"></script> | ||
|
|
||
| <!-- in case embercli's hooks insn't run, | ||
| we embed the following div manually --> | ||
| <div id="ember-basic-dropdown-wormhole"></div> | ||
| {{content-for "body"}} | ||
|
|
||
| <script type="module"> | ||
| import * as ContentTag from '{{rootURL}}assets/content-tag/standalone.js'; | ||
| globalThis.ContentTagGlobal = ContentTag; | ||
| </script> | ||
| <script src="{{rootURL}}assets/vendor.js"></script> | ||
| <script src="{{rootURL}}assets/@cardstack/host.js"></script> | ||
|
|
||
| {{content-for "body-footer"}} | ||
| </body> | ||
| </html> | ||
| <div id="ember-basic-dropdown-wormhole"></div> | ||
| {{content-for "body"}} | ||
|
|
||
| <script type="module"> | ||
| import * as ContentTag from '{{rootURL}}assets/content-tag/standalone.js'; | ||
| globalThis.ContentTagGlobal = ContentTag; | ||
| </script> | ||
| <script src="{{rootURL}}assets/vendor.js"></script> | ||
| <script src="{{rootURL}}assets/@cardstack/host.js"></script> | ||
|
|
||
| {{content-for "body-footer"}} | ||
| </body> | ||
|
|
||
| </html> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because the default
<title>was moved into thedata-boxel-head-*region, callinginjectHeadHTMLwill remove it. In this block you only add a title whenheadHTML != null, so when a card has no head template but does have scoped CSS, the injected head becomes just the<style>block and the page ends up with zero<title>. This is likely for cards that define scoped CSS but no head format. Consider adding the default title whenever you inject head content without a title, or explicitly include it whenheadHTMLis null butscopedCSSis present.Useful? React with 👍 / 👎.