Fix graph output by reverting to InputField #968
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #952. Our implementation of antd's InputValue component uses an overly eager onChange handler, creating numerous household creation requests and
get_household_under_policy
requests that sometimes don't sequence properly. When the output pages receive a version of the household that's one or two requests behind, the relevant piece of data is often one or more orders of magnitude too low, creating the strange difference between the line (which runs off of acalculate
request) and the dot (fromget_household_under_policy
, using a stale household).I will continue working on this bug. If I can get the antd implementation to work properly, I will withdraw this PR and open a new one for that.
Note: There's also a weirdly large amount of linting by
prettier
, hence the weirdly high number of files edited.🤖[deprecated] Generated by Copilot at 9579116
Summary
📝📊🐛
This pull request improves the formatting and readability of the code in various components that render charts, tables, and inputs for the policy engine app. It also updates the colab link for the US country to use the latest notebook version. The main change is to indent the nested ternary operators for consistency and clarity. The pull request affects the following files:
VariableEditor.jsx
,AverageImpactByDecile.jsx
,AverageImpactByWealthDecile.jsx
,BudgetaryImpact.jsx
,CliffImpact.jsx
,DeepPovertyImpact.jsx
,DeepPovertyImpactByGender.jsx
,InequalityImpact.jsx
,PovertyImpact.jsx
,PovertyImpactByGender.jsx
,PovertyImpactByRace.jsx
,RelativeImpactByDecile.jsx
,RelativeImpactByWealthDecile.jsx
,Header.jsx
,Posts.jsx
,Analysis.jsx
,PolicyReproducibility.jsx
,PolicyRightSidebar.jsx
,PolicyEngineCountry.jsx
, andPolicyEngine.jsx
.Walkthrough
InputNumber
component withInputField
component for more flexible input formatting and validation inVariableEditor.jsx
(link, link)PolicyReproducibility.jsx
(link)VariableEditor.jsx
(link, link)Posts.jsx
(link)Posts.jsx
(link)Header.jsx
(link)