Repository navigation
Conversation
|
Hey! I see that you made changes to our Form component. Make sure to update the docs in FORMS.md accordingly. Cheers! |
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
dc0d39c to
18deab3
Compare
Co-authored-by: Dariusz Biela <dariusz.biela.dev@gmail.com>
…ress Co-authored-by: Dariusz Biela <dariusz.biela.dev@gmail.com>
5480746 to
3217c70
Compare
|
Only iOS is left to be tested; the build keeps failing for me. |
|
Any particular reason for that? |
|
I get this when running Tried running |
…ricEditingController
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppandroid.mp4Android: mWeb Chromeandroid.mweb.mp4iOS: HybridAppios.mp4iOS: mWeb Safariios.mweb.mp4MacOS: Chrome / Safariweb.new.mp4 |
|
@mountiny can you take a look at / merge that? |
|
Thanks for your patience |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚧 mountiny has triggered a test Expensify/App build. You can view the workflow run here. |
|
🧪🧪 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.4.75-0 🚀
|
|
🤖 No help site changes are required for this PR, so I did not create a draft docs PR. This is an internal refactor. It introduces
What I checkedI searched all of I also confirmed the PR is scoped entirely to component internals and tests, with no route, no new Settings entry, and no marketing-approved copy. Since there is no docs PR, there is nothing to label |
|
🚀 Deployed to production by https://github.com/mountiny in version: 9.4.75-3 🚀
Bundle Size Analysis (Sentry): |
|
🚀 Deployed to production by https://github.com/mountiny in version: 9.4.75-3 🚀
Bundle Size Analysis (Sentry): |
Explanation of Change
This change lays the foundation for decomposing
NumberWithSymbolFormby introducing the composableNumericFieldroot and itsNumericField.TextInputprimitive (the implementation of theNumberFormAPI described in issue #98169).The new numeric editing controller centralizes value normalization, locale digit conversion, decimal and length validation, formatting, and the existing imperative API (
clearSelection,updateNumber, andgetNumber). It also manages caret positioning across insertions, deletions, rejected edits, external clears, and stale native selection events. The field exposes shared state and actions through context so additional numeric primitives can be added without duplicating editing logic.AmountFormnow usesNumericFieldfor standard text-input amounts, while currency-button variants continue usingNumberWithSymbolForm. The newNumericFielduses improved, centralized normalization logic, so its behavior may differ from the legacy component in some edge cases.NumberWithSymbolFormremains available with its existing behavior unchanged. Unit and UI tests cover normalization, validation, selection handling, controller behavior, and theAmountFormintegration.This PR is part 1 of 2 of the changes originally proposed in #98967 following code review, the work was split into two PRs to make the changes easier to review and merge incrementally.
Fixed Issues
$ #98169
PROPOSAL: #97970
Tests
NumberWithSymbolFormUI and behavior remain unchanged.Offline tests
QA Steps
Same as tests
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectionAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))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.Android: Native
android_native.mov
Android: mWeb Chrome
android_mweb.mov
iOS: Native
ios_native.mov
iOS: mWeb Safari
ios_mweb.mov
MacOS: Chrome / Safari
web.mov