-
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
Not all errors are outlined in the VBA flow #4785
Comments
I have some time and can grab this. |
At the moment there is a growl that shows a single message. When there are multiple messages what is it supposed to say? |
Maybe if there is more than one error the growl could change to a generic message like: 'There are errors in the form' |
Thanks @aldo-expensify I hashed this out with @kevinksullivan 1:1 and forgot to update here. We are going to get rid of the growls since they don't add anything that is not achieved by the inline error message + confirm modal. |
makes sense! 👍 |
@kevinksullivan, this issue is made somewhat complicated by the fact that some of these errors are also coming from the server and they aren't translated at all (which we should probably fix). I'm not sure if we want to prioritize those or not. But shouldn't be too bad to come up with a solution. |
Another question about this... Presently, since there is only one error we only need to worry about clearing a single error when that field is "touched" (a.k.a. value is changed). Now that we will show multiple errors - what should we do when just one of them is "touched"? I'm not sure if the original intention when we added the inline errors was to have them clear on touch or not (but we did that). So, what should we do here? Clear only the error on the touched field? Clear all errors when one field is touched? |
The issue#4730 came back to life and there is a comment requesting the same changes that this issue is addressing: #4730 (comment) IMH, that issue#4730 which is a DeployBlockerCash shouldn't include those changes because it is not a regression. I understand that the app was showing the error one by one before. |
Ah yes, good eye @aldo-expensify thanks! I agree not a deploy blocker since we know this behavior should not work yet. |
Alright, chatted 1:1 with @jasperhuangg who did the 1.0 version of this for moving error messages from growls to inline and he pointed out that the growl component was originally left in so that users who have scrolled past an error would be able to see it. That makes sense to me, but I think we can solve this problem by just prompting with a confirm modal when there's an error - and also do this anywhere we were doing a Growl. We also talked about the server errors which are getting thrown and consumed directly by the front end - which reminds me that we should probably also pop open the "confirm" modal when those get thrown. Ultimately, whatever strategy we settle on for form error handling we should try to use everywhere. It feels like we're still figuring that out on the design side, but this should give us some lessons to lean on. Also chatted a bit about whether it would be a good time to look into a form library and decided that we can wait for now as there are probably a lot of opinions on how it should work + well want to develop (or use) something that works for our design, Onyx architecture, etc. At the same time, we don't want to leave too many inconsistent patterns around or else we'll be reinventing the wheel each time we create a new form - but given the urgency of N6 seems like an acceptable trade-off. So, I think this issue can be broken into a few steps: Web-Secure changes
New Expensify
Follow Up:
Alternative idea:
|
Looks good @marcaaron! Just want to confirm to be 100% that this issue will capture these changes:
|
Yep, that's the plan! |
Thought I'd get this done in time but turned out to be a fairly complex issue + requires a careful refactor. I'm getting called in to do allocations so I'm going to unassign myself for now - although I'd like to manage this issue from a distance if it gets picked up before I'm done. I'll update the previous post with the breakdown of how we should handle server errors. But we discussed the Web-Secure error handling a bit in this Slack thread: https://expensify.slack.com/archives/C03TQ48KC/p1629840632329800 |
Hey @marcaaron , I would be interested in continuing with this task. Just one thing to clarify: when the request hits the back end, we will still send a single error, we won't try to change this to return multiple errors from the backend. |
Does this mean we wouldn't be able to highlight more than one field? That'd be great if you could grab this @aldo-expensify ! thanks a million |
There are some validations that are done in the front and some in the back (after the request is sent). I understand we will show together the errors of all failed validations done in the front, but for validations done in the back, we would still be getting one at a time. Is this correct? I'm assuming that from the back we will still get one at a time because we have to maintain compatibility with the error handling of Web-Expensify front, right? |
Yes, because the back end can only return a single error and not multiple errors. |
I'm dropping this so someone with more experience can get it done quicker! |
I'm interested in picking this up, but I'm busy with figuring out my schedule with school, allocations, and a few ongoing PRs. If things clear up in a few days I'll get to work on this! |
Sounds good @jasperhuangg! Let us know when you can. |
Perhaps we can split these issues out:
@marcaaron I assume is a quick fix that we can get done, whereas 2 is what makes this more challenging. Is that correct? |
The "challenging" part is that we have 3 different feedback mechanisms for handling errors and errors being set in random places with a very inconsistent pattern + probably more errors in the back end that are not handled at all. We should clean that stuff up regardless of how this work is split up. This issue feels complicated because we keep pivoting. We didn't plan out the error handling UI initially then decided it should be different... then we decided it should be different again... Maybe we can take a step back and think about the various errors that can be thrown by the API or validated in the front end and then map out how they should be presented to the user what happens to them when the user interacts with a field, etc. That will help inform the technical design so we don't have to keep hacking changes in... While that happens, here's a rough idea on how we could re-prioritize this... PR 1: PR 2: PR 3: |
Yeah, this is a great call. We really didn't discuss error handling during the HL phase, and in hindsight that would've helped avoid a lot of this.
I believe there will always be inline errors, since even if a certain API check fails we will point the user to correcting information relevant to said check. So PR 1 feels the most like a blocker, since we're throwing a lot of errors at once currently. PR 2 and PR 3 will really clean up what we threw together over the recent days, which is necessary. With that said I think we should consider those fast followers to N6, and make sure we spend the time needed to get them right. Would you agree @marcaaron ? |
@marcaaron, @aldo-expensify Whoops! This issue is 2 days overdue. Let's get this updated quick! |
On |
Yes i updated it. Once its off n6-hold feel free to bring it back to daily if needed. |
Should we remove the hold on this one since it's part of polishing n6? |
@aldo-expensify any update on this one? |
I just updated the PR with the main branch resolving a bunch of conflicts. I would like your opinion on this before continuing further 😬 |
PR ready for review for all errors outlined together in steps:
|
@aldo-expensify just checking here, is this done? |
This PR covering the "Personal information" and "Additional information" (Beneficial owners) step was just merged. @marcaaron will address some final details in a new PR. Details: After that, I think we should be done about "Showing all errors together" in all VBA steps. |
I think we're done here this is on production now. There are some smaller issues getting wrapped up but the VBA flow errors should be 👌 |
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:
Every field that has an error should have an error message and red outline associated with it. This is supposed to occur in addition to the generic modal that will instruct users to look for the highlighted issues (PR) (CC @chiragsalian)
Actual Result:
Only the final incorrect entry is outlined with an error messages, and other fields that either failed a check or are in the incorrect format are not outlined at all.
Platform:
Notes/Photos/Videos:
(note that not all fields are not filled out in this video, but that is being fixed by #4748)
129963638-5cbcbc94-e725-47c2-a15b-cab3d9aefd6f.mov
@MitchExpensify should we take this internal to get it done quickly?
The text was updated successfully, but these errors were encountered: