-
Notifications
You must be signed in to change notification settings - Fork 3k
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: check if image is rotated before cropping #40971
fix: check if image is rotated before cropping #40971
Conversation
@hayata-suenaga Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
Hello 👋 The reviewer checklist is not complete @staszekscp |
Hey @hayata-suenaga! At Software Mansion we do internal reviews before opening PRs 😄 I have given an approval, but I am not from the C+ team, and I'm not entitled to do the approval on behalf of Expensify |
Reviewer Checklist
Screenshots/VideosAndroid: NativeScreen.Recording.2024-05-07.at.3.05.22.AM.movAndroid: mWeb ChromeScreen.Recording.2024-05-07.at.3.04.29.AM.moviOS: NativeScreen.Recording.2024-05-07.at.3.00.06.AM.moviOS: mWeb SafariScreen.Recording.2024-05-07.at.2.59.25.AM.movMacOS: Chrome / SafariScreen.Recording.2024-05-07.at.2.55.36.AM.movMacOS: DesktopScreen.Recording.2024-05-07.at.2.57.21.AM.mov |
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.
LGTM!
🎯 @allroundexperts, thanks for reviewing and testing this PR! 🎉 An E/App issue has been created to issue payment here: #41705. |
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.
the code looks good to me 😄
the merge freeze was completely lifted yesterday 🎉 merging! |
🚀 Deployed to staging by https://github.com/hayata-suenaga in version: 1.4.77-11 🚀
|
🚀 Deployed to staging by https://github.com/hayata-suenaga in version: 1.4.77-11 🚀
|
🚀 Deployed to production by https://github.com/mountiny in version: 1.4.78-5 🚀
|
Details
There is a bug causing app to crash or wrongly cropping image when picture with
height > width
is selected. Videos below shows the problem.App crash:
app_crash.mov
Wrong part is selected:
wrong_part.mov
The problem applies only for Android Native app.
The problem is caused by ignoring
rotation
parameter fromImageSize.getSize
function. It occurs that when image hasheight
>width
thenreact-native-image-size
library may measure the rotated image. That's why it also checks the orientation and return it as part of the result. It also should be taken into account when setting shared values in our logic.Fixed Issues
$ N/A
PROPOSAL: N/A
Issue is coming from slack thread
Tests
Offline tests
N/A
QA Steps
Same as in Tests
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)myBool && <MyComponent />
.src/languages/*
files and using the translation methodSTYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)Design
label and/or tagged@Expensify/design
so the design team can review the changes.ScrollView
component to make it scrollable when more elements are added to the page.main
branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTest
steps.Screenshots/Videos
Android: Native
android_works.mov
Android: mWeb Chrome
N/A
iOS: Native
N/A
iOS: mWeb Safari
N/A
MacOS: Chrome / Safari
N/A
MacOS: Desktop
N/A