-
Notifications
You must be signed in to change notification settings - Fork 223
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
New backend section to handle the Automatic Lazy Rendering exclusions #6987
Comments
Discussed with @piotrbak: this would be released as a hotfix, so not including other changes already on develop. To take into account for branch management. |
Where is it supposed to be in the backend ? |
From what I understand, there will be a new dedicated section: https://github.com/wp-media/rucss-backend/issues/140 |
GroomingAdd new method here:
Then we need to get those exclusions and use them inside each processor class (Currently we will start with the Dom processor class only) In Dom class, exactly here: Add the following lines:
and exactly here:
Loop on the exclusions list if found and use the pattern like the one here: wp-rocket/inc/Engine/Optimization/DeferJS/DeferJS.php Lines 265 to 292 in b16aa79
to be used in preg_match and bailout if no match. When setting processor, exactly here: wp-rocket/inc/Engine/Optimization/LazyRenderContent/Frontend/Processor/Processor.php Line 21 in 4b9193b
We can apply a new filter like:
Then below the Dom instantiation line, we can call:
Then we need to add a callback for that new filter to get the exclusions from the dynamic list, we can do that here:
Then create this new method:
Effort:S to M including tests time. |
Looks good to me |
Then, do not hesitate to move it to "Todo" @Miraeld ;) |
Co-authored-by: Gael Robin <[email protected]>
Co-authored-by: Gael Robin <[email protected]>
Is your feature request related to a problem? Please describe.
We have some different issues related to the layout problems with Automatic Lazy Rendering:
#6959
Describe the solution you'd like
We'd like to be able to define HTML elements which will not receive hashes during the process (exclude from the feature). It'd allow us to exclude elements before the real fix is applied.
It should work with regex.
Another approach
Prevent from adding
data-wpr-lazyrender
attribute to the elementsAdditional context
We should have a new backend section to handle it
The text was updated successfully, but these errors were encountered: