Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
READY FOR REVIEW
PR: Mortgage Refinancing Calculator v3 — Live Results Display
Overview
Replace the explicit "Calculate results" button workflow with progressive disclosure: on first load show the button, but as soon as the user edits any refinance field, hide the button permanently and show the "Net value today" section live—updating reactively, with a dash when inputs are invalid.
Changes Made
Added hasStartedEditing state to track whether the user has typed in ANY refinance field since page load
Triggers on first keystroke in any of: newAmount, newTerm, newRate, closingCosts, years
Persists across tab switches; resets only on page reload
"Calculate results" button now shows only when !hasStartedEditing
Once user types in any refinance field, button disappears permanently
Entire dashed-border box containing button is removed; replaced by results section
"Net value today" section always renders once hasStartedEditing is true
Shows dash (-) when inputs are incomplete or have validation errors
Shows calculated value + verdict + description when all required fields are valid
Loan comparison table always visible; breakdown expandable only when results are ready
Changed DASH constant from em-dash (—) to regular hyphen (-)
Behavior Flow
First Load
├─ "Calculate results" button visible (dashed box)
└─ No results section
User types in refi field
├─ Button disappears
└─ "Net value today" appears with dash
User fills all required fields
├─ "Net value today" shows calculated value
├─ Verdict icon & headline appear
└─ Loan comparison & breakdown visible
User edits any field
├─ Results update live
└─ Button never reappears
Page reload
└─ Back to first load state (button visible)
Testing
Manual QA required (no automated tests in repo). See TESTING.md for 11 comprehensive test cases covering:
First load button visibility
Button disappears on first keystroke
Results display and live updates
Reset behavior (stays in results mode)
Tab switching (preserves editing state)
Page reload (resets to button view)
Error states and validation
Dark mode compatibility
Ticket
IFDM-337: Button logic changes
IFDM-339: Text changes (dash character)