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
[$500] Distance - Amount is not clickable on Distance final confirmation screen #29477
📣 @RadoslavLazarov! 📣
Hey, it seems we don’t have your contributor details yet! You'll only have to do this once, and this is how we'll hire you on Upwork.
Please follow these steps:
Get the email address used to login to your Expensify account. If you don't already have an Expensify account, create one here. If you have multiple accounts (e.g. one for testing), please use your main account email.
Get the link to your Upwork profile. It's necessary because we only pay via Upwork. You can access it by logging in, and then clicking on your name. It'll look like this. If you don't already have an account, sign up for one here.
Copy the format below and paste it in a comment on this issue. Replace the placeholder text with your actual details.
Format:
Contributor details
Your Expensify account email: <REPLACE EMAIL HERE>
Upwork Profile Link: <REPLACE LINK HERE>
Please re-state the problem that we are trying to solve in this issue.
Distance - Amount is not disabled when it is non-interactive on distance confirmation page.
What is the root cause of that problem?
We are not disabling MenuItemWithTopDescription for amount when it is a distance request but we are properly handling it to show/hide right arrow icon.
What changes do you think we should make in order to solve the problem?
Option 1
We can just add props.isDistanceRequest in disabled prop and it will solve the issue and if we don't want to grey out the distance item then we can also pass false to prop shouldGreyOutWhenDisabled.
Option 2
If we don't want the disabled cursor then we can just add propinteractive={!props.isDistanceRequest} or we can remove the disabled prop & just add propinteractive={!props.isReadOnly && !props.isDistanceRequest}.
We are checking if isDistanceRequest we will return
Note: Before we disable amount field on distance request. But this PR #26141 allow to edit amount field on distance request. But It seems the author forget to remove this condition
What changes do you think we should make in order to solve the problem?
Remove this condition to check isDistanceRequest in
@rushatgabhane, I don't think that at the time we allow modifying the distance amount. That PR was focused on editing the distance waypoints not amount input.
@rushatgabhane@AndrewGable, I think we should change the hover style like we do for shared to details, and it also changes its styles when clicked. That is the bug here I think.
Activity
melvin-bot commentedon Oct 12, 2023
Triggered auto assignment to @kevinksullivan (
Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.melvin-bot commentedon Oct 12, 2023
Bug0 Triage Checklist (Main S/O)
Platformsin OP are ✅)RadoslavLazarov commentedon Oct 12, 2023
Proposal
Please re-state the problem that we are trying to solve in this issue.
Distance - Amount is not clickable on Distance final confirmation screen
What is the root cause of that problem?
Click event on button depends on isDistanceRequest state. Currently click event is disabled if it is distance request.
What changes do you think we should make in order to solve the problem?
In MoneyRequestConfirmationList.js component on amount field:
we can remove !props.isDistanceRequest statement from onPress event.
What alternative solutions did you explore? (Optional)
Screen.Recording.2023-10-12.at.23.18.35.mov
melvin-bot commentedon Oct 12, 2023
📣 @RadoslavLazarov! 📣
Hey, it seems we don’t have your contributor details yet! You'll only have to do this once, and this is how we'll hire you on Upwork.
Please follow these steps:
Format:
RadoslavLazarov commentedon Oct 12, 2023
Contributor details
Your Expensify account email: radoslav.lazarov93@gmail.com
Upwork Profile Link: https://www.upwork.com/freelancers/~01a581051aa546efa9
melvin-bot commentedon Oct 12, 2023
✅ Contributor details stored successfully. Thank you for contributing to Expensify!
Krishna2323 commentedon Oct 12, 2023
Proposal
Please re-state the problem that we are trying to solve in this issue.
Distance - Amount is not disabled when it is non-interactive on distance confirmation page.
What is the root cause of that problem?
We are not disabling MenuItemWithTopDescription for amount when it is a distance request but we are properly handling it to show/hide right arrow icon.
App/src/components/MoneyRequestConfirmationList.js
Lines 420 to 428 in 5c13816
What changes do you think we should make in order to solve the problem?
Option 1
We can just add props.isDistanceRequest in disabled prop and it will solve the issue and if we don't want to grey out the distance item then we can also pass false to prop shouldGreyOutWhenDisabled.
Option 2
If we don't want the disabled cursor then we can just add prop
interactive={!props.isDistanceRequest}or we can remove the disabled prop & just add propinteractive={!props.isReadOnly && !props.isDistanceRequest}.Natnael-Guchima commentedon Oct 12, 2023
Proposal
Please re-state the problem that we are trying to solve in this issue.
Amount option is not clickable even though the button doesn't seem to be disabled
What is the root cause of that problem?
We are returning when props.isDistanceRequest is true here
App/src/components/MoneyRequestConfirmationList.js
Lines 565 to 568 in a2f483d
And we are not disabling 'Amount' button here
App/src/components/MoneyRequestConfirmationList.js
Line 577 in a2f483d
Since the button is not disabled the user gets a sense that the field is clickable even if clicking the field doesn't do anything.
What changes do you think we should make in order to solve the problem?
We should disable the 'Amount' button when props.isDistanceRequest is true
What alternative solutions did you explore? (Optional)
N/A
DylanDylann commentedon Oct 13, 2023
Proposal
Please re-state the problem that we are trying to solve in this issue.
Amount is not clickable on Distance final confirmation screen
What is the root cause of that problem?
App/src/components/MoneyRequestConfirmationList.js
Lines 572 to 574 in 148f5b1
We are checking if isDistanceRequest we will return
Note: Before we disable amount field on distance request. But this PR #26141 allow to edit amount field on distance request. But It seems the author forget to remove this condition
What changes do you think we should make in order to solve the problem?
Remove this condition to check isDistanceRequest in
App/src/components/MoneyRequestConfirmationList.js
Line 572 in 148f5b1
and
App/src/components/MoneyRequestConfirmationList.js
Line 567 in 148f5b1
What alternative solutions did you explore? (Optional)
melvin-bot commentedon Oct 16, 2023
@kevinksullivan Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!
1 remaining item
melvin-bot commentedon Oct 17, 2023
Job added to Upwork: https://www.upwork.com/jobs/~017eb3167dc35c1a36
melvin-bot commentedon Oct 17, 2023
Triggered auto assignment to Contributor-plus team member for initial proposal review - @rushatgabhane (
External)kevinksullivan commentedon Oct 17, 2023
Sorry, I didn't realize this was missing proper labels. Moving forward.
kevinksullivan commentedon Oct 17, 2023
@rushatgabhane lmk what you think about the proposal above
rushatgabhane commentedon Oct 17, 2023
C+ reviewed 🎀 👀 🎀
I like @DylanDylann's proposal because they have clearly explained the root cause and provided a fix
#29477 (comment)
melvin-bot commentedon Oct 17, 2023
Triggered auto assignment to @AndrewGable, see https://stackoverflow.com/c/expensify/questions/7972 for more details.
Krishna2323 commentedon Oct 17, 2023
@rushatgabhane, I don't think that at the time we allow modifying the distance amount. That PR was focused on editing the distance waypoints not amount input.
rushatgabhane commentedon Oct 17, 2023
Thanks @Krishna2323! Asked about it on slack https://expensify.slack.com/archives/C01GTK53T8Q/p1697575566549679
rushatgabhane commentedon Oct 17, 2023
Based on @neil-marcellini's comment on 🧵 , we should close this issue!
Krishna2323 commentedon Oct 17, 2023
@rushatgabhane @AndrewGable, I think we should change the hover style like we do for shared to details, and it also changes its styles when clicked. That is the bug here I think.
Monosnap.screencast.2023-10-18.03-06-15.mp4