-
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
[Taxes] Add extra decimal places, new API #38733
[Taxes] Add extra decimal places, new API #38733
Conversation
I'm fixing the autofocus here. We need this PR merged soon, since the API changes are live and created this blocker already |
Added #38827 to the list of fixed issues here |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, just one question
@shubham1206agra Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
@kosmydel Can you update your recordings to show 4 decimal limit? |
@kosmydel I am unable to put 012 as tax rate. Is this intentional? |
@kosmydel Why is tax categories missing in mobile device? Edit - Now, I am unable to see the default tax rates. |
I can do that tomorrow.
I think the limit here is 2 characters. I'm not sure if we want users to type more than 2 non-decimal digits? Cc @luacmartins |
I think we support this in other cases, e.g. request money and the resulting amount would just be 12. I think we shouldn't block on it though since the most important change in this PR is updating the API so it works correctly. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes LGTM. We still need to decide on the number of decimals that we want to use for NewDot. Additionally, there are other small things we need to address:
- Zeros to the left should just be discarded, e.g. Users can enter 0012 and that should result in 12
- Users should be able to enter 100 as the max tax rate.
Reviewer Checklist
Screenshots/VideosAndroid: NativeScreen.Recording.2024-03-25.at.10.11.15.PM.movAndroid: mWeb ChromeScreen.Recording.2024-03-25.at.9.30.13.PM.moviOS: NativeScreen.Recording.2024-03-25.at.9.57.07.PM.moviOS: mWeb SafariScreen.Recording.2024-03-25.at.9.21.02.PM.movMacOS: Chrome / SafariScreen.Recording.2024-03-25.at.9.07.05.PM.movMacOS: DesktopScreen.Recording.2024-03-25.at.9.37.43.PM.mov |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is looking good to me except minor comments made by @luacmartins
@luacmartins looks like this was merged without a test passing. Please add a note explaining why this was done and remove the |
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
Should we set the max length then? Or should the user be able to enter something like I think letting the user enter 4 digits for the integer part, and 4 for the decimals, might be a good balance.
Right, going to change it. |
Users should be able to enter
Seems fine to me |
Details
This PR fixes two things:
Value
page,UpdatePolicyTaxValue
API calls to the new API.We've discussed on Slack, that for now, we want to support up to 4 decimal places.
Fixed Issues
$ #38499
$ #38208 (comment)
$ #38827
PROPOSAL: N/A
Tests
0.1234
.11.1234
.01.5
,99.9999
,Value
page, and verify theValue
input is focused.Offline tests
N/A
QA Steps
Tests
sectionPR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)myBool && <MyComponent />
.src/languages/*
files and using the translation methodSTYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)Design
label and/or tagged@Expensify/design
so the design team can review the changes.ScrollView
component to make it scrollable when more elements are added to the page.main
branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTest
steps.Screenshots/Videos
Android: Native
android.mov
Android: mWeb Chrome
mweb-android.mov
iOS: Native
ios.mp4
iOS: mWeb Safari
mweb-ios.mp4
MacOS: Chrome / Safari
web.mov
MacOS: Desktop
desktop.mov