Remove split button from settlement button - #98963
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a458c774fc
ℹ️ 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".
| shouldAlwaysShowDropdownMenu | ||
| customText={customText} |
There was a problem hiding this comment.
When a user can approve but cannot pay, the caller sets shouldHidePaymentOptions and shouldShowApproveButton, producing the single approveButtonOption. Forcing the dropdown branch makes customText override that option's label, so the primary action now says “Pay {amount}” and opens a one-item menu even though payment is unavailable and the only action is Approve. Keep the approve-only case as a direct Approve button, or derive the displayed text from its sole option.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
shouldShowApproveButton is true when the approved animation is running and SettlementButton won't be shown when an animation is running.
App/src/components/SettlementButton/AnimatedSettlementButton.tsx
Lines 184 to 190 in f248344
There was a problem hiding this comment.
Removed the dead shouldShowApproveButton logic
|
Hey, I noticed you changed If you want to automatically generate translations for other locales, an Expensify employee will have to:
Alternatively, if you are an external contributor, you can run the translation script locally with your own OpenAI API key. To learn more, try running: npx bun ./scripts/generateTranslations.ts --helpTypically, you'd want to translate only what you changed by running |
| onPaymentOptionsShow={onPaymentOptionsShow} | ||
| onPaymentOptionsHide={onPaymentOptionsHide} | ||
| formattedAmount={formattedAmount} | ||
| confirmApproval={confirmApproval} |
There was a problem hiding this comment.
Dead prop. shouldShowApproveButton is not passed as true in this component, so confirmApproval will never be called.
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.
|
Explanation of Change
Fixed Issues
$ #98663
PROPOSAL:
Tests
Same as QA Steps
Offline tests
Same as QA Steps
QA Steps
Prerequisite: have at least once paid a report on a workspace
DM
Prerequisite: have paid a user at least once
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.Screenshots/Videos
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
web.mp4