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

fix: iOS still miscrops images #1886

Merged
merged 2 commits into from
Feb 8, 2025

Conversation

Soxasora
Copy link
Member

@Soxasora Soxasora commented Feb 7, 2025

Description

Fixes #1793

The earlier fix (#1840) ruled that images need to be decoded before being rendered. We found out that decoding wasn't the issue but rather about Safari that has problems with calculating sizes when it comes to display: flex and in this case it happens specifically with onlyImages text components.

This fix leverages #1593 to apply flex rules only after images are loaded

Screenshots

Flex already applied
image

Flex applied after loading
image

CSS class applied correctly
immagine

Additional Context

Tested on prod via devtools (can't reproduce on dev env).
Funny that it all came down to my first PR.

Checklist

Are your changes backwards compatible? Please answer below:

On a scale of 1-10 how well and how have you QA'd this change and any features it might affect? Please answer below:

For frontend changes: Tested on mobile, light and dark mode? Please answer below:

Did you introduce any new environment variables? If so, call them out explicitly here:

@Soxasora Soxasora changed the title fix: iOS still miscrops the images fix: iOS still miscrops images Feb 7, 2025
@Soxasora Soxasora marked this pull request as ready for review February 8, 2025 07:37
@huumn huumn merged commit c01f486 into stackernews:master Feb 8, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Images on iOS are cropped weird
2 participants