Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

fix(common): apply fixed_srcset_width value only to fixed srcsets#52459

Closed
atcastle wants to merge 1 commit intoangular:mainangular/angular:mainfrom
atcastle:fix-srcset-size-limitatcastle/angular:fix-srcset-size-limitCopy head branch name to clipboard
Closed

fix(common): apply fixed_srcset_width value only to fixed srcsets#52459
atcastle wants to merge 1 commit intoangular:mainangular/angular:mainfrom
atcastle:fix-srcset-size-limitatcastle/angular:fix-srcset-size-limitCopy head branch name to clipboard

Conversation

@atcastle
Copy link
Contributor

This fixes a bug in NgOptimizedImage where the FIXED_SRCSET_WIDTH_LIMIT was being applied to both "fixed" and "responsive" srcsets. As the constant name indicates, this is only supposed to apply to fixed images. For responsive images, not generating the srcset in this case is an antipattern, as it prevents the automatic srcset from correctly suggesting a smaller version of the image.

New tests included to prevent regression. CC: @AndrewKushnir @kara

add logic to NgOptimizedImage to keep fixed_srcset_width from applying to large responsive images, which is incorrect behavior
@pullapprove pullapprove bot requested a review from jessicajaniuk October 30, 2023 21:43
@jessicajaniuk jessicajaniuk requested review from AndrewKushnir and removed request for jessicajaniuk October 30, 2023 22:08
@AndrewKushnir AndrewKushnir added action: review The PR is still awaiting reviews from at least one requested reviewer area: common Issues related to APIs in the @angular/common package target: rc This PR is targeted for the next release-candidate common: image directive labels Oct 30, 2023
@ngbot ngbot bot modified the milestone: Backlog Oct 30, 2023
@AndrewKushnir AndrewKushnir requested a review from kara October 30, 2023 22:13
Copy link
Contributor

@kara kara left a comment

Choose a reason for hiding this comment

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

LGTM

@AndrewKushnir
Copy link
Contributor

Presubmit.

@AndrewKushnir AndrewKushnir added action: presubmit The PR is in need of a google3 presubmit 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: review The PR is still awaiting reviews from at least one requested reviewer action: presubmit The PR is in need of a google3 presubmit labels Oct 30, 2023
@AndrewKushnir
Copy link
Contributor

Caretaker note: the presubmit is "green" (only unrelated failures), this PR is ready for merge.

@alxhub
Copy link
Member

alxhub commented Oct 31, 2023

This PR was merged into the repository by commit f86fb8e.

@alxhub alxhub closed this in f86fb8e Oct 31, 2023
alxhub pushed a commit that referenced this pull request Oct 31, 2023
…2459)

add logic to NgOptimizedImage to keep fixed_srcset_width from applying to large responsive images, which is incorrect behavior

PR Close #52459
@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 Dec 1, 2023
ChellappanRajan pushed a commit to ChellappanRajan/angular that referenced this pull request Jan 23, 2024
…gular#52459)

add logic to NgOptimizedImage to keep fixed_srcset_width from applying to large responsive images, which is incorrect behavior

PR Close angular#52459
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 merge: caretaker note Alert the caretaker performing the merge to check the PR for an out of normal action needed or note target: rc This PR is targeted for the next release-candidate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.