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 }}
Repository navigation
[HOLD for payment 2022-01-11] IOU - Cursor is set to pointer in IOU preview - Reported by: @Tushu17 #6693
Here is the problem: There is a styles.iouPreviewBox at line 106 this style consist cursor as pointer, So it shows pointer cursor either `props.onPreviewPressed' passed or not.
Solution1:This is simple solution.
We have to set cursor style to default if props.onPreviewPressed not passed. So we have to change line 106 within IOUPreview.js as under.
Also add cursorDefault style within styles.js as under:
cursorDefault: {
cursor: 'default',
},
Solution 2:This is slightly complex solution.
We can conditionally render TouchableWithoutFeedback component as shown under. i.e. If props.onPreviewPressed passed then we will wrap TouchableWithoutFeedback component, otherwise not.
So implementation will be as under. i.e. Prepare Wrapper and replace <TouchableWithoutFeedback onPress={props.onPreviewPressed}> with <Wrapper onPress={props.onPreviewPressed}>
// Add this wrapperconstWrapper=({children, onPress})=>{if(onPress){return(<TouchableWithoutFeedbackonPress={onPress}>{children}</TouchableWithoutFeedback>);}returnchildren;};// Old code <TouchableWithoutFeedbackonPress={props.onPreviewPressed}><Viewstyle={styles.iouPreviewBox}>
....
</View></TouchableWithoutFeedback>// Use this wrapper<WrapperonPress={props.onPreviewPressed}><Viewstyle={[styles.iouPreviewBox,!_.isFunction(props.onPreviewPressed)&&styles.cursorDefault]}>
...
</View></Wrapper>
Also add cursorDefault style within styles.js as under:
cursorDefault: {
cursor: 'default',
},
Below is the screen record with this implementation, it gives same result either we use solution1 or solution2
changed the title [-]IOU - Cursor is set to pointer in IOU preview - Reported by: @Tushu[/-][+]IOU - Cursor is set to pointer in IOU preview - Reported by: @Tushu17[/+]on Dec 14, 2021
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.1.24-8 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
changed the title [-]IOU - Cursor is set to pointer in IOU preview - Reported by: @Tushu17[/-][+][HOLD for payment 2022-01-11] IOU - Cursor is set to pointer in IOU preview - Reported by: @Tushu17[/+]on Jan 4, 2022
Activity
MelvinBot commentedon Dec 10, 2021
Triggered auto assignment to @kadiealexander (
AutoAssignerTriage), see https://stackoverflow.com/c/expensify/questions/4749 for more details.MelvinBot commentedon Dec 10, 2021
Triggered auto assignment to @danieldoglas (
Engineering), see https://stackoverflow.com/c/expensify/questions/4319 for more details.PrashantMangukiya commentedon Dec 10, 2021
Proposed Solution: (If considered as external)
Here is the problem: There is a
styles.iouPreviewBoxat line 106 this style consist cursor as pointer, So it shows pointer cursor either `props.onPreviewPressed' passed or not.App/src/components/ReportActionItem/IOUPreview.js
Lines 105 to 109 in c86847d
Solution1: This is simple solution.
We have to set cursor style to default if
props.onPreviewPressednot passed. So we have to change line 106 within IOUPreview.js as under.Also add
cursorDefaultstyle within styles.js as under:Solution 2: This is slightly complex solution.
We can conditionally render
TouchableWithoutFeedbackcomponent as shown under. i.e. Ifprops.onPreviewPressedpassed then we will wrapTouchableWithoutFeedbackcomponent, otherwise not.So implementation will be as under. i.e. Prepare
Wrapperand replace<TouchableWithoutFeedback onPress={props.onPreviewPressed}>with<Wrapper onPress={props.onPreviewPressed}>Also add
cursorDefaultstyle within styles.js as under:Below is the screen record with this implementation, it gives same result either we use solution1 or solution2
ScreenRecording6693.mov
[-]IOU - Cursor is set to pointer in IOU preview - Reported by: @Tushu[/-][+]IOU - Cursor is set to pointer in IOU preview - Reported by: @Tushu17[/+]parasharrajat commentedon Dec 15, 2021
Does not hurt in my opinion.
31 remaining items
mallenexpensify commentedon Dec 29, 2021
PR is on staging, should hit production soon...
botify commentedon Jan 4, 2022
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.1.24-8 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 2022-01-11. 🎊
[-]IOU - Cursor is set to pointer in IOU preview - Reported by: @Tushu17[/-][+][HOLD for payment 2022-01-11] IOU - Cursor is set to pointer in IOU preview - Reported by: @Tushu17[/+]mallenexpensify commentedon Jan 12, 2022
Paid @Tushu17 for reporting and @PrashantMangukiya for the fix
@parasharrajat can you apply here for C+ https://www.upwork.com/jobs/~0122afc050e1e1d5fd
parasharrajat commentedon Jan 13, 2022
@mallenexpensify

Ping for
mallenexpensify commentedon Jan 13, 2022
Hired you @parasharrajat , let me know when you've accepted offer
parasharrajat commentedon Jan 13, 2022
@mallenexpensify Accepted it.
mallenexpensify commentedon Jan 13, 2022
Can you double check @parasharrajat ? I'm not seeing the normal option to pay
mallenexpensify commentedon Jan 13, 2022
Paid @parasharrajat in Upwork (I think/hope). There was a glitch where I wasn't able to access the payment screen.