-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
[HOLD for payment 2024-11-29] [$375] Card - Android - when user goes back to amount step in the flow the cursor is at the beginning instead of the end of the amount #52029
Comments
Triggered auto assignment to @muttmuure ( |
Should the value be cleared when we select another assignee? It was not something that was required in the docs. cc @mountiny |
ProposalPlease re-state the problem that we are trying to solve in this issue.Card - Android - "Set a limit" amount selected for previous user is displayed What is the root cause of that problem?We're not clearing the the limit when selecting assignee App/src/pages/workspace/expensifyCard/issueNew/AssigneeStep.tsx Lines 43 to 56 in b1bffa6
What changes do you think we should make in order to solve the problem?We need to reset the limit value by adding App/src/pages/workspace/expensifyCard/issueNew/AssigneeStep.tsx Lines 43 to 45 in b1bffa6
We can't pass limit: undefined because Onyx will not apply the undefined value to the limit propertyAnd for null value the type of limit is number or undefined because it's optional, so when pass null value it will throw an error unless we add the null type to the limit property
const submit = (assignee: ListItem) => {
const data: Partial<IssueNewCardData> = issueNewCard?.data.assigneeEmail === assignee.login ? {
assigneeEmail: assignee?.login ?? '',
} : {
assigneeEmail: assignee?.login ?? '',
limit: 0
};
if (isEditing && issueNewCard?.data?.cardTitle === Card.getCardDefaultName(PersonalDetailsUtils.getUserNameByEmail(issueNewCard?.data?.assigneeEmail, 'firstName'))) {
// If the card title is the default card title, update it with the new assignee's name
data.cardTitle = Card.getCardDefaultName(PersonalDetailsUtils.getUserNameByEmail(assignee?.login ?? '', 'firstName'));
}
Card.setIssueNewCardStepAndData({
step: isEditing ? CONST.EXPENSIFY_CARD.STEP.CONFIRMATION : CONST.EXPENSIFY_CARD.STEP.CARD_TYPE,
data,
isEditing: false,
});
}; And inside the limit input we should fallback the default value to undefined if the limit value is 0 so it start with empty value
defaultValue={CurrencyUtils.convertToFrontendAmountAsString(issueNewCard?.data?.limit || undefined, CONST.CURRENCY.USD, false)} What alternative solutions did you explore? (Optional) |
Triggered auto assignment to @shawnborton ( |
Good questions, I feel like we do not want to reset it, think that you want to go over the step back and to select different value in the previous step and then you continue to the amount again - I would want to keep the amount I already inserted. @shawnborton do you agree with that expected results, hence close this issue? |
Yeah, I agree with your analysis Vit - I don't think we need to reset the limit in this stepped flow personally, I think it makes sense to keep it here. cc @Expensify/design just for visibility but I think they might agree? |
I'm fine with not resetting the value, but isn't the bug that the cursor appears at the front of the amount instead of at the end? I guess it's really not that big of deal. Happy to go with whatever you all think is best! |
Agree with not reseting it, but would also love to fix what Danny's mentioning to put the cursor at the end of the number input. |
Job added to Upwork: https://www.upwork.com/jobs/~021854516214587143362 |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @mananjadhav ( |
Agreed, updated the title and steps and we can await proposals. Thanks everyone for chiming in! |
Still going through the issue and proposal. |
@shawnborton, @mananjadhav, @mountiny, @muttmuure Whoops! This issue is 2 days overdue. Let's get this updated quick! |
Looks ready to merge except for potentially a review by @shawnborton |
All good with me! |
♻️ Status update: PR was merged and deployed to staging yesterday and is now awaiting deploy to production! |
|
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.65-5 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 2024-11-29. 🎊 For reference, here are some details about the assignees on this issue:
|
@mananjadhav / @ikevin127 @muttmuure @mananjadhav / @ikevin127 The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button] |
cc @muttmuure for visibility |
BugZero Checklist:
Bug classificationSource of bug:
Where bug was reported:
Who reported the bug:
Regression Test Proposal
Do we agree 👍 or 👎. |
@shawnborton, @mananjadhav, @mountiny, @muttmuure, @ikevin127 Uh oh! This issue is overdue by 2 days. Don't forget to update your issues! |
@ikevin127 - $375 C (Paid) |
Raised my request on NewDot. |
Not overdue, this can be set to |
$375 approved for @mananjadhav |
If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!
Version Number: 9.0.57-3
Reproducible in staging?: Y
Reproducible in production?: Y
Issue reported by: Applause Internal Team
Action Performed:
Expected Result:
We should always add the cursor to the end of the amount input field
Actual Result:
When going back to the amount field, we put the cursor to the start of the amount which is bad UX
Workaround:
Unknown
Platforms:
Screenshots/Videos
Bug6655220_1730794710561.Screenrecorder-2024-11-05-13-32-37-9_compress_1.mp4
View all open jobs on GitHub
Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @muttmuureThe text was updated successfully, but these errors were encountered: