Repository navigation
Conversation
|
@MelvinBot review |
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. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 091a4a0775
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
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".
|
@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] |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5216ae0ae9
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
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".
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppAndroid: mWeb ChromeiOS: HybridAppiOS: mWeb SafariMacOS: Chrome / Safariweb.mp4 |
|
@bernhardoj done |
|
No product review required. This is a component migration. |
|
@jmgraa can you address the review from Georgia please? |
|
🚧 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.5.34-0 🚀
|
|
No help site update needed — this PR migrates existing amount inputs to a shared component without changing user workflows or making any existing article inaccurate. |
|
No FullStory changes needed — this PR migrates existing amount-input currency/unit controls to composable components without adding user-facing functionality or changing tracking or masking. |
|
🚀 Deployed to production by https://github.com/yuwenmemon in version: 9.5.34-1 🚀
Bundle Size Analysis (Sentry): |
Explanation of Change
The composable
AmountFormField.Inputprimitive previously lacked a way to house trailing accessories (such asCurrencyPickerButtonorSignFlipButton) inside the input border. Because of this architectural gap, call sites that required an inline text input with a trailing dropdown or button could not fully leverageAmountFormField.This PR expands
AmountFormField.Inputto accept trailing accessories aschildren, rendering them inside the input border viaBaseTextInput'srightHandSideComponent. As a direct consequence of this feature,AmountForm'sdisplayAsTextInputpath has been migrated to route currency- and unit-button variants toAmountFormField, eliminating its fallback to the legacyNumberWithSymbolForm.AmountFormField.Input: Added an optionalchildrenprop toAmountFormFieldInputProps. Trailing accessories passed as children are rendered insideBaseTextInput'srightHandSideComponentwrapped in a flex row container (styles.flexRow, styles.gap2, styles.alignItemsCenter). This neatly places accessory buttons inside the input border while preserving their full access toAmountFormField's state and action contexts.AmountFormcurrency-button variants: Leveraged the newchildrencapability inAmountFormby removing the!shouldShowCurrencyButtonguard from thedisplayAsTextInputbranch. WhenshouldShowCurrencyButtonis enabled,<AmountFormField.CurrencyPickerButton>is composed directly as a child of<AmountFormField.Input>, supporting both standard currency codes and custom labels (currencyButtonLabel, e.g. duration units such as "hours" or "days").tests/ui/AmountFormFieldInputTest.tsx: Added tests verifying that multiple accessories render in composition order inside the input, trigger press handlers independently without affecting input value, and can reach and mutate the parentAmountFormFieldcontext.tests/ui/AmountFormTest.tsx: Added tests verifying thatdisplayAsTextInputwith a currency button routes throughAmountFormField, forwards click events, and properly displays custom unit labels.Fixed Issues
$ #98171
PROPOSAL: #97970
Tests
chronos@expensify.com) via search or the chat list.AmountFormcomposingAmountFormField.Inputwith a trailing unit accessory).hours) positioned inside the right side of the input border.6 Enter a value (e.g.
4.5) and verify that numeric entry, caret movement, and decimal formatting work properly.days) to open the duration unit modal. Select a different unit (e.g.days) and verify that the button label updates accordingly.Offline tests
N\A
QA Steps
Same as tests
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.Screenshots/Videos
Android: Native
android.mov
Android: mWeb Chrome
android_mweb.mov
iOS: Native
ios.mov
iOS: mWeb Safari
ios_web.mov
MacOS: Chrome / Safari
web.mov