You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
[HOLD for payment 2021-12-27] Feature Request - IOU - Holding down the delete button should continually delete the amount - Reported by: @kakajann #6547
If you decide to make this one external I would like submit a proposal:
To implement the expected behaviour described in the first post on this issue, we can utilize the props onLongPress and onPressOut of the react native Pressable component.
onLongPress we would start the interval timer that would delete symbols one by one and onPressOut we would call clearInterval on it.
Here is a sample code:
First we'll need to pass the props for new event handlers from IOUAmountPage through BigNumberPad to Button component.
Then an actual implementation for the feature would look like this:
/** * TODO * * @param {String} key */handleLongPressNumberPad(key){// Backspace button is pressedif(key!=='<'){return;}consttimer=setInterval(()=>{this.setState(prevState=>({amount: prevState.amount.slice(0,-1),}));},100);this.setState({timer});}/** * TODO */clearDeletionTimer(){clearInterval(this.state.timer);}
Note that I am only checking for the < key and ignoring the actual keyboard Backspace since on the desktop the default sticky keys behaviour is already doing what we are looking for.
posted in our internal slack about how we'd prefer to do this: only allow holding backspace/delete or allow all buttons to repeat if you hold them down.
I'm thinking only delete probably makes most sense but wanted to get a gut check there first.
my thread didn't gain much traction but at least @marcochavezf chimed in and agreed only the backspace/delete button should be able to repeat via holding it down.
I think this is fine for a contributor to work on, I'm not super familiar with this code base but I would guess we already have some key event listeners which are blocking the repeat event, unless it's a react native thing (?), because at least on web the default behavior is that keydown events repeat.
said differently: I'm not privy enough with this code base to know if @dklymenk suggestion is the right way or not so another engineer who's more familiar should review instead of me.
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.1.21-1 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
changed the title [-]Feature Request - IOU - Holding down the delete button should continually delete the amount - Reported by: @kakajann [/-][+][HOLD for payment 2021-12-27] Feature Request - IOU - Holding down the delete button should continually delete the amount - Reported by: @kakajann [/+]on Dec 20, 2021
Activity
MelvinBot commentedon Nov 30, 2021
Triggered auto assignment to @jboniface (
AutoAssignerTriage), see https://stackoverflow.com/c/expensify/questions/4749 for more details.dklymenk commentedon Dec 1, 2021
If you decide to make this one external I would like submit a proposal:
To implement the expected behaviour described in the first post on this issue, we can utilize the props
onLongPressandonPressOutof the react native Pressable component.onLongPresswe would start the interval timer that would delete symbols one by one andonPressOutwe would callclearIntervalon it.Here is a sample code:
IOUAmountPagethroughBigNumberPadtoButtoncomponent.Details
Note that I am only checking for the
<key and ignoring the actual keyboardBackspacesince on the desktop the default sticky keys behaviour is already doing what we are looking for.Here is a sample video:
6547-demo.mp4
MelvinBot commentedon Dec 1, 2021
Triggered auto assignment to @bondydaa (
Engineering), see https://stackoverflow.com/c/expensify/questions/4319 for more details.bondydaa commentedon Dec 1, 2021
posted in our internal slack about how we'd prefer to do this: only allow holding backspace/delete or allow all buttons to repeat if you hold them down.
I'm thinking only delete probably makes most sense but wanted to get a gut check there first.
bondydaa commentedon Dec 2, 2021
my thread didn't gain much traction but at least @marcochavezf chimed in and agreed only the backspace/delete button should be able to repeat via holding it down.
I think this is fine for a contributor to work on, I'm not super familiar with this code base but I would guess we already have some key event listeners which are blocking the repeat event, unless it's a react native thing (?), because at least on web the default behavior is that keydown events repeat.
said differently: I'm not privy enough with this code base to know if @dklymenk suggestion is the right way or not so another engineer who's more familiar should review instead of me.
39 remaining items
Expensify#6547 move the logic to BigNumberPad
Expensify#6547 rewrite BigNumberPad as class component
Merge pull request #6626 from dklymenk/6547-hold-down-to-continiously…
bfitzexpensify commentedon Dec 16, 2021
In review
botify commentedon Dec 20, 2021
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.1.21-1 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
If no regressions arise, payment will be issued on 2021-12-27. 🎊
[-]Feature Request - IOU - Holding down the delete button should continually delete the amount - Reported by: @kakajann [/-][+][HOLD for payment 2021-12-27] Feature Request - IOU - Holding down the delete button should continually delete the amount - Reported by: @kakajann [/+]bfitzexpensify commentedon Dec 27, 2021
7 days since deployment. @dklymenk, paid you and ended the contract — thank you!
@kakajann, can you respond to the offer here? Once you do, I'll accept and pay out the reporting bonus.
Sheharyar566 commentedon Dec 27, 2021
By looking at the thread above, i'm guessing this job https://www.upwork.com/jobs/Reporting-IOU-Holding-down-the-delete-button-should-continually-delete-the-amount-6547_~011d115cee449bdc46/ is temporary 🤔
kakajann commentedon Dec 27, 2021
@bfitzexpensify Thanks, accepted