-
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: TimePicker – support replacement & removal by full selection #33344
fix: TimePicker – support replacement & removal by full selection #33344
Conversation
@s77rt I've run into the same issue we once tried to battle with the mentions: on Android and iOS, there is a difference in the order of calling Therefore, handling the full-value replacement with This should be fixed after we move to Fabric: facebook/react-native#36930 (comment) For now, I would suggest not implementing the paste-replacement, only the removal (which is in the context of the issue). We've tried a ton of workarounds in the original issue, but had no major luck: |
Can you check the money request flow? The amount supports the selection replacement. That may be helpful if we can follow the same approach |
Money request flow doesn't use the more complicated approach of replacing the symbols in place (we have only 2 digits in the Time Picker, and the value should be handled according to the position of the cursor). |
I'll try one different approach in the meantime 🤔 |
@s77rt all yours. Also, just a note: that the |
This is working much better than main but we may need to refactor the component. We are still unable to type 22 in the hours input. Do you know why we are having 3 numbers in each input instead of just 2? Screen.Recording.2023-12-24.at.1.16.51.PM.mov |
@s77rt 22 is not allowed because the AM/PM format supports only numbers 0-12 |
Regarding the 3 numbers — it is just how the input works. We input the number and cut out the remaining digit. |
Yes but I expected to get it converted to 10pm same as 19 is converted to 7pm |
It will be converted if you paste 22 as a full replacement |
@s77rt please test the updated Hours and Minutes logic (along with my comments above). This is the most user-friendly behavior I could come up with so far. Unfortunately, because of the edge cases, I could not use the simplified code you provided, but I did use some improvements from it. |
Bugs when pressing the delete key / the backspace key Bug 1:
Bug 2:
Screen.Recording.2023-12-27.at.8.25.36.PM.mov |
9ef7e6f
to
be0342f
Compare
Bug:
Screen.Recording.2023-12-29.at.3.24.35.PM.mov |
Fixed, thanks. |
Outdated tests: |
You can mark the remaining comments as resolved |
Reviewer Checklist
Screenshots/VideosAndroid: Nativeandroid.movAndroid: mWeb Chromemweb-chrome.moviOS: Nativeios.moviOS: mWeb Safarimweb-safari.movMacOS: Chrome / Safariweb.movMacOS: Desktopdesktop.mov |
Done ✔️ |
Thanks! |
f225fe6
to
e4bffbf
Compare
@pecanoro done, thank you. Please re-check |
✋ 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/pecanoro in version: 1.4.21-0 🚀
|
🚀 Deployed to production by https://github.com/marcaaron in version: 1.4.21-4 🚀
|
1 similar comment
🚀 Deployed to production by https://github.com/marcaaron in version: 1.4.21-4 🚀
|
🚀 Deployed to production by https://github.com/marcaaron in version: 1.4.21-4 🚀
|
Details
Allow replacing and removing the TimePicker values when selecting both digits of either Hours or Minutes.
Fixed Issues
$ #33143
PROPOSAL: #33143 (comment)
Tests
Same as QA
Offline tests
Same as QA
QA Steps
00
00
0
or1
.2
to12
.02
...09
,10
,11
,12
13
to24
.pasted value - 12
, andam
switched topm
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)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)Design
label 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
android-compressed.mp4
Android: mWeb Chrome
chrome-compressed.mp4
iOS: Native
Simulator.Screen.Recording.-.iPhone.15.Pro.-.2023-12-20.at.20.51.52-compressed.mp4
iOS: mWeb Safari
Simulator.Screen.Recording.-.iPhone.15.Pro.-.2023-12-20.at.20.54.53-compressed.mp4
MacOS: Chrome / Safari
Screen.Recording.2023-12-20.at.12.59.03-compressed.mp4
MacOS: Desktop
Screen.Recording.2023-12-20.at.13.17.33-compressed.mp4