-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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 : Android - Picture looks smaller in Preview page #7660
Conversation
Can we test on all platforms? Thanks! |
@ahmdshrif let's try to fix it for web too |
If the bug doesn't happen on |
the web and desktop bug is on |
Makes sense, then let's fix across all platforms 👍 |
ok, working on a web and desktop fix. |
I add zoom to be true as the default value on the web. Screen.Recording.2022-02-09.at.10.45.18.PM.mov |
As long as it doesn't cause a regression, that's fine. |
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.
@ahmdshrif all images on web are zoomed in by default. Let's fix that
@rushatgabhane I think that is what we expect. the small image does not fill the screen so we zoom it by default to take the screen width. or what do you mean |
@ahmdshrif an image that isn't small is zoomed by default. Screencast.from.10-02-22.12-44-29.AM.+03.1.mp4 |
ok get it will fix that , thanks |
I get this error when trying to run on the desktop is this my local issue or is this issue on the main.
|
@ahmdshrif desktop is working fine for me. |
it shoud be fix now @rushatgabhane |
src/components/ImageView/index.js
Outdated
@@ -22,7 +22,7 @@ class ImageView extends PureComponent { | |||
this.state = { | |||
containerHeight: 0, | |||
containerWidth: 0, | |||
isZoomed: false, | |||
isZoomed: true, |
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.
@ahmdshrif can we go with an alternative approach because it feels like a workaround, and it's buggy. Let's keep isZoomed be false
by default.
It's still buggy for normal images. What do you think of using imgTop, imgLeft, etc instead.
screencast-from-10-02-22-05-12-43-pm-03_GIc5JsAV.mp4
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.
it must not get zooming if it's small. Let me try to test with different image sizes. on my side.
I think imgTop, imgLeft, is more related to position when you move the image. but let me check this.
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.
@rushatgabhane can you share with me the image that have the issue because for me I try many image sizes and still work fine with me
Screen.Recording.2022-02-11.at.1.49.35.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.
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.
Cute puppy 😍
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.
@rushatgabhane ok thanks, I fix t it now
Screen.Recording.2022-02-11.at.2.09.24.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.
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.
@ahmdshrif two points for large images.
- The image is zoomed in only for the first time it's opened. (subsequent opens aren't zoomed but they have the flicker problem below)
- The image flickers from zoomed in to zoomed out state which is undesireable.
Also, small images are zoomed in by default, so we can't zoom them in further.
Let me know what you think
Screencast.from.11-02-22.03-27-34.AM.+03.mp4
ok, thanks for your feedback I will take some time thinking about a more stable way for the web. |
@rushatgabhane it's now stable and we can zoom the small image also. preview : Screen.Recording.2022-02-13.at.4.32.44.PM.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.
@ahmdshrif sorry, but requesting a really minor change.
Could you please add JSdoc for all the functions, thanks!
Co-authored-by: Andrew Gable <andrewgable@gmail.com>
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.
@AndrewGable all yours! LGTM
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
🚀 Deployed to staging by @AndrewGable in version: 1.1.42-0 🚀
|
@ahmdshrif @AndrewGable @rushatgabhane PR is failing on 1.1.42.3 build Screen_Recording_20220311-083833_New.Expensify.mp4 |
@kbecciv which platform it fails on it? |
@ahmdshrif It fails on Andriod app. |
ook, we can repro this issue with very small images only. #7591 (comment) |
@ahmdshrif wait what, I don't understand why this particular image isn't working while these are - #7591 (comment). The image width and height is correct too
|
I am still debugging this. I just mention we do not repro this because this edge case wasn't mentioned. for now, I just note this image has a large size, and android was crashed with this image. and we have a workaround to avoid this crash.
|
Cool. |
🚀 Deployed to production by @chiragsalian in version: 1.1.42-6 🚀
|
@rushatgabhane yes this case is so weird |
the update I have for now is this something related to android and how he resize the image android gets stuck with an image with this size(and aspect ratio) only but still works fine with other sizes. I think the solution will be to change most of the code on the |
@AndrewGable and @rushatgabhane - sorry to also ping you but we're at the 7 day payment timeframe. Is this new issue a regression that needs to be fixed before paying/closing this job? |
@Christinadobrzyn this issue isn't completely fixed, I've asked @ahmdshrif to fix it here - #7591 (comment) We'll create a follow up PR, after which the payment should be done. I hope this answers your question |
Details
Fixed Issues
$ #7591
Tests
QA Steps
1- Launch the app
2- Log in with any account
3- Tap on any user
4- Tap on plus button and add attachment
5- Tap on Select from Gallery
6- Attach any picture from Gallery
7- Tap Send
8- Tap on attachment again
Tested On
Screenshots
Web
Mobile Web
Desktop
iOS
Android