-
Notifications
You must be signed in to change notification settings - Fork 227
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/update default fetched links to 10 and parse unappended url to is home #6563
Conversation
Coverage summary from CodacySee diff coverage on Codacy
Coverage variation details
Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: Diff coverage details
Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: See your quality gate settings Change summary preferencesYou may notice some variations in coverage metrics with the latest Coverage engine update. For more details, visit the documentation Footnotes
|
@@ -24,7 +26,7 @@ public function add_to_atf_queue( string $url ): array { | |||
|
|||
$config = [ | |||
'optimization_list' => '', | |||
'is_home' => Utils::is_home( $url ), | |||
'is_home' => $is_home, |
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.
Is this change necessary?
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.
Yes I believe it is, in reference to @hanna-meda comment here
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.
I'm failing to understand the difference it makes, it's the same code assigned to a variable?
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.
Yes but we are now preserving the original state of the url
param which was not the case before as we alter the state here first then we use it here which in the is_home
method here we will always return false even if it's the home page because it's now appended with a query string i.e example.org?wpr_imagedimensions=1
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.
ah yes right, I see now, all good
5d51e47
into
feature/lcp-above-the-fold-optimization
Description
Fetches 10 links from home plus home(11) and also fixes the is_home not detecting the homepage.
Fixes: Addresses @hanna-meda comment here and here
Documentation
User documentation
Explain how this code impacts users.
Technical documentation
wp-rocket/inc/Engine/Media/AboveTheFold/WarmUp/APIClient.php
Line 17 in 38775e5
We now save the original url before appending the query strings then reuse the version in
is_home
methodAlso we now filter out the home url from the links if it exists and append in the end just before returning the urls, reason for this is to always return the home url for templates that might not contain the home url.
Type of change
New dependencies
None
Risks
List possible performance & security issues or risks, and explain how they have been mitigated.
Checklists
Feature validation
Documentation
Code style
Observability
Risks