Skip to content
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

Add OptimizeViewport transformer #373

Merged
merged 10 commits into from
Oct 4, 2021
Merged

Conversation

ediamin
Copy link
Collaborator

@ediamin ediamin commented Oct 4, 2021

This PR adds a new transformer OptimizeViewport to adapt default viewport to reduce FID.

Closes #126

@ediamin
Copy link
Collaborator Author

ediamin commented Oct 4, 2021

FYI, I've followed the logic from ampproject/amp-wp for optimization.

src/Optimizer/Transformer/OptimizeViewport.php Outdated Show resolved Hide resolved
src/Optimizer/Transformer/OptimizeViewport.php Outdated Show resolved Hide resolved
src/Optimizer/Transformer/OptimizeViewport.php Outdated Show resolved Hide resolved
tests/Optimizer/Transformer/OptimizeViewportTest.php Outdated Show resolved Hide resolved
src/Optimizer/DefaultConfiguration.php Show resolved Hide resolved
src/Optimizer/Transformer/OptimizeViewport.php Outdated Show resolved Hide resolved
src/Optimizer/Transformer/OptimizeViewport.php Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
@schlessera schlessera added this to the 0.8.0 milestone Oct 4, 2021
@schlessera schlessera added the DOM label Oct 4, 2021
@schlessera schlessera merged commit aa11518 into main Oct 4, 2021
@schlessera schlessera deleted the add/126-viewport-optimizer branch October 4, 2021 09:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Adapt default viewport to reduce FID
2 participants