Add 10 year impacts to app#2502
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
e1d3fe2 to
e97edb6
Compare
|
Placing in draft until changes introduced in #2499 can be integrated |
There was a problem hiding this comment.
Pull Request Overview
This pull request introduces multi–year impacts functionality to the app and updates several related components and API aggregation modules. Key changes include adding multi–year impacts logic to the PolicyPage, updating UI components (Menu/MenuItem/MenuItemGroup) to support a disabled state, and adding/refining aggregation functions and corresponding tests.
Reviewed Changes
Copilot reviewed 30 out of 30 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| src/pages/PolicyPage.jsx | Adds multi-year impacts handling by importing and using determineIfMultiYear. |
| src/pages/BlogPage.jsx | Removes debugging console.log statements. |
| src/layout/Menu.jsx | Updates menu item components to conditionally disable interactions and hover. |
| src/api/societyWideAggregation/* | Introduces and tests new aggregation functions for budget, deciles, and poverty. |
| src/api/makeSequentialSimulationRequests.js | Replaces the legacy API call with asyncApiCall and adapts request validation. |
| src/tests/* | Adds extensive tests for multi-year impact components and aggregation utilities. |
|
A bit stonewalled on this due to bugs emerging from the |
|
@nikhilwoodruff On the bug you're seeing, the API is outputting the following impacts: This is true for the single-year impact page, as well. The "Costs £X" display only shows the Is it possible that:
Would love to post-scrum on this |
|
Ready for review once issues from @nikhilwoodruff are addressed |
| { | ||
| header: "Federal tax", | ||
| budgetKey: "budgetary_impact", | ||
| budgetKey: "tax_revenue_impact", |
There was a problem hiding this comment.
This is still inconsistent I believe: federal tax revenue impact is tax_revenue_impact- state_tax_revenue_impact.
I would look at this part of the codebase to see exactly which variables map to which concepts and just mirror that. Apologies for missing this in earlier reviews if this was part of one of the chained PRs: I think if in future we could just combine PR dependent on each other in the same repo that would make it easier to review.





Description
Fixes #2472. Requires merging of #2499.
Changes
Adds a component to the
PolicyRightSidebarcomponent to enable multi-year impacts runs, then makes modifications where necessary to use the tools added in previous PRs to actually run these impacts.There are some clear code quality issues with this PR. The best thing to do with this component would be to refactor
FetchAndDisplayImpact,DisplayImpact, andtree.jsto improve how we handle impact fetching and output display. However, in the interest of time, and accounting for the fact that we're going to be redoing the front end soon, I have not made those changes in this PR.Screenshots
Please see the preview Vercel deployment. To use:
Tests
Various added.
Remaining