-
Notifications
You must be signed in to change notification settings - Fork 151
Feature/pdp fetch priority #1122
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
Conversation
|
Hi! I'm VTEX IO CI/CD Bot and I'll be helping you to publish your app! 🤖 Please select which version do you want to release:
And then you just need to merge your PR when you are ready! There is no need to create a release commit/tag.
|
|
vmourac-vtex
left a comment
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.
This PR seems to be based on the same branch as of #1120.
If this was not done for a specific reason, I would ask to make them independent of each other in case we need to rollback any specific deploy
|
I would also request that you:
|
Hi @vmourac-vtex i have update workspace and CHANGELOG.md |
|
@gabridevs it seems you missed some some of the requests in earlier messages. We could also improve on the way you handled the
|
| alt={alt} | ||
| title={alt} | ||
| loading={index === 0 ? 'eager' : 'lazy'} | ||
| {...((index === 0 ? { fetchpriority: 'high' } : {}) as any)} |
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.
| {...((index === 0 ? { fetchpriority: 'high' } : {}) as any)} | |
| fetchpriority={index === 0 ? 'high' : 'auto'} |
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.
hi @vmourac-vtex , I close this PR as we have developed a custom component in our store.
Thank you for the support!
What problem is this solving?
This change improves page performance by ensuring the main product image is prioritized during loading. By setting the fetchpriority: 'high' for the first product image, we ensure that the most important image (usually the first one) is loaded first, enhancing user experience, especially for pages with multiple images.
How to test it?
You can test this change by visiting the following workspace where the branch is linked. Check the loading behavior of the first product image, ensuring it is loaded before others when opening a product page.
[Workspace](Link goes here!)
Screenshots or example usage:
Describe alternatives you've considered, if any.
No alternatives considered as fetchpriority: 'high' is a straightforward and effective solution for this problem.