fix(SDK-1264): fix gross-up modal default value, loading state, and alignment - #2718
Open
krisxcrash wants to merge 2 commits into
Open
fix(SDK-1264): fix gross-up modal default value, loading state, and alignment#2718krisxcrash wants to merge 2 commits into
krisxcrash wants to merge 2 commits into
Conversation
…lignment Three separate issues in the same modal: - netPay defaulted to 0, which NumberInput rendered as a visible "$0.00" before the user touched the field. Reuses the coerceNaN preprocessor already established for this in the deduction form schema so the field starts blank. - The Calculate button swapped its own label to "Calculating..." with no fixed width, shifting its neighbors. Switched to Button's built-in isLoading, matching how the footer's Apply button already handles this. - The button drifted out of alignment with the input whenever a validation error grew the input's height, because the button's align-self tracked the tallest sibling rather than the input itself. Visually hides the input's own label and adds one shared label above the row instead, so both boxes start flush at the same top edge regardless of what renders below.
krisxcrash
marked this pull request as ready for review
September 4, 2026 23:36
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.
Summary
Three separate, previously-reported issues in the gross-up (net amount) calculator modal:
netPaydefaulted to0, whichNumberInputrendered as a visible$0.00before the user touched the field. Reuses thecoerceNaNpreprocessor already established for this exact purpose in the deduction form schema, so the field renders blank until a value is entered."Calculating..."with no fixed width, visibly growing and shifting its neighbors. Switched toButton's built-inisLoading(same pattern the footer's Apply button already uses one screen element away), which keeps the label's width fixed and overlays a spinner instead.align-selfhack) didn't hold up, because the button'salign-self: flex-endtracked whichever sibling was tallest — fine with no error, but drifting once a validation error grew the input's height. Root-caused instead: visually hides the input's own label (shouldVisuallyHideLabel, keeps the accessible name) and renders one shared label above the whole row, so the input and button boxes now start flush at the same top edge regardless of what renders below either of them.Jira: SDK-1264
Test plan
GrossUpModal.test.tsxpasses (7/7)eslint/tsc --noEmitcleanaria-hidden; the real accessible name is the visually-hidden field label)