Repository navigation
[No QA] rename Numeric components to KeypadAmountEditor and AmountFormField - #105533
Conversation
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
|
@codex review |
|
Codex Review: Didn't find any major issues. Another round soon, please! Reviewed commit: ℹ️ About Codex in GitHubCodex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback". |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
@bernhardoj Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppAndroid: mWeb ChromeiOS: HybridAppiOS: mWeb SafariMacOS: Chrome / Safariw.mp4 |
|
🚧 mountiny has triggered a test Expensify/App build. You can view the workflow run here. |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
|
|
🚀 Deployed to staging by https://github.com/mountiny in version: 9.5.31-0 🚀
|
|
No help site update needed — this PR only renames internal components, hooks, and tests without changing user-facing behavior or making existing article instructions incorrect. |
|
🚀 Deployed to staging by https://github.com/mountiny in version: 9.5.31-0 🚀
|
|
🚀 Deployed to production by https://github.com/blimpich in version: 9.5.31-4 🚀
Bundle Size Analysis (Sentry): |
Explanation of Change
This PR performs a comprehensive, semantic 1:1 refactor across numeric input components, replacing the ambiguous
Numeric*prefix with two distinct UX domains:KeypadAmountEditor: Dedicated full-screen amount/numeric editor featuring a dynamic-font hero display (KeypadAmountFontSizeContext), on-screen number pad (BigNumberPad), and responsive multi-column layouts (KeypadAmountLayout).AmountFormField: Composable, inline form field for amount and numeric inputs based on standardTextInputwith label, currency prefix, and validation error support.AmountActionButtons&AmountEditingController: Shared action buttons (AmountCurrencyPickerButton,AmountSignFlipButton) and a decoupled editing controller handling canonical value, sign, text selection, and magnitude formatting.All compound component namespaces, TypeScript types, context providers/hooks, utility functions, and test suites have been renamed consistently with zero runtime behavioral or UI changes.
Comparison of Renamed Entities (Old vs New)
1. Core Components, Compound Namespaces & Primitives
NumericInputKeypadAmountEditorBigNumberPad), dynamic font scaling, and responsive layout.NumericFieldAmountFormFieldNumericInput.TextInput(NumericInput/NumericTextInput.tsx)KeypadAmountEditor.Input(KeypadAmountInput)NumericInput.Symbol(NumericSymbol)KeypadAmountEditor.Symbol(KeypadAmountSymbol)NumericInput.CurrencyButtonKeypadAmountEditor.CurrencyPickerButtonKeypadAmountEditor.NumericInput.FlipButtonKeypadAmountEditor.SignFlipButton(KeypadAmountSignFlipButton)+/-) button bound toKeypadAmountEditoractions.NumericField.TextInput(NumericField/NumericTextInput.tsx)AmountFormField.Input(AmountFormFieldInput)NumericField.CurrencyButtonAmountFormField.CurrencyPickerButtonAmountFormField.NumericField.FlipButtonAmountFormField.SignFlipButton(AmountFormFieldSignFlipButton)+/-) button bound toAmountFormFieldactions.2. Editor Layout & Subcomponents (
KeypadAmountEditor/layout)NumericInputLayoutKeypadAmountLayoutNumericInputMainKeypadAmountMainSectionNumericInputPadKeypadAmountPadBigNumberPadfor touch devices.NumericInputMinusSignKeypadAmountMinusSignNumericInputErrorKeypadAmountError3. Shared Action Buttons (
AmountActionButtons)NumericButtons/AmountActionButtons/NumericCurrencyButtonAmountCurrencyPickerButtonNumericFlipButtonAmountSignFlipButton+/-) button for touch screens.4. Editing Controller & Hooks (
AmountEditingController)NumericEditingController/AmountEditingController/useNumericEditingControlleruseAmountEditingControlleruseNumericPressSelectionuseAmountPressSelectionuseNumericSelectionuseAmountSelectionnormalizeNumericInputnormalizeAmountInput5. Contexts & State Management
NumericAmountContext/useNumericAmountKeypadAmountFontSizeContext/useKeypadAmountFontSizeNumericInputContextKeypadAmountEditorContextKeypadAmountEditorchildren (useKeypadAmountEditorActions,useKeypadAmountEditorState).NumericFieldContextAmountFormFieldContextAmountFormFieldchildren (useAmountFormFieldActions,useAmountFormFieldState).6. TypeScript Types
NumericInputPropsKeypadAmountEditorPropsNumericTextInputProps(inNumericInput)KeypadAmountInputPropsNumericSymbolPropsKeypadAmountSymbolPropsNumericInputFlipButtonPropsKeypadAmountSignFlipButtonPropsNumericFieldRefAmountFormFieldRefNumericTextInputProps(inNumericField)AmountFormFieldInputPropsNumericEditingRefAmountEditingRefNumericEditingKeyPressEventAmountEditingKeyPressEventNumericEditingSelectionAmountEditingSelectionNumericFlipButtonPropsAmountSignFlipButtonProps7. Updated Unit & UI Test Files
NumericButtonTest.tsxAmountActionButtonsTest.tsxNumericFieldTest.tsxAmountFormFieldTest.tsxNumericFieldInputTest.tsxAmountFormFieldInputTest.tsxNumericFieldSelectionGuardTest.tsxAmountFormFieldSelectionGuardTest.tsxNumericInputTest.tsxKeypadAmountEditorTest.tsxNumericInputWebTest.tsxKeypadAmountEditorWebTest.tsxNumericInputLayoutTest.tsxKeypadAmountLayoutTest.tsxNumericInputLayoutTabletTest.tsxKeypadAmountLayoutTabletTest.tsxNumericInputLayoutWithoutTouchScreenTest.tsxKeypadAmountLayoutWithoutTouchScreenTest.tsxNumericBigNumberPadTest.tsxKeypadAmountBigNumberPadTest.tsxNumericBigNumberPadWithoutTouchScreenTest.tsxKeypadAmountBigNumberPadWithoutTouchScreenTest.tsxuseNumericEditingControllerTest.tsuseAmountEditingControllerTest.tsuseNumericSelectionTest.tsuseAmountSelectionTest.tsuseNumericSelectionWebTest.tsuseAmountSelectionWebTest.tsNumericEditingControllerUtilsTest.tsAmountEditingControllerUtilsTest.tsNumericInputLayoutTestUtils.tsxKeypadAmountLayoutTestUtils.tsxFixed Issues
$ #98171
PROPOSAL: #97970
Tests
WorkspaceCreateTaxValuePage) and verify the full-screen amount editor (KeypadAmountEditor) renders correctly with the%symbol and accepts keyboard/keypad input.AmountFormand verify the input field (AmountFormField) renders with the correct currency prefix and styling.EditableTotalAmountInput) and verify inline editing and the+/-sign toggle button (AmountSignFlipButton) work as expected.Offline tests
N/A
QA Steps
N/A
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectionAvatar, I verified the components usingAvatarare working as expected)npm run compress-svg)Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.