-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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] Handle errors on manual requests #22725
Conversation
Deploying with
|
Latest commit: |
8d099a4
|
Status: | ✅ Deploy successful! |
Preview URL: | https://300c7fe7.helpdot.pages.dev |
Branch Preview URL: | https://neil-request-errors.helpdot.pages.dev |
I'm going to put this up for review now, and then come back tomorrow to fix the unit tests. |
@allroundexperts 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] |
@allroundexperts I think it will be pretty hard for you to test without being able to make a change on the backend so I'm going to remove you as a reviewer. |
Reviewer Checklist
Screenshots/VideosMobile Web - Safari |
Can you please complete the testing on all platforms? You've checked off all the checkboxes for testing them and there are no notes or explanations about why the tests were not performed. Here were some bugs I found while testing.
|
That is the explanation for why I only tested on web. I guess it would a good idea to test on all platforms because some of this might behave differently on native due to styling, and because it's not a super simple flow. |
Thanks for the thorough review @tgolen! I addressed some of your feedback but I haven't started on the bugs. I think this PR is in a bit of a weird place and I would like to chat about the overall plan more in Slack another day. For example I've seen it suggested that the RBR should direct to the lowest level context item (the individual request), vs the top level (workspace chat) as I have implemented now. Also, I would think that a failed money request should be shown on an existing expense report when there is one, but that's not the case. There are many more considerations and I would like to come up with a better plan to fix all of it. |
I agree with you that this would be great to have more discussion about it. I think that the intentions were good for the current requirements, but when you actually try them out and see the UX, it becomes very clunky and difficult to navigate and recover from. I'll be on the lookout for that discussion to help out in whatever way I can! |
@neil-marcellini what do you think about either closing this, putting it into draft state, or putting HOLD in the title? |
@neil-marcellini what do you think about my previous suggestion?
|
Oh yeah good point. I put it on HOLD (for planning) and marked it as a draft. After I get a chance to do a little pre-design I will either pick it back up or close it, depending on how different the chosen solution is. |
Super old and I'm not coming back to this lol 😢 |
Details
Hello reviewer, thanks for taking a look. Here we are handling errors when creating a money request fails early on the backend. Manual requests can't really fail on the backend, but distance requests created while offline certainly can. This PR fixes the error handling in anticipation of that and is easier to test.
The most important change is to add some additional failure data when opening a failed money request report. Since that report doesn't exist we remove it and all data related to it. We also display an error message, and the same clean up runs when that message is dismissed.
Fixed Issues
$ #22126
PROPOSAL: N/A
Tests
Set up
Make all manual money requests fail by throwing at the top of this function. Add this line.
Test request and expense report creation failure t1
Test request and expense report creation failure t2
Test only request creation failure
Offline tests
QA Steps
No QA since there's no easy way to make the backend error. Later we will QA failure cases for distance requests.
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)myBool && <MyComponent />
.src/languages/*
files and using the translation methodWaiting for Copy
label for a copy review on the original GH to get the correct copy.STYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)/** comment above it */
this
properly so there are no scoping issues (i.e. foronClick={this.submit}
the methodthis.submit
should be bound tothis
in the constructor)this
are necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);
ifthis.submit
is never passed to a component event handler likeonClick
)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)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
I only tested on web because the changes are platform independent.
Web
web1080.mov
Mobile Web - Chrome
Mobile Web - Safari
Desktop
iOS
Android