fix: no jumpy input in amount filter#53695
Conversation
dbe6e87 to
0f475b6
Compare
|
Hey! I see that you made changes to our Form component. Make sure to update the docs in FORMS.md accordingly. Cheers! |
c9a2ae6 to
7049525
Compare
|
All yours @brunovjk 🙌 |
|
BUG: When we type a letter, a dot Screen.Recording.2025-01-20.at.15.01.03.movCan you reproduce @kirillzyusko? Thanks. |
It happens because all symbols (except numeric values) are considered as a float separator (and thus they are replaced with |
|
Good question, thanks @kirillzyusko. I believe that in general it would be interesting to explore solutions to this issue, but I say this without knowing how complex it might be. What do you think @luacmartins? |
|
Can we just skip adding anything when we type letters? I think we should only allow 0-9., as input |
39ad7e7 to
f888cd9
Compare
@brunovjk @luacmartins Fixed in f888cd9 Would you mind to do another round of review? |
|
Sure :D Thanks for the update, I'll review it later today. |
|
@kirillzyusko, I can still reproduce it: Screen.Recording.2025-01-22.at.13.20.15.movWhat about you? After your changes it shouldn't be possible to use letters, strange. |
|
@brunovjk did you reinstall deps? I updated a library, so you have to re-install node_modules/pods |
Yes, I did. I will do it again. :D |
Very strange 😬 Did you re-assemble app after that? I was definitely testing all three platforms and everything was working fine - alphabetical input was simply ignored 🤔 |
I was probably doing something wrong, I cleaned everything again and it worked like a charm. |
|
It’s looking good!! Great work, @kirillzyusko! 🎉 I’ll need a bit more time to review the changes in-depth and test other areas of the app that might be impacted. Would it be possible to add some unit tests? @luacmartins, do you think we should assign QA to test this later? Thanks in advance! 🙌 Screenshots/VideosAndroid: Native53695_android_native.movAndroid: mWeb Chrome53695_android_web.moviOS: Native53695_ios_native.moviOS: mWeb Safari53695_ios_web.movMacOS: Chrome / Safari53695_web_chrome.movMacOS: Desktop53695_web_desktop.mov |
| task.assigneeAccountID, | ||
| task.assigneeChatReport, | ||
| ); | ||
| createTaskAndNavigate(task?.parentReportID ?? '-1', values.taskTitle, values.taskDescription ?? '', task?.assignee ?? '', task.assigneeAccountID, task.assigneeChatReport); |
There was a problem hiding this comment.
One thing that I can not resolve without breaking changes 😔 Any help is appreciated 🙏
There was a problem hiding this comment.
I believe we can just remove the fallbacks here since they are all strings. Have you tried that?
There was a problem hiding this comment.
@brunovjk We can't, because createTaskAndNavigate expects parentReportID as string. And we can not make it optional, because subsequent arguments are mandatory. We also can't specify default it, because it's number and we expect a string 🤔
Yeah, I would love to add them. But the problem here is that we moved all logic from JS to a native component. So js unit-tests can be only snapshot tests (and I don't know whether it makes sense to have such tests)? |
|
@kirillzyusko, I found a bug, I think, I haven't gone deep into the changes yet. But it's not "saving": Android: Native - mainmain.movAndroid: Native - our PRPR_53695.mov |
|
Thank you @kirillzyusko. I'm working on another PR now, I will get back here later today 🚀 |
|
I see your point, it makes sense, thanks. What do you think @luacmartins? |
|
Agreed! Let's keep the changes self-contained for now and if no regressions are detected we move on to updating the other amount inputs |
|
Great! @kirillzyusko can you resolve the conflicts? I'll do a quick review and let you know luacmartins |
Resolved! 😎 |
|
Can we fix these errors @kirillzyusko? Let me know of anything. |
|
@brunovjk it fails because of this:
And honestly I don't have any ideas how to fix this problem (without breaking changes or re-working a lot of code) 🤷♂️ Can we skip this error? |
Very good, let me do some tests here and let you know in a moment. |
|
@luacmartins I tested everything again and it looks good. Can you help us with these errors? Thank you very much. |
|
@brunovjk I think we can ignore the ESLint checks since they are unrelated to this PR. Same for the HybridApp build, because it fails with Could you complete the reviewer checklist though? |
|
oops, my bad, I thought I had already done it. I'll do it now. |
Reviewer Checklist
Screenshots/VideosAndroid: Native53695_android_native.movAndroid: mWeb Chrome53695_android_web.moviOS: Native53695_ios_native.moviOS: mWeb Safari53695_ios_web.movMacOS: Chrome / Safari53695_web_chrome.movMacOS: Desktop53695_web_desktop.mov |
Done @luacmartins :D sorry about that. |
|
Gonna merge with the failing ESLint and HybridApp build failing. See comment here |
|
@luacmartins looks like this was merged without a test passing. Please add a note explaining why this was done and remove the |
|
🚀 Deployed to staging by https://github.com/luacmartins in version: 9.0.94-0 🚀
|
|
🚀 Deployed to production by https://github.com/AndrewGable in version: 9.0.94-25 🚀
|
|
🚀 Deployed to production by https://github.com/AndrewGable in version: 9.0.94-25 🚀
|
Explanation of Change
Added
react-native-advanced-input-maskthat based on "mask" concept (instead of imperative formatting) and performs formatting in a native thread, so as a result it's flicker/jumpy-free, brings native performance, doesn't produce delays and other unpleasant UI issues 😊Staring from now
TextInputcan be implemented via 3 implementations:react-native;react-native-live-markdown;react-native-advanced-input-maskSo to manage which implementation from listed above should be used I added a new property
typethat switches between implementations.Fixed Issues
$ #47875
PROPOSAL: #47875 (comment)
Tests
Offline tests
N/A
QA Steps
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
Screen.Recording.2025-01-20.at.14.52.55.mov
Android: mWeb Chrome
iOS: Native
Simulator.Screen.Recording.-.iPhone.15.Pro.-.2025-01-20.at.14.54.38.mp4
iOS: mWeb Safari
MacOS: Chrome / Safari
Screen.Recording.2025-01-20.at.15.32.07.mov
MacOS: Desktop