fix: remove onyx connect ONYXKEYS.NVP_PRIVATE_OWNER_BILLING_GRACE_PERIOD_END (part 3)#84293
Conversation
|
@jasperhuangg 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] |
|
@shubham1206agra will review this one |
| return; | ||
| } | ||
| if (policy && shouldRestrictUserBillableActions(policy.id, userBillingGraceEndPeriods, ownerBillingGraceEndPeriod)) { | ||
| if (policy && shouldRestrictUserBillableActions(policy.id, userBillingGraceEndPeriods, undefined, ownerBillingGraceEndPeriod)) { |
…ATE_OWNER_BILLING_GRACE_PERIOD_END-part-3
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.
|
|
No product review needed |
Reviewer Checklist
Screenshots/VideosScreen.Recording.2026-03-08.at.9.07.28.PM.mov |
|
@tgolen Please review this PR |
|
🚧 @tgolen has triggered a test Expensify/App build. You can view the workflow run here. |
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
|
|
🚀 Deployed to staging by https://github.com/tgolen in version: 9.3.34-0 🚀
|
|
🚀 Deployed to production by https://github.com/luacmartins in version: 9.3.34-2 🚀
|
| const [personalPolicyID] = useOnyx(ONYXKEYS.PERSONAL_POLICY_ID); | ||
| const [betas] = useOnyx(ONYXKEYS.BETAS); | ||
| const [userBillingGraceEndPeriods] = useOnyx(ONYXKEYS.COLLECTION.SHARED_NVP_PRIVATE_USER_BILLING_GRACE_PERIOD_END); | ||
| const [ownerBillingGraceEndPeriod] = useOnyx(ONYXKEYS.NVP_PRIVATE_OWNER_BILLING_GRACE_PERIOD_END); |
There was a problem hiding this comment.
@truph01 @shubham1206agra This change prevents SettlementButton from being memoized by the React Compiler. Could you please check this?
cc @roryabraham Since we already removed the manual memoization here
There was a problem hiding this comment.
@linhvovan29546 Please ask the same in #80252 as this PR added the memoization back
There was a problem hiding this comment.
@shubham1206agra We merged the latest PR two weeks ago #81818 So it's not caused by #80252
There was a problem hiding this comment.
@linhvovan29546 The memoization is still present in the file so it's not our fault
There was a problem hiding this comment.
My mistake, I referenced the wrong here. To clarify: the memoization is caused by PR #83638
Explanation of Change
This PR is part of an effort to remove
Onyx.connect()usage for the keyONYXKEYS.NVP_PRIVATE_OWNER_BILLING_GRACE_PERIOD_ENDinsrc/libs/SubscriptionUtils.ts.Since this refactor affects multiple areas, it is split into a few small PRs. This PR is the 3rd step and focuses on the following refactor:
Direct calls
shouldRestrictUserBillableActionsfrom components (no intermediate utility):Fixed Issues
$ #66449
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
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
Screen.Recording.2026-03-05.at.23.58.24.mov