-
Notifications
You must be signed in to change notification settings - Fork 2k
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
DocumentHead: Remove refreshHeadTags() method #25003
Conversation
It does indeed look like those tags are not rendered anymore, so I don't have any problem with merging this 👍 It's weird that we allowed those tags to not be rendered at some point. Last time we did the switch to redirect |
d9532d8
to
b0ec732
Compare
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.
Smoke tested a bit, seems to work well.
Code also looks great, nice cleanup 👍 💯 I would only probably remove the unused selectors before shipping 🔪
@@ -131,8 +95,6 @@ DocumentHead.propTypes = { | |||
export default connect( | |||
state => ( { | |||
formattedTitle: getDocumentHeadFormattedTitle( state ), | |||
allLinks: getDocumentHeadLink( state ), |
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.
These are the only usages of those 2 selectors. We could totally delete them as well!
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.
Err nope 😄
wp-calypso/server/render/index.js
Lines 177 to 178 in 0b770c9
metas = getDocumentHeadMeta( context.store.getState() ); | |
links = getDocumentHeadLink( context.store.getState() ); |
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.
We want these in our server-generated HTML, after all 😉
b0ec732
to
04f01dd
Compare
Found while working on #24980. I read through #15297 which introduced this but couldn't make sense of why this method was introduced. (Most of all, adding
meta
andlink
tags on the client side doesn't seem to make a lot of sense when they're already added on the server side.) I'd be thankful if someone could explain the motivation for adding these methods.My current strategy for fixing SSR is found in #24977. Since SSR is broken anyway right now, I don't assume this PR to have any impact.
Testing instructions: Make sure that Calypso works as before.