Skip to content

[CP Staging] Revert standardize pay button#65192

Merged
luacmartins merged 3 commits intoExpensify:mainfrom
hungvu193:revert-standardize-button
Jun 30, 2025
Merged

[CP Staging] Revert standardize pay button#65192
luacmartins merged 3 commits intoExpensify:mainfrom
hungvu193:revert-standardize-button

Conversation

@hungvu193
Copy link
Contributor

@hungvu193 hungvu193 commented Jun 30, 2025

Explanation of Change

Straight revert #56838

Fixed Issues

$ #65118
$ #65130
$ #65125
$ #65120
$ #65164
$ #65129
$ #65141
$ #65122

PROPOSAL: N/A

Tests

Same as QA steps

  • Verify that no errors appear in the JS console

Offline tests

QA Steps

// TODO: These must be filled out, or the issue title must include "[No QA]."

Test 1

  1. Create a workspace.
  2. Submit an expense.
  3. Go To Report Tabs.
  4. Turn off the internet connection.
  5. Verify that the Pay button is disabled.

Test 2:

  1. [User A] Submit 2 expenses to [User B]
  2. [User B] pays the first expense then go to Report Tab.
  3. Verify that you see the Pay button from the [User A] expense.
  4. Verify that you can pay [User A] expense.

Test 3:

  1. Create a workspace and disable Add approvals.
  2. Go to workspace chat.
  3. Submit two expenses.
  4. Open expense report.
  5. Select all expenses via checkbox.
  6. Click More > Hold.
  7. Enter reason and save it.
  8. Click Submit.
  9. Click More.
  10. Click Pay x.
  11. Click Pay with business account.
  12. Verify that you are navigated to Bank account setup steps.

Test 4:

  1. Create a new workspace.
  2. Create 2 expenses.
  3. Pay the first one.
  4. Go to Report Tabs.
  5. Verify that Pay button doesn't change into Split button.
  6. Click Pay.
  7. Verify that you can pay the second expense without any issue.
  • Verify that no errors appear in the JS console

PR Author Checklist

  • I linked the correct issue in the ### Fixed Issues section above
  • I wrote clear testing steps that cover the changes made in this PR
    • I added steps for local testing in the Tests section
    • I added steps for the expected offline behavior in the Offline steps section
    • I added steps for Staging and/or Production testing in the QA steps section
    • I added steps to cover failure scenarios (i.e. verify an input displays the correct error message if the entered data is not correct)
    • I turned off my network connection and tested it while offline to ensure it matches the expected behavior (i.e. verify the default avatar icon is displayed if app is offline)
    • I tested this PR with a High Traffic account against the staging or production API to ensure there are no regressions (e.g. long loading states that impact usability).
  • I included screenshots or videos for tests on all platforms
  • I ran the tests on all platforms & verified they passed on:
    • Android: Native
    • Android: mWeb Chrome
    • iOS: Native
    • iOS: mWeb Safari
    • MacOS: Chrome / Safari
    • MacOS: Desktop
  • I verified there are no console errors (if there's a console error not related to the PR, report it or open an issue for it to be fixed)
  • I verified there are no new alerts related to the canBeMissing param for useOnyx
  • I followed proper code patterns (see Reviewing the code)
    • I verified that any callback methods that were added or modified are named for what the method does and never what callback they handle (i.e. toggleReport and not onIconClick)
    • I verified that comments were added to code that is not self explanatory
    • I verified that any new or modified comments were clear, correct English, and explained "why" the code was doing something instead of only explaining "what" the code was doing.
    • I verified any copy / text shown in the product is localized by adding it to src/languages/* files and using the translation method
      • If any non-english text was added/modified, I used JaimeGPT to get English > Spanish translation. I then posted it in #expensify-open-source and it was approved by an internal Expensify engineer. Link to Slack message:
    • I verified all numbers, amounts, dates and phone numbers shown in the product are using the localization methods
    • I verified any copy / text that was added to the app is grammatically correct in English. It adheres to proper capitalization guidelines (note: only the first word of header/labels should be capitalized), and is either coming verbatim from figma or has been approved by marketing (in order to get marketing approval, ask the Bug Zero team member to add the Waiting for copy label to the issue)
    • I verified proper file naming conventions were followed for any new files or renamed files. All non-platform specific files are named after what they export and are not named "index.js". All platform-specific files are named for the platform the code supports as outlined in the README.
    • I verified the JSDocs style guidelines (in STYLE.md) were followed
  • If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
  • I followed the guidelines as stated in the Review Guidelines
  • I tested other components that can be impacted by my changes (i.e. if the PR modifies a shared library or component like Avatar, I verified the components using Avatar are working as expected)
  • I verified all code is DRY (the PR doesn't include any logic written more than once, with the exception of tests)
  • I verified any variables that can be defined as constants (ie. in CONST.ts or at the top of the file that uses the constant) are defined as such
  • I verified that if a function's arguments changed that all usages have also been updated correctly
  • If any new file was added I verified that:
    • The file has a description of what it does and/or why is needed at the top of the file if the code is not self explanatory
  • If a new CSS style is added I verified that:
    • A similar style doesn't already exist
    • The style can't be created with an existing StyleUtils function (i.e. StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))
  • If the PR modifies code that runs when editing or sending messages, I tested and verified there is no unexpected behavior for all supported markdown - URLs, single line code, code blocks, quotes, headings, bold, strikethrough, and italic.
  • If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App (i.e. if a shared library or component like Avatar is modified, I verified that Avatar is working as expected in all cases)
  • If the PR modifies a component related to any of the existing Storybook stories, I tested and verified all stories for that component are still working as expected.
  • If the PR modifies a component or page that can be accessed by a direct deeplink, I verified that the code functions as expected when the deeplink is used - from a logged in and logged out account.
  • If the PR modifies the UI (e.g. new buttons, new UI components, changing the padding/spacing/sizing, moving components, etc) or modifies the form input styles:
    • I verified that all the inputs inside a form are aligned with each other.
    • I added Design label and/or tagged @Expensify/design so the design team can review the changes.
  • If a new page is added, I verified it's using the ScrollView component to make it scrollable when more elements are added to the page.
  • I added unit tests for any new feature or bug fix in this PR to help automatically prevent regressions in this user flow.
  • If the main branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to the Test steps.

Screenshots/Videos

Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
MacOS: Desktop

@hungvu193 hungvu193 marked this pull request as ready for review June 30, 2025 16:10
@hungvu193 hungvu193 requested review from a team as code owners June 30, 2025 16:10
@melvin-bot melvin-bot bot requested a review from akinwale June 30, 2025 16:10
@melvin-bot
Copy link

melvin-bot bot commented Jun 30, 2025

@akinwale 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]

@melvin-bot melvin-bot bot removed the request for review from a team June 30, 2025 16:10
Copy link
Contributor

@luacmartins luacmartins left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@luacmartins luacmartins changed the title Revert standardize pay button [CP Staging] Revert standardize pay button Jun 30, 2025
@luacmartins luacmartins merged commit eb820c4 into Expensify:main Jun 30, 2025
21 of 22 checks passed
@OSBotify OSBotify added the CP Staging marks PRs that have been CP'd to staging label Jun 30, 2025
@OSBotify
Copy link
Contributor

✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release.

puneetlath pushed a commit that referenced this pull request Jun 30, 2025
[CP Staging] Revert standardize pay button

(cherry picked from commit eb820c4)

(cherry-picked to staging by puneetlath)
luacmartins added a commit that referenced this pull request Jun 30, 2025
…979396577-1

🍒 Cherry pick PR #65192 to staging 🍒
@github-actions
Copy link
Contributor

🚀 Cherry-picked to staging by https://github.com/luacmartins in version: 9.1.72-6 🚀

platform result
🖥 desktop 🖥 success ✅
🕸 web 🕸 success ✅
🤖 android 🤖 success ✅
🍎 iOS 🍎 success ✅

@Expensify/applauseleads please QA this PR and check it off on the deploy checklist if it passes.

@github-actions
Copy link
Contributor

🚀 Cherry-picked to staging by https://github.com/luacmartins in version: 9.1.72-10 🚀

platform result
🖥 desktop 🖥 success ✅
🕸 web 🕸 success ✅
🤖 android 🤖 cancelled 🔪
🍎 iOS 🍎 cancelled 🔪

@Expensify/applauseleads please QA this PR and check it off on the deploy checklist if it passes.

@github-actions
Copy link
Contributor

🚀 Deployed to production by https://github.com/puneetlath in version: 9.1.72-10 🚀

platform result
🖥 desktop 🖥 success ✅
🕸 web 🕸 success ✅
🤖 android 🤖 failure ❌
🍎 iOS 🍎 failure ❌

@ikevin127
Copy link
Contributor

Caution

FOLLOW-UP PR REQUIRED

Just noticed that a 1-line change from this PR (#64097) I authored, which fixed this issue (see OP for details) was essentially reverted by this revert PR which added withoutOverlay here (line 235), because the revert recipient PR (line 241) author did not sync with main before merge (to be up to date with changes introduced by the PR I authored), leading this revert PR's author to falsely add withoutOverlay back, reverting 1 of this issue's cases (OP one) to previous behaviour.

🔗 Fault chain

  • @getusha (revert recipient PR author) for not syncing with main before merge
  • @hungvu193 (revert PR author) for not checking if the prop is actually there on the main branch before adding it (since the revert recipient PR did not actually remove the prop)

As the author of the PR that removed withoutOverlay, I humbly ask either one of you to open a follow-up PR as soon as possible to remove the withoutOverlay prop from the src/components/ButtonWithDropdownMenu/index.tsx component in order to resolve the collateral regression caused by this unfortunate chain of events.

cc @luacmartins @grgia for context

@hungvu193
Copy link
Contributor Author

@getusha has opened #65296, it's closed to merge and already removed withoutOverlay. May be we should wait for it?

@ikevin127
Copy link
Contributor

@getusha has opened #65296, it's closed to merge and already removed withoutOverlay. May be we should wait for it?

Note

Noting that the other PR (which was reverted here) took 4 months and 11 days from open to merged.

If @JmillsExpensify and @dangrous (from the other issue) are fine with that (posted comment on the issue) and we (author/reviewer) will be getting our payments for the issue on time (2025-07-07) then I have no problem with however long the wait will be to address the issue.

@joekaufmanexpensify
Copy link
Contributor

Thanks for flagging this @ikevin127. Yeah, if the close-to-merge fix PR resolves the inadvertent overlay issue too, then waiting a few days for it seems fine to me. I don't think we'd need to delay payment on it, as it was nothing you did.

@dangrous
Copy link
Contributor

dangrous commented Jul 3, 2025

yep that makes sense to me as well!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CP Staging marks PRs that have been CP'd to staging

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants