-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
[Discussion] Add the ability to handle images in Onyx #3867
Comments
Triggered auto assignment to @greg-schroeder ( |
Sorry but this looks like a huge task to do. Maybe we did not mean to do so. Can anybody confirm what exactly is need to be built? I expect that we need to expand AsyncStorage in a wrapper so that it supports a method like Moreover, a little bit about our plan to approach this which is finalized as a way to go. e.g. |
@parasharrajat Yup this is a huge task, but basically is going to be summed up with what needs to happen from this slack tread happening now. I updated the solution a bit but I imagine that it will keep updating until we figure out what the most viable solution for this will be |
Posted to https://www.upwork.com/jobs/~011fcd226e59956a18 I'm going to add a new Contributor Manager, I'm out of office next week. They can update the price if needed (sounds like @parasharrajat might want for $250 though ) |
Triggered auto assignment to @SofiedeVreese ( |
@mallenexpensify 🎃. Maybe I will find a solution that takes lesser effort. |
@mallenexpensify I have applied on upwork by the name "Aditya Batra" on your JD. |
Hey @aditya27dev can you a proposal with the technical explanation of the changes you will make in this GH here? thanks! |
Hi @SofiedeVreese Sorry I can't share technical changes here publicly which is a inappropriate way of doing a job. But I can work on this task, if you hire me. |
Hey @aditya27dev per our contributing guidelines, we do require contributors to make a proposal for their solution and post it as a comment in the corresponding GitHub issue. The solution proposal should include a brief technical explanation of the changes proposed. We don't hire if the contributing guidelines aren't being followed. |
Throwing a new title on this since discussion is still ongoing in the slack thread, to view or participate check it out here |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
One thing I forgot to bring up Should we include a migration that tries to move any existing Onyx values in localStorage to IndexedDB before the app starts (along the rest of the migrations)? ios and android aren't going to be affected since they continue to use the same medium - AsyncStorage |
I guess yes, we should add that. |
Yeah, I agree, let's try to migrate everything if we can. |
Alright, I'm working on it |
PR was approved but we forgot to remove the HOLD label: #4908 (comment) |
PR (1) #4908 is merged It deals with the issue of prematurely deleting persisted request (and the files to be uploaded) After #6556 we'll be able to remove the comment here and set App/src/libs/actions/Report.js Lines 1170 to 1173 in c224cfe
|
Still waiting on #6556 |
Found 2 problems around persisted attachments No loading animation/previewYou can see it on most of the videos on the PR #7520 (see web or mobile web)
Problem:The optimistic action that serves as a placeholder during the upload is removed App/src/libs/actions/Report.js Lines 451 to 457 in 425e718
SolutionI think we should try to cross reference optimistic actions with requests in the network queue This way when we clean up optimistic actions we keep the ones that still have pending requestWe already put App/src/libs/actions/Report.js Lines 1169 to 1175 in 425e718
We can make a lib or expose a function that return any pending 2. We're only persisting a request if we're offline
Lines 185 to 206 in 425e718
Problem:If we quit the app while an upload is still pending it will neither be upload or persisted Recent changes alleviate this to some extent - when a request is persisted to storage it will only be removed after it's successfully performed - it'll be retried until eventually succeeding SolutionRequests with the `persist` flag should be persisted regardless of being offline or not If the user quits the app while the request isn't completed existing logic would retry it on next launch Otherwise added logic would remove it from persistent storage when it succeedsThe following Lines 229 to 230 in 425e718
becomes if (queuedRequest.data.persist) {
NetworkRequestQueue.saveRetryableRequests([queuedRequest]);
}
processRequest(queuedRequest)
.then(response => {
onResponse(queuedRequest, response);
NetworkRequestQueue.removeRetryableRequest(queuedRequest);
}) |
We should be live with this already and can close this right? @kidroca |
@thienlnam I think we have the bare minimum if that's enough I guess we can close I've pointed out 2 problems using the feature the way it is right now |
👍 Will keep this open until we resolve those issues |
Can someone confirm the proposed solutions are the way to go here? Should we have a ticket(s) about these so we know they exist as problems? - to prevent duplicate reports of the same |
I'll create separate tickets for them for more visibility and then we can discuss the proposed solutions in those tickets |
This comment was marked as outdated.
This comment was marked as outdated.
If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results. If a production regression has occurred a Root Cause Analysis is required. Please follow the instructions here. If a regression has occurred and you are the assigned CM follow the instructions here. If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future. |
If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!
Problem
Right now, we have no way of saving images offline. We can't use Onyx as it has storage limitations on web with a 5MB limit. There's been a lot of discussion on how to handle this in this issue and in this slack thread.
Why is this important?
This is important to be able to handle offline functionality of images
Solution
Create an offline storage solution for Onyx so that even when the application is offline and closed, the attached images will persist and continue to upload
Expensify/Expensify Issue URL:
https://github.com/Expensify/Expensify/issues/169197
cc @thienlnam
View all open jobs on Upwork
The text was updated successfully, but these errors were encountered: