Move tax amount to inline component#92059
Conversation
|
@ChavdaSachin 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] |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 336bd9d874
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| <NumberWithSymbolForm | ||
| displayAsTextInput | ||
| autoFocus={false} | ||
| value={taxAmountInput} |
There was a problem hiding this comment.
Keep inline tax amount synced after recalculation
When the tax rate, amount, or currency changes while this inline field is mounted, TaxController writes the recalculated tax amount back to the transaction, but NumberWithSymbolForm only uses value to initialize its internal currentNumber and does not update when the prop changes. In the new manual expense flow this leaves the visible tax amount stale after selecting a different tax rate (or changing the expense amount/currency), even though the draft now contains a different tax amount, so the user can submit a value that is not what the field displays. Force a remount or explicitly sync the input when taxAmountInput/currency changes.
Useful? React with 👍 / 👎.
Codecov Report❌ Looks like you've decreased code coverage for some files. Please write tests to increase, or at least maintain, the existing level of code coverage. See our documentation here for how to interpret this table.
|
|
Let's wait for #92061 to be merged first |
trjExpensify
left a comment
There was a problem hiding this comment.
Part of the in-line input editing 👍
Explanation of Change
Fixed Issues
$ #90673
PROPOSAL:
Tests
Precondition:
Run Onyx.merge('betas', ['newManualExpenseFlow']); in console.
Enable Rules, Tags and Taxes in workspace settings.
Set Billable default to Billable.
Offline tests
QA Steps
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))npm run compress-svg)Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
Screen.Recording.2026-05-29.at.17.03.02.mov