-
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
fix: pre-validate masked input #56462
fix: pre-validate masked input #56462
Conversation
Hey! I see that you made changes to our Form component. Make sure to update the docs in FORMS.md accordingly. Cheers! |
@brunovjk would you mind to test these changes? As a reference I took existing web input behavior and tried to match that on all platforms 👀 I also update |
This comment was marked as outdated.
This comment was marked as outdated.
Great work @kirillzyusko it's much better now, but I can't leave the field blank, without any digits: Screen.Recording.2025-02-06.at.10.39.42.mov |
Very good @kirillzyusko Android: Native56462_android_native.moviOS: Native56462_ios_native.movsorry for the inconvenience, but there is a detail that is bothering me, on the web (I was able to reproduce it with less reliability in native as well), when typing a letter, the "cursor" moves: Screen.Recording.2025-02-06.at.12.17.02.movWhat do you think? Thank you. |
What is the expected behavior? To move cursor to the end (as it is in current web implementation)? |
When typing letters, I believe nothing should happen. We can confirm with luacmartins |
I think on web it always go to the end in case if invalid character has been typed (i. e. including letters) 🤔 |
Great! I'll finish the tests and checklist later, but everything looks good so far. |
Reviewer Checklist
Screenshots/VideosAndroid: Native56462_android_native.movAndroid: mWeb Chrome56462_android_web.moviOS: Native56462_ios_native.moviOS: mWeb Safari56462_ios_web.movMacOS: Chrome / Safari56462_web_chrome.movMacOS: Desktop56462_web_desktop.mov |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Everything looks fine to me, please just pay attention to these comments comment_1 comment_2. @kirillzyusko could you please complete your checklist? Thanks a lot.
@kirillzyusko what's left to make this PR ready for review? |
@brunovjk I fixed a problem with moving cursor - now cursor will stay in the same position (on all platforms) if incorrect symbol has been types. @brunovjk @luacmartins this PR is ready for review now (I mean I completed checklist/uploaded videos) 👀 |
In native everything is very good now, it seems more solid to me, congratulations @kirillzyusko. However, in web I found a bug. Screen.Recording.2025-02-12.at.11.17.54.movCan you reproduce it? Thank you. |
@brunovjk I'll check! 👀 |
Just a small update - I found a problem. Will fix it today/tomorrow 🤞 |
@brunovjk may I ask you to test this PR again (I hope it will be the last time 😅)? |
Sorry, I missed your message. I'll review it today 🚀 🚀 🚀 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good to me 🚀 Thank you very much for your effort @kirillzyusko.
Screenshots/Videos
Android: Native
56462_android_native.mov
Android: mWeb Chrome
56462_android_web.mov
iOS: Native
56462_ios_native.mov
iOS: mWeb Safari
56462_ios_web.mov
MacOS: Chrome / Safari
56462_web_chrome.mov
MacOS: Desktop
56462_web_desktop.mov
All yours @luacmartins :D |
Thank you for careful reviewing 😊 ❤️ |
Verify HybridApp build is failing with:
NAB |
@luacmartins looks like this was merged without a test passing. Please add a note explaining why this was done and remove the |
See comment above |
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
🚀 Deployed to staging by https://github.com/luacmartins in version: 9.1.1-0 🚀
|
🚀 Deployed to production by https://github.com/francoisl in version: 9.1.1-6 🚀
|
Explanation of Change
Added regexp validation before applying a mask.
Fixed Issues
$ #56330
PROPOSAL: N/A
Tests
Offline tests
N/A
QA Steps
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)src/languages/*
files and using the translation methodSTYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)Design
label and/or tagged@Expensify/design
so the design team can review the changes.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
Android: Native
Screen.Recording.2025-02-12.at.10.47.07.mov
Android: mWeb Chrome
iOS: Native
Simulator.Screen.Recording.-.iPhone.15.Pro.-.2025-02-12.at.11.14.34.mp4
iOS: mWeb Safari
Simulator.Screen.Recording.-.iPhone.15.Pro.-.2025-02-12.at.10.58.00.mp4
MacOS: Chrome / Safari
masked-input-1.3-demo.mov
MacOS: Desktop
masked-input-1.3-demo.mov