[No QA] Only load full policies one-by-one as needed#6087
Conversation
|
Something I missed in this implementation – the |
I went ahead and addressed this and moved the |
|
Updated and ready for review! |
tgolen
left a comment
There was a problem hiding this comment.
I chatted with Rory 1:1 and suggested the following changes:
- Change
API.getPolicyList()to only accept a single string argument forpolicyIDand throw otherwise (this will remove the need to have a log) - Change the HOC so that it passes the policy object to the consumers (this is a more typical pattern for an HOC so it would make it more consistent)
- Make sure the only pages that need the policy object are the ones using the HOC
|
PR has been updated per @tgolen's comment above ^ |
tgolen
left a comment
There was a problem hiding this comment.
Looks really good. Just this one thing I noticed.
|
You got conflicts |
|
Looking good overall, but there's a conflict! |
|
Conflicts resolved! |
| API.GetPolicySummaryList() | ||
| .then((data) => { | ||
| if (data.jsonCode === 200) { | ||
| const policyDataToStore = _.reduce(data.policySummaryList, (memo, policy) => ({ |
There was a problem hiding this comment.
TIL: Did not know this worked, thought you had to do lodashGet(data, ['policyList', 0], {});
|
✋ 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 production by @AndrewGable in version: 1.1.15-15 🚀
|
Details
So we want to make sure that whenever a workspace or any of its sub-pages attempts to render, then we'll load the full policy for that workspace. So whenever we navigate to a workspace page (and did not just come from one), then we'll load that full policy.
Fixed Issues
$ https://github.com/Expensify/Expensify/issues/181676
Tests
/settings. Verify using logs or the network console that no full policy is loaded.xto close the modal. Verify that the full settings modal closes.QA Steps
Only regression tests.
Tested On