-
Notifications
You must be signed in to change notification settings - Fork 3.2k
[Due for payment 2025-05-28] [$250] Android - When entering tax rate, digit overlap with percentage symbol #59607
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
Comments
Triggered auto assignment to @twisterdotcom ( |
Job added to Upwork: https://www.upwork.com/jobs/~021907928733770489004 |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @hungvu193 ( |
ProposalPlease re-state the problem that we are trying to solve in this issue.When entering tax rate, digit overlap with percentage symbol. What is the root cause of that problem?We are using App/src/components/AmountTextInput.tsx Line 63 in c91bf20
that means the input has the flexible width, and it will be updated in onLayout, so if users add numbers, the width is longer than the container and it can be updated only when onLayout is triggered What changes do you think we should make in order to solve the problem?We should add
We also can add What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?Style issue What alternative solutions did you explore? (Optional)NA Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job. ResultScreen.Recording.2025-04-04.at.11.44.36.mov |
|
I can handle internal review on this one when it's ready! |
🚨 Edited by proposal-police: This proposal was edited at 2025-04-06 04:51:03 UTC. ProposalPlease re-state the problem that we are trying to solve in this issue.Android - When entering tax rate, digit overlap with percentage symbol What is the root cause of that problem?After this PR #58380, we introduced the Lines 1325 to 1330 in 9168f58
What changes do you think we should make in order to solve the problem?We should update
getAutoGrowWidthInputContainerStyles: (
width: number,
extraSpace: number,
position?: 'left' | 'right'
): ViewStyle => {
if (!!width && !!extraSpace) {
const marginKey = position === 'left' ? 'marginLeft' : 'marginRight';
return {[marginKey]: -extraSpace, width: width + extraSpace};
}
return {width};
};
const newTextInputContainerStyles: StyleProp<ViewStyle> = StyleSheet.flatten([
styles.textInputContainer,
textInputContainerStyles,
!!contentWidth && StyleUtils.getWidthStyle(textInputWidth),
autoGrow && StyleUtils.getAutoGrowWidthInputContainerStyles(textInputWidth, autoGrowExtraSpace, autoGrowPosition),
!hideFocusedState && isFocused && styles.borderColorFocus,
(!!hasError || !!errorText) && styles.borderColorDanger,
autoGrowHeight && {scrollPaddingTop: typeof maxAutoGrowHeight === 'number' ? 2 * maxAutoGrowHeight : undefined},
isAutoGrowHeightMarkdown && styles.pb2,
]);
const shouldAutoGrow=!!rest.extraSymbol && rest.hideCurrencySymbol
<TextInputWithCurrencySymbol
formattedAmount={formattedAmount}
autoGrowExtraSpace={shouldAutoGrow?variables.w40:undefined} //new
onChangeAmount={setNewAmount}
autoGrowPosition={shouldAutoGrow?'left':undefined} //new
style={[styles.iouAmountTextInput,{textAlign:'right'}]} //update
... Screen.Recording.2025-04-06.at.10.52.24.movNote: I've checked and What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?None, this is purely a UI bug fix What alternative solutions did you explore? (Optional)For safety, instead of modifying it directly inside the <InputWrapper
InputComponent={AmountPicker}
inputID={INPUT_IDS.VALUE}
title={(v) => (v ? getTaxValueWithPercentage(v) : '')}
description={translate('workspace.taxes.value')}
rightLabel={translate('common.required')}
hideCurrencySymbol
// The default currency uses 2 decimal places, so we substract it
extraDecimals={CONST.MAX_TAX_RATE_DECIMAL_PLACES - 2}
// We increase the amount max length to support the extra decimals.
amountMaxLength={CONST.MAX_TAX_RATE_INTEGER_PLACES}
extraSymbol={<Text style={styles.iouAmountText}>%</Text>}
autoGrowExtraSpace={variables.iouAmountTextSize} // new
autoGrowPosition={'left'} // new
style={[styles.iouAmountTextInput,{textAlign:'right'}]} // new
/> |
Still under reviewing |
Seems this might be a regression from #56951 (comment) @dangrous. |
Yes. I can confirm this is regression from #56951 |
@twisterdotcom @dangrous @hungvu193 We have two valid proposals here. For fairness to all contributors, should we still continue with the current step here? 🤔 |
Yes, we technically should. If @huult is happy sharing, we could do $125 each for them and whoever might have the best solution here. |
📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸 |
That works for me if it works for you @huult! Or actually edit - no payment would be required for @huult since it's a regression; so maybe just a $125 thank you to the contributor with the best solution? |
@twisterdotcom @dangrous This issue is a regression from my previous PR. However, the solution in that PR was correct and addressed the original issue: #56951. The current problem only occurs when the autoGrowExtraSpace prop is used, which already existed in the codebase. I think this issue is a deeper regression introduced by the Anyway, would it be okay if I create a new PR to fix this issue? |
Okay, so we have fixed the regression in #56951, but we're saying this is a new issue. If so, I am more inclined to:
Does that sound good? |
@twisterdotcom If possible, please do not penalize my ticket as a regression, because this issue has existed for 4 months. |
@huult Was this prop |
Current assignee @dangrous is eligible for the choreEngineerContributorManagement assigner, not assigning anyone new. |
@hungvu193 What if we have 2 symbols at the end and beginning? In this case I believe we should use overFlowHidden |
@nkdengineer I don’t see the symbol appearing at both the ![]() |
I also don't think that we have both suffix and prefix at the same time |
All yours @dangrous |
Yep I think you're right, I can't think of a situation where we'd have both prefix and suffix. Let's also add a test for Thanks! |
📣 @linhvovan29546 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app! Offer link |
Being held for #60842 |
This issue has not been updated in over 15 days. @dangrous, @twisterdotcom, @hungvu193, @linhvovan29546 eroding to Monthly issue. P.S. Is everyone reading this sure this is really a near-term priority? Be brave: if you disagree, go ahead and close it out. If someone disagrees, they'll reopen it, and if they don't: one less thing to do! |
All yours @dangrous. PR is approved |
|
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.1.47-6 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 2025-05-28. 🎊 For reference, here are some details about the assignees on this issue:
|
@hungvu193 @twisterdotcom @hungvu193 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] |
Uh oh!
There was an error while loading. Please reload this page.
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: V9.1.23-1
Reproducible in staging?: Yes
Reproducible in production?: Yes
If this was caught on HybridApp, is this reproducible on New Expensify Standalone?: Yes, reproducible on both
If this was caught during regression testing, add the test name, ID and link from TestRail: N/A
Email or phone of affected tester (no customers): [email protected]
Issue reported by: Applause Internal Team
Device used: Redmi note 19s androud 13
App Component: Workspace Settings
Action Performed:
Expected Result:
When entering tax rate, digit must not overlap with percentage symbol.
Bug not reproducible in v9.1.20-0
Actual Result:
When entering tax rate, digit overlap with percentage symbol.
Workaround:
Unknown
Platforms:
Screenshots/Videos
Bug6791384_1743699201844.az_recorder_20250403_221706.mp4
View all open jobs on GitHub
Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @Issue Owner
Current Issue Owner: @twisterdotcomThe text was updated successfully, but these errors were encountered: