-
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
IOU - The backspace button on the keypad only deletes one digit at a time, not the entire number #25540
Comments
Triggered auto assignment to @garrettmknight ( |
Bug0 Triage Checklist (Main S/O)
|
ProposalPlease re-state the problem that we are trying to solve in this issue.When users interact with the IOU feature, specifically within the "request money" or "split bill" sections, holding down the backspace button on the keypad does not consistently clear the entire amount. Instead, it only deletes a single digit. What is the root cause of that problem?Upon refactoring the BigNumberPad component from a class component to a functional component, the expected behavior of the backspace button was altered. The distinct behaviors between class and function components in React played a pivotal role:
What changes do you think we should make in order to solve the problem?To ensure that holding down the backspace button continuously deletes digits until the entire amount is cleared, I propose the following:
By implementing these changes, the backspace button's hold-down functionality will consistently and continuously delete digits, aligning with user expectations. const numberPressedRef = useRef(props.numberPressed);
useEffect(() => {
numberPressedRef.current = numberPressed;
}, [numberPressed]);
const handleLongPress = (key) => {
if (key !== '<') {
return;
}
props.longPressHandlerStateChanged(true);
const newTimer = setInterval(() => {
numberPressedRef.current(key);
}, 100);
setTimer(newTimer);
}; Result:backspace.mp4What alternative solutions did you explore? (Optional)N/A |
The bug is also occuring in iOS / native |
While this behavior might have changed, it's consistent across all platforms that I tested and I don't think it's necessarily unintended. Feel free to find more consensus on whether this is a bug, but I'm going to close for now. |
@garrettmknight Although the behavior may be consistent across all platforms, holding the backspace key works smoothly on the web but not on mweb, Android, and iOS. To ensure a better user experience, holding the backspace key should be handled more efficiently on these platforms. |
@rayane-djouah what is your idea on this. |
@garrettmknight
Given the above points and the solution I've proposed, I believe it's in our best interest to address this issue promptly. It's not merely about fixing a bug; it's about enhancing the user experience and ensuring that our application is as user-friendly and intuitive as possible. If necessary, we can open a discussion in Slack to delve deeper into this matter. Thank you for considering this, and I look forward to further discussions. |
@garrettmknight @jo-ui I've asked in slack https://expensify.slack.com/archives/C01GTK53T8Q/p1692730609975499 |
If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!
Action Performed:
Expected Result:
Holding the backspace button should clear the whole text not one digit only
Actual Result:
Holding backspace deletes only one digit
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Version Number: 1.3.55-7
Reproducible in staging?: Yes
Reproducible in production?: Yes
If this was caught during regression testing, add the test name, ID and link from TestRail:
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Notes/Photos/Videos: Any additional supporting documentation
20230810_112618.mp4
0-02-01-d4ddc746cc2da94e93bc686208bb75e460fcb6c698e25a2bddc18165774a6b5c_670f83f42bdbbdde.1.mp4
Expensify/Expensify Issue URL:
Issue reported by: @jo-ui
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1691655815906349
View all open jobs on GitHub
The text was updated successfully, but these errors were encountered: