-
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
[HOLD for payment 2023-03-01] [$1000] Allow avatar image uploads: gif
on Android
#14751
Comments
Triggered auto assignment to @anmurali ( |
Bug0 Triage Checklist (Main S/O)
|
gif
to upload on Android and bmp
on iOSgif
to upload on Android and bmp
on iOS
Job added to Upwork: https://www.upwork.com/jobs/~012d6d474213ddb534 |
Current assignee @anmurali is eligible for the External assigner, not assigning anyone new. |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @mananjadhav ( |
Current assignee @Beamanator is eligible for the External assigner, not assigning anyone new. |
gif
to upload on Android and bmp
on iOSgif
on Android and bmp
on iOS
ProposalThe two mentioned issues have different root causes. RCAThe The FixI have raised a PR for each issue. |
I have updated my proposal above to handle both issues. |
Proposal (Android GIF issue) Modifying the upstream package with an additional dependency that decodes the entire GIF just to extract the first frame is not necessary. The existing decoder has an option built in that will capture the first frame as soon as it's available. It is easy to implement, and saves memory that would be allocated to decoding and performing transformations on the entire animation. It can be accomplished by a simple change (in our existing react-native-image-manipulator fork): diff --git a/android/src/main/java/com/reactnativeimagemanipulator/RNImageManipulatorModule.java b/android/src/main/java/com/reactnativeimagemanipulator/RNImageManipulatorModule.java
index 4b8ed8a..b404fa7 100644
--- a/android/src/main/java/com/reactnativeimagemanipulator/RNImageManipulatorModule.java
+++ b/android/src/main/java/com/reactnativeimagemanipulator/RNImageManipulatorModule.java
@@ -23,6 +23,7 @@ import com.facebook.react.bridge.ReactMethod;
import com.facebook.react.bridge.ReadableArray;
import com.facebook.react.bridge.ReadableMap;
import com.facebook.react.bridge.WritableMap;
+import com.facebook.imagepipeline.common.ImageDecodeOptions;
import java.io.ByteArrayOutputStream;
import java.io.File;
@@ -53,6 +54,10 @@ public class RNImageManipulatorModule extends ReactContextBaseJavaModule {
ImageRequestBuilder
.newBuilderWithSource(Uri.parse(uriString))
.setRotationOptions(RotationOptions.autoRotate())
+ .setImageDecodeOptions(
+ ImageDecodeOptions.newBuilder()
+ .setForceStaticImage(true)
+ .build())
.build();
final DataSource<CloseableReference<CloseableImage>> dataSource
= Fresco.getImagePipeline().fetchDecodedImage(imageRequest, getReactApplicationContext()); |
gif
on Androidgif
on Android
|
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.2.75-0 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue: If no regressions arise, payment will be issued on 2023-03-01. 🎊 After the hold period is over and BZ checklist items are completed, please complete any of the applicable payments for this issue, and check them off once done.
As a reminder, here are the bonuses/penalties that should be applied for any External issue:
|
This comment was marked as off-topic.
This comment was marked as off-topic.
BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:
|
@Beamanator @trjExpensify @redstar504 I think we're good to use the QA steps in the PR for the regression test proposal? |
@mananjadhav Yes, I will paste them here for reference:
|
Thanks @redstar504. Quick bump @Beamanator @trjExpensify |
Those test steps look great! I'd say one thing to change is: don't mention the particular environment that the tests will be run in please 🙏 |
@Beamanator Good catch. Edited. |
Do we want to test this specific file format on Android-only with every regression test? I.e why not across all platforms? Also, we don't have any file type specifics for avatar uploads in our regression suite atm, should we couple this with the most common? I.e JPEG, PNG, GIF, SVG? @Beamanator reference being somewhat similar to this "other" regression test case for attachment uploads. |
@trjExpensify Ooh good points! I think it's fair to make sure all of those types work across all platforms to prevent any bugs leaking through 👍 |
Okay, so I think we add GIF, PNG and SVG to this test case under a new sub-header: GIF, SVG and PNG
Let me know if you agree, and I'll create the GH. |
The test looks good.
I don't have access to the Testrail but do we have this limit specified somewhere? @trjExpensify @Beamanator This is ready for payout today but I have a questions. While the review was done within the timelines (it had 2 PRs), it was merged a week later. Will the timeline bonus be affected with this? |
thanks for posting the testcase. |
Hey @mananjadhav, the bonus won't apply on this issue because the review wasn't completed until 4 days later. I see you approved the PR on the 16th, but the checklist wasn't completed until the 17th. Those two actions should come together for a review to be deemed complete. I've gone ahead and settled up the contracts. I'll create the regression test issue for Applause now and close this issue out. Thanks everyone! |
Regression test here: https://github.com/Expensify/Expensify/issues/265438 |
Thanks for confirmation @trjExpensify , but I had some questions on how we calculate timeline, so I've raised a question in the slack thread here. |
@trjExpensify Can you please create the regression test issue or I can create one, please let me know. video_21.mp4 |
@trjExpensify Correct, steps are added in TR. QA team is having issue to update GIF file in avatar on Android device. "Save" button is not responding. Do you want me to create a separate GH issue? |
Yep, please create a bug report for that 👍 |
@trjExpensify Logged separate issue #18088 |
Thanks! |
Action Performed:
.gif
as avatar image on AndroidExpected Result:
It should upload and convert to
.jpeg
(the conversion can happen on the front end if needed, but we already have conversion code on the backend that works for every type of image in web)Actual Result:
Note: Some investigation was done here, indicating this may be a problem with a library we use,
RNImageManipulator
Upwork Automation - Do Not Edit
The text was updated successfully, but these errors were encountered: