Skip to content

Conversation

SakshiKekre
Copy link
Collaborator

@SakshiKekre SakshiKekre commented Oct 9, 2025

[CODE IN PROGRESS; NOT READY FOR REVIEW. Depends on #226 for Simulation.output field. To be merged after that]

This PR Implements household calculation comparison display:

  • Extract baseline and reform simulation outputs in ReportOutputPage

    • Use positional mapping: simulationIds[0] = baseline, [1] = reform
    • Pass extracted outputs through OverviewSubPage to HouseholdOverview
  • Update HouseholdOverview to accept baseline and reform props

    • Add comparison logic to VariableArithmetic component
    • Show "rises by" / "falls by" text when reform exists
    • Show baseline value only when no reform present
    • Filter child variables based on non-zero values in either baseline or reform
  • Update title to show comparison summary

    • "increases by $X" / "decreases by $X" when reform exists
    • "is $X" when only baseline exists

Based on v1 app's NetIncomeBreakdown.jsx comparison pattern.

Copy link

vercel bot commented Oct 9, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
policyengine-app-v2 Ready Ready Preview Comment Oct 9, 2025 7:19am

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant