[Rules Revamp R1] Add tabbed Rules page layout and restructure General tab#93185
Conversation
Signed-off-by: krishna2323 <belivethatkg@gmail.com>
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 ts-node ./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>
… subtitle color 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>
…eceiptsPage Signed-off-by: krishna2323 <belivethatkg@gmail.com>
Signed-off-by: krishna2323 <belivethatkg@gmail.com>
Signed-off-by: krishna2323 <belivethatkg@gmail.com>
…d beta gate Signed-off-by: krishna2323 <belivethatkg@gmail.com>
…r default spend rule Signed-off-by: krishna2323 <belivethatkg@gmail.com>
…th layout Signed-off-by: krishna2323 <belivethatkg@gmail.com>
…tion, responsive sizing, full-width layout, and fix tab icon Signed-off-by: krishna2323 <belivethatkg@gmail.com>
Signed-off-by: krishna2323 <belivethatkg@gmail.com>
…ault rule press 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>
|
@luacmartins over to ya |
luacmartins
left a comment
There was a problem hiding this comment.
Left a couple of NAB. Additionally, we have a beta for this feature so can we please break future PRs into smaller incremental changes? That'll make reviewing much easier and faster.
| @@ -0,0 +1,231 @@ | |||
| import React, {useMemo} from 'react'; | |||
There was a problem hiding this comment.
NAB but we should rename these files and remove the Revamp from the name
| {renderMenuItems(policyControlItems)} | ||
| <View style={[styles.sectionDividerLine, styles.mv3]} /> | ||
| {renderMenuItems(productDefaultItems)} | ||
| <ToggleSettingOptionRow |
There was a problem hiding this comment.
This seems legit. Are we gonna address this in a follow up?
|
🚧 @luacmartins has triggered a test Expensify/App build. You can view the workflow run here. |
| }); | ||
| const shouldDimIconRight = iconRight === icons.ArrowRight || !iconRight; | ||
|
|
||
| // eslint-disable-next-line no-nested-ternary -- Selects ml2/ml3/empty based on icon presence and avatar size |
There was a problem hiding this comment.
I see this was just moved from below, but can we get rid // eslint-disable-next-line no-nested-ternary with if/else?
| }, | ||
| requireReceipts: { | ||
| title: 'Require receipts', | ||
| description: 'Require receipts when spend exceeds this amount, unless overridden by a category rule.', |
There was a problem hiding this comment.
NAB but I think "spend" can be interpreted as multiple expenses, whereas "expense" is clear that it's just one (though maybe that's the intention)
There was a problem hiding this comment.
NAB: Is the Revamp part of the filenames temporary? If not, can we use something that won't get outdated? Same goes for types like SpendRuleRestrictionTypeToggleRevampProps, "NewPage" in src/pages/workspace/rules/RulesNewPage.tsx and everything else
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
|
|
🚀 Deployed to staging by https://github.com/luacmartins in version: 9.4.17-0 🚀
Bundle Size Analysis (Sentry): |
Help site review — docs update neededYes, this PR requires help site changes. It restructures the workspace Rules page into tabs (General / Card restrictions / Expense defaults) and renames the General tab rows, which the existing Workspace Rules article does not reflect. Draft help site PR: #94232 What changed and what I updatedThe article's How to configure Expense Rules section described the legacy single-page layout (e.g. "Max expense amount", "Max expense age", "Prohibited expenses"). I updated it to describe the revamped layout, with labels verified against the merged English copy in
@Krishna2323, please review the linked help site PR and confirm it reflects the current behavior. Then mark the linked help site PR |
|
@Krishna2323 @situchan @cead22 @luacmartins @JS00001 Is expensifail account have access to rulesRevamp beta.? Expected Rules page not diaplayed for expensifail account.
|
|
@m-natarajan I just added |
|
Deploy Blocker #94352 was identified to be related to this PR. |
|
Deploy Blocker #94353 was identified to be related to this PR. |
|
Deploy Blocker #94356 was identified to be related to this PR. |
|
Deploy Blocker #94360 was identified to be related to this PR. |
|
🚀 Deployed to production by https://github.com/blimpich in version: 9.4.17-3 🚀
|
|
🚀 Deployed to production by https://github.com/blimpich in version: 9.4.17-3 🚀
|
|
Deploy Blocker #94383 was identified to be related to this PR. |
|
Deploy Blocker #94384 was identified to be related to this PR. |

Explanation of Change
Fixed Issues
$ #92739
PROPOSAL:
Tests
Same as QA Steps
Verify that no errors appear in the JS console
Offline tests
QA Steps
Prerequisites
rulesRevampbeta.Beta gate
General tab
Flag receipt line items
Require receipts
Require fields / Cash / Billable
Card restrictions & Expense defaults tabs
+ Rule flows
Regression
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