Repository navigation
Add category tax defaults to Expense defaults - #99420
Conversation
Signed-off-by: krishna2323 <belivethatkg@gmail.com>
|
Hey, I noticed you changed If you want to automatically generate translations for other locales, an Expensify employee will have to:
Alternatively, if you are an external contributor, you can run the translation script locally with your own OpenAI API key. To learn more, try running: npx bun ./scripts/generateTranslations.ts --helpTypically, you'd want to translate only what you changed by running |
Signed-off-by: krishna2323 <belivethatkg@gmail.com>
Signed-off-by: krishna2323 <belivethatkg@gmail.com>
Signed-off-by: krishna2323 <belivethatkg@gmail.com>
Signed-off-by: krishna2323 <belivethatkg@gmail.com>
Signed-off-by: krishna2323 <belivethatkg@gmail.com>
Signed-off-by: krishna2323 <belivethatkg@gmail.com>
Signed-off-by: krishna2323 <belivethatkg@gmail.com>
Signed-off-by: krishna2323 <belivethatkg@gmail.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1bdb3ab7b4
ℹ️ About Codex in GitHub
Your team has set up Codex to 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 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
🚀 Deployed to staging by https://github.com/JS00001 in version: 9.4.73-0 🚀
|
|
🤖 Yes — help site changes are required. Draft PR: #100489 This PR adds a capability the help site never described: an expense default that matches on a Category and sets a default Tax rate. Every existing article only covers merchant-matching rules, and the What the docs PR changesNew — The full workflow: prerequisites, creating the rule via Rules > Expense defaults > Add rule > Apply expense defaults > Category, editing and bulk deleting rows listed under Categories, and what happens afterward — applies to new expenses only, falls back to the workspace default when deleted, and is removed with its category or tax rate. FAQ covers the locked Category option, the Taxes are not enabled empty state, the missing None option, both validation errors, and auditor read-only access. Updated — The Default tax rate bullet now notes the rate is also managed from the Expense defaults tab and links to the new article. Both paths write the same Updated — Added the chooser step for the tabbed page, corrected Save Rule to Save rule, and pointed at the new article for the category rule type. One thing to confirmThe tabbed Rules page is behind the So rather than replacing the current instructions, the new steps use the same conditional phrasing All UI strings came from
@Krishna2323, please review the linked help site PR and confirm it reflects the current behavior. Then mark the linked help site PR |
|
Deploy Blocker #100504 was identified to be related to this PR. |
|
Deploy Blocker #100529 was identified to be related to this PR. |
|
Deploy Blocker #100530 was identified to be related to this PR. |
|
Deploy Blocker #100532 was identified to be related to this PR. |
|
Deploy Blocker #100536 was identified to be related to this PR. |
|
Deploy Blocker #100544 was identified to be related to this PR. |
|
Deploy Blocker #100545 was identified to be related to this PR. |
|
Deploy Blocker #100546 was identified to be related to this PR. |
|
Deploy Blocker #100591 was identified to be related to this PR. |
|
🚀 Deployed to production by https://github.com/mountiny in version: 9.4.73-3 🚀
Bundle Size Analysis (Sentry): |
Explanation of Change
Fixed Issues
$ #99410
PROPOSAL:
Tests
Create — choose the type
+ Rule→Apply expense defaults: verify the chooser showsApply expense defaults/What should this rule match on?withMerchantandCategorycards.Categoryis locked and tapping it showsTurn on taxes first.workspaces/<id>/rules/merchant-rules/new: verify it redirects to the chooser.Create — category rule
Category: verify requiredCategorycondition and onlyTaxunder defaults. No merchant/default rows orPreview matches.Category rules apply going forward.Tax: verify noNoneoption and workspace default rate isn't listed.Tax: verifyTaxes are not enabledempty state withEnable taxes, and enabling returns to a working picker.Create — merchant rule
Merchant: verify requiredMerchant, all defaults available, andPreview matches+ apply-to-existing are usable.Merchants.Reset
Reset: verify condition/defaults clear while staying scoped to the same type.Resetis absent.Edit
Categoriesrow: verify category + tax are pre-filled and are the only rows.workspaces/<id>/rules/category-tax-rules/edit/<category>: verify correct values load.CategoriesandMerchantsrow: verify both are read-only — no chevrons, Save, or Delete, and no not-found page.Delete
Merchant typesrows are locked/non-selectable.6 Delete a category that a merchant rule matches on: verify the merchant rule stays listed and still opens
Sections / sorting
Unchanged — all four existing steps still apply.
Validation
Enter a merchant, and apply at least one default.Please enter a merchant.Please select a category.Please select a tax rate.Offline tests
QA Steps
Same as tests
Verify that no errors appear in the JS console
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectioncanBeMissingparam foruseOnyxtoggleReportand 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_hybrid.mp4
Android: mWeb Chrome
android_mWeb.mp4
iOS: Native
ios_hybrid.mp4
iOS: mWeb Safari
ios_mWeb.mp4
MacOS: Chrome / Safari
web_chrome.mp4