From 392f7ab1f3cbc7fcc4428f0e5692206cd8b61eb2 Mon Sep 17 00:00:00 2001 From: Ya-Lan Yang Date: Thu, 14 Aug 2025 14:00:05 -0500 Subject: [PATCH 1/2] Change All Programs Total key format --- CHANGELOG.md | 5 +++++ src/components/LandingPageMapTab.tsx | 2 +- src/components/LandingPageProgramMap.tsx | 4 ++-- src/components/LandingPageTotalMap.tsx | 6 +++--- src/utils/legendConfig.json | 2 +- 5 files changed, 12 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8060c22e..6173078e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,11 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). +## [Unreleased] + +## Changed +- Change All Programs Total key format [#421](https://github.com/policy-design-lab/pdl-frontend/issues/421) + ## [1.11.0] - 2025-07-31 ### Added diff --git a/src/components/LandingPageMapTab.tsx b/src/components/LandingPageMapTab.tsx index 3f0a5bc3..49c3a200 100644 --- a/src/components/LandingPageMapTab.tsx +++ b/src/components/LandingPageMapTab.tsx @@ -139,7 +139,7 @@ export default function LandingPageMapTab({ let cropTotal = ""; let snapTotal = ""; if (cur !== undefined) { - allProgramTotal = cur["18-22 All Programs Total"]; + allProgramTotal = cur["2018-2022 All Programs Total"]; titleITotal = cur["Title I Total"]; titleIITotal = cur["Title II Total"]; cropTotal = cur["Crop Insurance Total"]; diff --git a/src/components/LandingPageProgramMap.tsx b/src/components/LandingPageProgramMap.tsx index c8234610..6e9783a4 100644 --- a/src/components/LandingPageProgramMap.tsx +++ b/src/components/LandingPageProgramMap.tsx @@ -49,7 +49,7 @@ const MapChart = (props) => { }); switch (title) { case "All Programs": - searchKey = "18-22 All Programs Total"; + searchKey = "2018-2022 All Programs Total"; color1 = "#FFF9D8"; color2 = "#E1F2C4"; color3 = "#9FD9BA"; @@ -161,7 +161,7 @@ const MapChart = (props) => { if (title === "All Programs") { records = allPrograms.filter((s) => s.State === cur.id); records.forEach((record) => { - total += record["18-22 All Programs Total"]; + total += record["2018-2022 All Programs Total"]; }); } else { records = summary.filter((s) => s.State === cur.id && s.Title === title); diff --git a/src/components/LandingPageTotalMap.tsx b/src/components/LandingPageTotalMap.tsx index 34f2d792..92bf555f 100644 --- a/src/components/LandingPageTotalMap.tsx +++ b/src/components/LandingPageTotalMap.tsx @@ -258,7 +258,7 @@ const LandingPageTotalMap = ({ if (!allPrograms || !summary) return 0; if (selectedPrograms.includes("All Programs")) { const stateProgram = allPrograms.find((s) => s.State === state); - return stateProgram ? stateProgram["18-22 All Programs Total"] : 0; + return stateProgram ? stateProgram["2018-2022 All Programs Total"] : 0; } return selectedPrograms.reduce((total, program) => { const programTotal = summary @@ -273,7 +273,7 @@ const LandingPageTotalMap = ({ if (selectedPrograms.includes("All Programs")) { return allStates.reduce((total, state) => { const stateProgram = allPrograms.find((s) => s.State === state.id); - return total + (stateProgram?.["18-22 All Programs Total"] || 0); + return total + (stateProgram?.["2018-2022 All Programs Total"] || 0); }, 0); } return allStates.reduce((total, state) => { @@ -337,7 +337,7 @@ const LandingPageTotalMap = ({ const hasData = allStates.some((state) => { setSelectedPrograms((prev) => [...prev]); const stateProgram = allPrograms.find((s) => s.State === state.id); - return stateProgram && stateProgram["18-22 All Programs Total"] > 0; + return stateProgram && stateProgram["2018-2022 All Programs Total"] > 0; }); if (hasData) { setIsDataReady(true); diff --git a/src/utils/legendConfig.json b/src/utils/legendConfig.json index 86a9d402..6cfef5f3 100644 --- a/src/utils/legendConfig.json +++ b/src/utils/legendConfig.json @@ -1,5 +1,5 @@ { - "18-22 All Programs Total": [5000000000, 10000000000, 30000000000, 40000000000], + "2018-2022 All Programs Total": [5000000000, 10000000000, 30000000000, 40000000000], "Crop Insurance Total":[0, 500000000, 1000000000, 5000000000], "totalNetFarmerBenefit": [0, 250000000, 750000000, 2000000000], "Title I Total":[50000000, 300000000, 600000000, 2000000000], From 9e268f554c9d23a81092761fc5f2440da0f5b1ec Mon Sep 17 00:00:00 2001 From: Ya-Lan Yang Date: Tue, 19 Aug 2025 16:13:06 -0500 Subject: [PATCH 2/2] Update CHANGELOG.md --- CHANGELOG.md | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 068c8140..15978f8c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,9 +6,17 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ## [Unreleased] -## Changed -- Change All Programs Total key format [#421](https://github.com/policy-design-lab/pdl-frontend/issues/421) +### Added +- Add the '2025 Reconciliation/Farm Bill' page with OBBBA model and Baseline data visualization [#401](https://github.com/policy-design-lab/pdl-frontend/issues/401) +- Add a 'Overview' dropdown to Proposal Analysis so that users can always go back to the overview section [#423](https://github.com/policy-design-lab/pdl-frontend/issues/423) + +### Fixed +- Fixed the wrong base acre for the Policy Analysis model when user select a single program [#419](https://github.com/policy-design-lab/pdl-frontend/issues/419) + +### Changed - Add comma to separate integer columns in Title I [#418](https://github.com/policy-design-lab/pdl-frontend/issues/418) +- Reduced bottom marge for issue briefs on the Issue/White Paper page [#425](https://github.com/policy-design-lab/pdl-frontend/issues/425) +- Change All Programs Total key format [#421](https://github.com/policy-design-lab/pdl-frontend/issues/421) ## [1.11.0] - 2025-07-31