-
Notifications
You must be signed in to change notification settings - Fork 163
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
MWPW-158142 [MEP] check for MEP placeholders as fragmentless content is inserted #2919
Conversation
Hello, I'm the AEM Code Sync Bot and I will run some actions to deploy your branch and validate page speed.
|
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## mepnestedplaceholders #2919 +/- ##
======================================================
Coverage 96.24% 96.24%
======================================================
Files 236 236
Lines 54273 54278 +5
======================================================
+ Hits 52236 52241 +5
Misses 2037 2037 ☔ View full report in Codecov by Sentry. |
Looks good. Just needs some love to make ESlint happy and to make sure new code is tested. @AdobeLinhart |
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.
Looks good. Any unit tests to update?
Linting should be fixed. @JasonHowellSlavin This utilizes a reusable function that's also part of one of Viv's branches. The unit test is the same (parseNestedPlaceholders.test). |
…milo into placeholderperformance
* MWPW-158674 [MEP] Support nested placholders in MEP placeholders * unit test * move match functionality to reusable function * add default value for info in getManifestConfig declaration * MWPW-158142 [MEP] check for MEP placeholders as fragmentless content is inserted (#2919) * Initial checkin. Working state. * Code refactor. * Unit test initial checkin. * Refactor into reusable function. * Removed old code. * Linting. * update unit test to call create content --------- Co-authored-by: vgoodric <[email protected]> --------- Co-authored-by: Dave Linhart <[email protected]>
Now that MEP supports fragmentless content, people are going to use MEP placeholders more. To prevent the performance hit of using placeholders in section 1, we should update content as we insert it.
Inside the function called "createContent" there is an if statement that triggers when when the new content is not a fragment. If you run getConfig() there is a node called placeholders if there were MEP specific placeholders. I want to check the content string for placeholders and if they exist check the MEP placholders to do a replace before replace or insertion.
Resolves: MWPW-158142
QA Instructions: Load the before and after links and check the performance tab in dev tools for when placeholders.json is downloaded. In the before link it is before LCP, in the after link it is after.
Test URLs: