-
-
Notifications
You must be signed in to change notification settings - Fork 80
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
feat: add sources to improve LCP + add loading and fetchpriority attributes #260
Conversation
Thanks you for the contribution. I need some time to review all changes. 👍 |
@Ks89 for the second problem, if you mean about the loading never hide is because the image is lazy loaded and the figure container of current-image.component has display: none while loading. So the browser never download image because it isn't on screen. we could fix changing to opacity: 0|1 to hide img while loading |
@Ks89 I've updated the pull request, let me know if it solves the problems. |
Thank you for the update, now it seems to be ok. |
Missing things:
I tested your changes and it seems to be backward compatible without issues. I could be released as 11.1.0. However, we need to update also the documentation website HERE at least with the new APIs and an example for carousel and modal. |
@Ks89 All done. here my pull request for the docs page: Ks89/angular-modal-gallery-2023-v11.github.io#1 |
@Ks89 any updates? |
this is ready to merge applying the max-width: 100% fix. About the doc website, we need to apply changes based on my comments. However I didn't find enough spare time to do that. Next week, I will merge everything applying changes on top of your commits. If you want to help and speed up the process, you can also update your PR with that changes. |
With this pull request, I've added loading and fetchpriority attributes to img elements. they are both configurable, but I set defaults to 'lazy' and 'auto'.
I also added the property sources to ModalImage interface letting users set source tags in picture elements at desired media breakpoints (for improving LCP).
Last I removed id="current-image" from img cause if I use two carousels on the same page I will receive "id must be unique" error from the console.
All my changes should be safe to merge without any breaking changes, but I suggest you to check carefully 😅.