MWPW-188278: Align head-loaded SSR flag with da-bacom pattern#960
MWPW-188278: Align head-loaded SSR flag with da-bacom pattern#960JasonHowellSlavin wants to merge 5 commits intostagefrom
Conversation
Add static meta head-loaded=false, derive ssrFlag from content, and set flagMeta content true at end of inline head script. Made-with: Cursor
|
|
Skipped merging 960: MWPW-188278: Align head-loaded SSR flag with da-bacom pattern due to failing checks |
1 similar comment
|
Skipped merging 960: MWPW-188278: Align head-loaded SSR flag with da-bacom pattern due to failing checks |
nkthakur48
left a comment
There was a problem hiding this comment.
@JasonHowellSlavin Could you please have a look at review comments
| const isAllowedAgent = allowedAgents && allowedAgents.some((agent) => userAgentString.includes(agent.trim())); | ||
|
|
||
| const ssrFlag = document.querySelector('meta[name="head-loaded"]'); | ||
| const flagMeta = document.querySelector('meta[name="head-loaded"]'); |
There was a problem hiding this comment.
Since flagMeta is always present in static HTML (due to L#2), the optional chaining here may not be required. It's fine to keep, but it should be consistent with the check on L#156
|
|
||
| const ssrFlag = document.querySelector('meta[name="head-loaded"]'); | ||
| const flagMeta = document.querySelector('meta[name="head-loaded"]'); | ||
| const ssrFlag = flagMeta?.content === 'true'; |
There was a problem hiding this comment.
Minor: ssrFlag is now a boolean, but the name reads like an element reference. Variable names like isHeadLoaded or headAlreadyLoaded would be clearer
|
Skipped merging 960: MWPW-188278: Align head-loaded SSR flag with da-bacom pattern due to failing checks |
1 similar comment
|
Skipped merging 960: MWPW-188278: Align head-loaded SSR flag with da-bacom pattern due to failing checks |
|
Skipped merging 960: MWPW-188278: Align head-loaded SSR flag with da-bacom pattern due to failing checks |
|
Skipped merging 960: MWPW-188278: Align head-loaded SSR flag with da-bacom pattern due to failing checks |
|
Skipped merging 960: MWPW-188278: Align head-loaded SSR flag with da-bacom pattern due to failing checks |
8 similar comments
|
Skipped merging 960: MWPW-188278: Align head-loaded SSR flag with da-bacom pattern due to failing checks |
|
Skipped merging 960: MWPW-188278: Align head-loaded SSR flag with da-bacom pattern due to failing checks |
|
Skipped merging 960: MWPW-188278: Align head-loaded SSR flag with da-bacom pattern due to failing checks |
|
Skipped merging 960: MWPW-188278: Align head-loaded SSR flag with da-bacom pattern due to failing checks |
|
Skipped merging 960: MWPW-188278: Align head-loaded SSR flag with da-bacom pattern due to failing checks |
|
Skipped merging 960: MWPW-188278: Align head-loaded SSR flag with da-bacom pattern due to failing checks |
|
Skipped merging 960: MWPW-188278: Align head-loaded SSR flag with da-bacom pattern due to failing checks |
|
Skipped merging 960: MWPW-188278: Align head-loaded SSR flag with da-bacom pattern due to failing checks |
|
@nkthakur48 I am going to open some PRs with your comments above for the da-cc repo. Am I correct in understand that CC is fully migrated to DA and this repo is no longer used for the site? Or do I need to make the changes here as well? |
|
Skipped merging 960: MWPW-188278: Align head-loaded SSR flag with da-bacom pattern due to failing checks |
1 similar comment
|
Skipped merging 960: MWPW-188278: Align head-loaded SSR flag with da-bacom pattern due to failing checks |
Resolves: MWPW-188278
Test URLs:
Verification Steps
<head>element, notice no new links<head>Additional testing example with video:
https://wiki.corp.adobe.com/spaces/WP4/pages/3747684013/Adding+Hreflang+Link+Block+Functionality#AddingHreflangLinkBlockFunctionality-Testing
Implementation doc
https://wiki.corp.adobe.com/spaces/WP4/pages/3747684013/Adding+Hreflang+Link+Block+Functionality