-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Remove Onyx.connect() for the key: ONYXKEYS.COLLECTION.POLICY_CATEGORIES in src/libs/actions/Policy/Category.ts #71457
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
Conversation
|
@ikevin127 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] |
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
Reviewer Checklist
Screenshots/VideosScreen.Recording.2025-09-29.at.17.04.20.mov |
| const [allPolicies] = useOnyx(ONYXKEYS.COLLECTION.POLICY, {canBeMissing: true}); | ||
| const [allPolicyCategories] = useOnyx(`${ONYXKEYS.COLLECTION.POLICY_CATEGORIES}`, {canBeMissing: true}); |
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.
🟡 Same Onyx collection / selector subscription refactor recommendation as https://github.com/Expensify/App/pull/71457/files#r2389503766.
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.
same above
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.
In the other thread, you said:
@ikevin127 We can't know the selected item at mount time, It relies on the user's selection
But I don't think that same statement applies here, does it? This component is using the reportID from the route parameters, so a selector should be used here for getting the report's policy, and then the policy's categories.
|
🟢 PR Review Checklist completed, I have a few comments / improvements code-wise ☝️ Here’s a focused manual test checklist derived from the changed files, grouped by feature/flow, with the exact pages/components: ✅ Pre-setup to cover key paths ✅ Duplicate Review flows (TransactionPreview, MoneyRequestHeader, TransactionDuplicate/*) ✅ Change report flows (re-routing expenses between reports/policies) ✅ Add Unreported Expense ✅ Split Expense ✅ Enable/disable categories at workspace level ✅ Workspace Categories: list, bulk, settings, and edits ✅ Workspace Categories global requirement ✅ IOU Request Category Step (auto-enable path) ✅ Cross-cutting edge cases to include while testing ✅ Platforms |
|
@ikevin127 Back to you |
ikevin127
left a comment
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.
Thanks for the updates! LGTM ![]()
Noting that there were 3 new checkboxes added to PR Author Checklist in the meantime (that's why it's failing:
- [x] If new assets were added or existing ones were modified, I verified that:
- [x] The assets are optimized and compressed (for SVG files, run `npm run compress-svg`)
- [x] The assets load correctly across all supported platforms.| const [allPolicies] = useOnyx(ONYXKEYS.COLLECTION.POLICY, {canBeMissing: true}); | ||
| const [allPolicyCategories] = useOnyx(`${ONYXKEYS.COLLECTION.POLICY_CATEGORIES}`, {canBeMissing: true}); |
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.
In the other thread, you said:
@ikevin127 We can't know the selected item at mount time, It relies on the user's selection
But I don't think that same statement applies here, does it? This component is using the reportID from the route parameters, so a selector should be used here for getting the report's policy, and then the policy's categories.
|
@tgolen Could you please take a look again? |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚀 Deployed to staging by https://github.com/tgolen in version: 9.2.23-0 🚀
|
|
🚀 Deployed to production by https://github.com/lakchote in version: 9.2.23-3 🚀
|
Explanation of Change
Fixed Issues
$ #66559
PROPOSAL:
Tests
Offline tests
QA Steps
// TODO: These must be filled out, or the issue title must include "[No QA]."
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
Screen.Recording.2025-09-29.at.17.20.08.mov
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
MacOS: Desktop