Changes to how validation displays in UI#4354
Changes to how validation displays in UI#4354thienlnam merged 1 commit intoExpensify:mainfrom rdjuric:changeValidationDisplay
Conversation
|
@Beamanator I made a few changes to the original proposal to make it easier for us to apply the enhancements of #2936.
I think this is better than the original proposal because:
|
|
I marked this as ready for review to get a bit of help 😅 This is working fine on Web/Desktop, but on mobile the The Weird that this only happens on Mobile. Do you have any idea why this might be happening? ios.mp4Just a note that this problem also happens if I try the original proposal. |
src/libs/OptionsListUtils.js
Outdated
There was a problem hiding this comment.
We should probably decouple the header message from the rendering of the SectionList. If needed, we can just add another prop that is along the lines of shouldShowSectionList
src/libs/OptionsListUtils.js
Outdated
There was a problem hiding this comment.
Doesn't seem like we need a whole method for this and can just use it below
src/components/OptionsList.js
Outdated
There was a problem hiding this comment.
Mentioned above I don't think we want to couple the headerMessage and rendering the SectionList but if so, you should shape the expected object instead of disabling the lint
|
@rdjuric Hmm I tried reproducing the error you saw on iOS and I wasn't getting any weird behavior like you 😅 Did you check the debugger logs? (Flipper or remote debugging with Chrome?) |
|
@Beamanator Yes, checked it and both Flipper and Chrome debugging shows nothing weird. They even show the Just to confirm the steps, using the last commit from this branch:
Did this happen in your tests @thienlnam? |
|
I run into the same thing, but isn't that just because you don't have any contacts with that number so there are no results? |
|
I think the main point of this specific issue is to make sure the "i couldn't validate the phone number" error doesn't just get displayed in the console for nobody to see. So either:
What do y'all think? |
|
@thienlnam If the number isn't in the contacts but is valid, we add them as a
This looks like a must-do as our regex lets numbers like +55 (just a country code) pass as valid. But I think this was an improvement to be made in #2936?
Hmm. I understand the point but I think that this is worst UX than not showing the result at all. |
|
Took me a while but I realized that we already filter results for invalid numbers here (see code), so conditionally rendering the App/src/libs/OptionsListUtils.js Lines 466 to 472 in d15beee I think all that is left is making sure that
by doing the equivalent test in our Here's a vid comparing the behavior on this PR and on Staging. I think this is what we're looking for in this issue? PRxStaging.mov |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
Hmm I do like your changes @rdjuric but I was also hoping we could avoid having this situation happen (sorry if it wasn't clear in the issue): Screen.Recording.2021-08-05.at.10.59.23.AM.mov |
|
A.k.a. if a user clicks the "new chat" but the phone number isn't 100% valid (a.k.a. our API returns an error) it would be best to show this error to the end user instead of just silently throw the console error and a normal user won't know what happened |
|
Ahh, I see @Beamanator! Thanks for the video. Do we want to show a |
|
NP! Ooh I think a |
|
🚀 Deployed to staging in version: 1.0.82-8🚀
|
|
🚀 Deployed to production by @francoisl in version: 1.0.83-1 🚀
|
Details
Fixed Issues
$ #2934
Tests
QA Steps
Tested On
Screenshots
Web
web.mov
Mobile Web
mWeb.mp4
Desktop
desktop.mov
iOS
iOS.mp4
Android
Android.mp4