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

feat(common): upgrade warning to logged error for lazy-loaded LCP images #52004

Closed
wants to merge 1 commit into from

Conversation

atcastle
Copy link
Contributor

@atcastle atcastle commented Oct 3, 2023

This PR upgrades the existing warning when an NgOptimizedImage is discovered to be the LCP element and not given the priority attribute to an error. Not using priority causes the LCP image to be lazy-loaded and can significantly hurt image performance. This error is only logged in dev.

This PR is a pared-back version of #51748. As this error is logged, not thrown, it is no longer a breaking change and does not require the functionality to turn the error off in testbed scenarios. CC: @AndrewKushnir

…ges using NgOptimizedImage

Upgrade the existing warning so it now logs an error instead, when an LCP element is determined to not be usings the `priority` attribute. Error is logged, not thrown.
@angular-robot angular-robot bot added the detected: feature PR contains a feature commit label Oct 3, 2023
Copy link
Contributor

@AndrewKushnir AndrewKushnir left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@atcastle thanks Alex!

@AndrewKushnir AndrewKushnir added target: major This PR is targeted for the next major release action: global presubmit The PR is in need of a google3 global presubmit area: common Issues related to APIs in the @angular/common package common: image directive labels Oct 3, 2023
@ngbot ngbot bot modified the milestone: Backlog Oct 3, 2023
@AndrewKushnir
Copy link
Contributor

TGP.

@AndrewKushnir
Copy link
Contributor

FYI, TGP is "green".

@AndrewKushnir AndrewKushnir added action: merge The PR is ready for merge by the caretaker merge: caretaker note Alert the caretaker performing the merge to check the PR for an out of normal action needed or note and removed action: global presubmit The PR is in need of a google3 global presubmit labels Oct 4, 2023
@AndrewKushnir
Copy link
Contributor

Caretaker note: TGP is "green", this PR is ready for merge.

@alxhub
Copy link
Member

alxhub commented Oct 4, 2023

This PR was merged into the repository by commit dde3fda.

@alxhub alxhub closed this in dde3fda Oct 4, 2023
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Nov 4, 2023
ChellappanRajan pushed a commit to ChellappanRajan/angular that referenced this pull request Jan 23, 2024
…ges using NgOptimizedImage (angular#52004)

Upgrade the existing warning so it now logs an error instead, when an LCP element is determined to not be usings the `priority` attribute. Error is logged, not thrown.

PR Close angular#52004
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
action: merge The PR is ready for merge by the caretaker area: common Issues related to APIs in the @angular/common package common: image directive detected: feature PR contains a feature commit merge: caretaker note Alert the caretaker performing the merge to check the PR for an out of normal action needed or note target: major This PR is targeted for the next major release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants