Migrate AmountSelectorModal to be nav RHP#90346
Conversation
Codecov Report❌ Looks like you've decreased code coverage for some files. Please write tests to increase, or at least maintain, the existing level of code coverage. See our documentation here for how to interpret this table.
|
| import {DYNAMIC_ROUTES} from '@src/ROUTES'; | ||
| import INPUT_IDS from '@src/types/form/WorkspaceNewTaxForm'; | ||
|
|
||
| function WorkspaceCreateTaxValuePage() { |
There was a problem hiding this comment.
Naming suggestion WorkspaceCreateTaxAmountSelectorPage to be consistent with all the var names
Or rename variable to sth like TAX_VALUE_PICKER
There was a problem hiding this comment.
I kept the original name, but since there's no AmountPicker anymore, I think it's consistent
| inputRef.current = ref; | ||
| }; | ||
| useFocusEffect(() => { | ||
| const focusTimeout = setTimeout(() => { |
There was a problem hiding this comment.
Is it possible to use sth else for focus thatn setTimeout ?
There was a problem hiding this comment.
yes, I used TransitionTracker (cc: @collectioneur)
jmusial
left a comment
There was a problem hiding this comment.
claaude suggests:
Duplication with existing ValuePage (screen TAX_VALUE) already handles editing an existing tax rate's value. The new WorkspaceCreateTaxValuePage does essentially the same thing for the create flow. Worth a follow-up to consolidate or at least factor a shared NumberWithSymbolForm-wrapped subcomponent so future styling/validation fixes don't have to be applied twice.
worth checking out if we can unify them
the two pages differ significantly, most importantly they save the value in different places and they have different validation. I don't think introducing an additional common component is worth it. |
Explanation of Change
Migrates
AmountSelectorModal, used only byAmountPicker, used only byWorkspaceCreateTaxPageto be a navigation-based RHP, not a modal.Fixed Issues
$ #53493
PROPOSAL: N/A
Tests
Offline tests
N/A
QA Steps
Same as tests.
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, 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.ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
Nagranie.z.ekranu.2026-05-12.o.17.16.07.mov
Android: mWeb Chrome
Nagranie.z.ekranu.2026-05-12.o.17.22.17.mov
iOS: Native
Simulator.Screen.Recording.-.iPhone.17.Pro.-.2026-05-12.at.17.28.40.mov
iOS: mWeb Safari
Simulator.Screen.Recording.-.iPhone.17.Pro.-.2026-05-12.at.17.25.10.mov
MacOS: Chrome / Safari
Nagranie.z.ekranu.2026-05-12.o.16.03.27.mov