-
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
[$1000] Web - A non-stoping spinner is displayed when opening an image previewer carousal with a deep link #23899
Comments
Triggered auto assignment to @flaviadefaria ( |
Bug0 Triage Checklist (Main S/O)
|
ProposalPlease re-state the problem that we are trying to solve in this issue.Web - A non-stoping spinner is displayed when opening an image previewer carousal with a deep link What is the root cause of that problem?When users login successfully, we're showing the AttachmentView because the report isn't loaded at that time, and we don't listen the report change. App/src/components/AttachmentModal.js Lines 331 to 337 in 024d210
In App/src/pages/home/report/ReportAttachments.js Lines 28 to 38 in 024d210
We don't pass isAuthTokenRequired so isAuthTokenRequired is false by default, but the report attachment must have isAuthTokenRequired is true to add encryptedAuthToken => We can't load the image What changes do you think we should make in order to solve the problem?In App/src/pages/home/report/ReportAttachments.js Lines 28 to 38 in 024d210
we should enable isAuthTokenRequired because it comes from report. What alternative solutions did you explore? (Optional)If we don't want to enable isAuthTokenRequired in ReportAttachments because of some reasons, we should hide the attachment modal if we can't load the image ResultScreen.Recording.2023-07-31.at.15.39.18.mp4 |
Job added to Upwork: https://www.upwork.com/jobs/~01e0613ad8be2f9b94 |
Current assignee @flaviadefaria is eligible for the External assigner, not assigning anyone new. |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @allroundexperts ( |
ProposalPlease re-state the problem that we are trying to solve in this issue.We want the image preview to show when an attachment is opened with a deep link What is the root cause of that problem?I have a similar RCA as @tienifr but the solution is different. The issue here is that when we open the report attachment via Deeplink the report is empty here and because of this we show the What changes do you think we should make in order to solve the problem?I think we should not directly pass The proper way I think would be to listen for report changes in When we listen to the report changes and when the report loads, we will be displaying // just some pseudocode for <ReportAttachments/>
// pass report from onyx
<AttachmentModal
allowDownload
defaultOpen
report={props.report}
// subscribe to report onyx key
withOnyx({
report: {
key: ({route}) => `${ONYXKEYS.COLLECTION.REPORT}${getReportID(route)}`,
},
}), Now with the above changes, we are updating the attachment modal when the report is loaded via deep link. Since we are using deep link, its obvious that report actions are also not loaded (this is valid if we logout, then visit deeplink, then login and when deeplink is processed -- basically the reproduction steps in OP). We need them to be loaded since we use them in createInitialState.js which is used in This can be done by listening for report action onyx changes in
I added the What alternative solutions did you explore? (Optional)N/A |
listening for report actions onyx changes in is not the good idea, since it's not just used in ReportAttachment. And in AttachmentCarousel we're already listening report actions. In small screen we don't call api openReport when access attachment preview from deeplink that why if we wait for the actions to be loaded, it can cause the infinity loading. I believe showing the only one attachment preview when access from deeplink is good in this case (users just need to access this attachment and other attachments are not loaded) |
@huzaifa-99 I'm inclined towards your solution since I think we should display carousel instead of a single attachment. That being said, I'm not fully convinced about using |
Thanks for the feedback guys.
Thank you for raising the concern @tienifr, you are right we dont call openReport in small screens but in small large screens we do. To not call openReport on small screens was (i believe) a kind of optimization to prevent unnecessary api calls and only call openReport when we are on the report screen. Under this assumption we were also assuming The issue here is deep link:
I originally proposed these
suggestions to listen for report actions changes in AttachmentModal because of 2 reasons
but this recently (~20 hrs ago) got fixed in this commit
here, which would not load the AttachmentCarousel and instead load the AttachmentView with loader until both report and report actions are loaded -- but again this is some subjective loading stuff which we can decide on where to show, its not a requirement to do Now I propose an additional change to my original proposal
Yes, sure. I will put up videos for all platforms here in a short while and ping you again @allroundexperts |
These are the test videos @allroundexperts DesktopDesktop.Native.mp4Web ChromeWeb.Chrome.mp4Web SafariWeb.Safari.mp4mWeb ChromemWeb.Chrome.mp4mWeb SafarimWeb.Safari.mp4Deep links for android and ios native seem to not work even on
IOSIOS.mp4I think this is a separate bug. Thoughts @allroundexperts |
@huzaifa-99's proposal looks good to me. I agree that we should keep on showing a carousel once an attachment is opened via deep link. 🎀 👀 🎀 C+ reviewed On a side note, @huzaifa-99 you have to clear the app from memory before opening the deep link in native. Otherwise, it won't work. |
Triggered auto assignment to @robertjchen, see https://stackoverflow.com/c/expensify/questions/7972 for more details. |
Thanks for the review @allroundexperts. Will wait for the assignment to start the PR |
Thanks for the discussion here- having read the above, I agree that @huzaifa-99 's updated proposal would be best! |
📣 @allroundexperts Please request via NewDot manual requests for the Reviewer role ($1000) |
📣 @huzaifa-99 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app! Offer link |
📣 @Natnael-Guchima 🎉 An offer has been automatically sent to your Upwork account for the Reporter role 🎉 Thanks for contributing to the Expensify app! |
Held still |
Still holding on #27168 it looks like? |
I think... commented there cuz it was laggin a bit |
holding on results of #27168 |
Still holding. |
#27168 is closed. Can we proceed here? |
Off hold, added the Are you able to reproduce @s77rt? |
Yes, still reproducible Screen.Recording.2024-03-18.at.5.59.31.PM.mov |
Thanks @s77rt , do you think the bug exists elsewhere? ie. from other types of links that are copy/pasted? With it being an edge case, if we're going to fix it, I'd love for the fix to help other instances, if they exist. |
@mallenexpensify Yes, I think this probably affects other links such as links to profile avatars, links to distance receipts, etc. (any image that is displayed in a modal) |
Comment on the PR
@huzaifa-99 , if you're able to continue with this, can you test other instance like @s77rt mentioned above to see if we can fix more than just this single bug with the PR? Thx. |
Added to #vip-vsb |
Issue not reproducible during KI retests. (First week) |
If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!
Action Performed:
Expected Result:
Picture should finish loading & should be displayed
Actual Result:
Spinner keeps spinning without stop
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Version Number: 1.3.47.3
Reproducible in staging?: y
Reproducible in production?: y
If this was caught during regression testing, add the test name, ID and link from TestRail:
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Notes/Photos/Videos: Any additional supporting documentation
Screencast.from.2023-07-29.14-09-00.mp4
Recording.4018.mp4
Expensify/Expensify Issue URL:
Issue reported by: @Natnael-Guchima
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1690629431697969
View all open jobs on GitHub
Upwork Automation - Do Not Edit
The text was updated successfully, but these errors were encountered: