Expensify / App

Welcome to New Expensify: a complete re-imagination of financial collaboration, centered around chat. Help us build the next generation of Expensify by sharing feedback and contributing to the code.
https://new.expensify.com
MIT License
3.51k stars 2.87k forks source link

[HOLD for payment 2024-08-29] [$125] Expense - Mark as cash and Review duplicates buttons have no spacing between each other #47089

Closed lanitochka17 closed 2 months ago

lanitochka17 commented 2 months ago

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!


Version Number: 9.0.18-2 Reproducible in staging?: Y Reproducible in production?: Y If this was caught during regression testing, add the test name, ID and link from TestRail: https://expensify.testrail.io/index.php?/tests/view/4835412 Email or phone of affected tester (no customers): applausetester+kh050806@applause.expensifail.com Issue reported by: Applause - Internal Team

Action Performed:

  1. Go to staging.new.expensify.com
  2. Log in to applausetester+pendingreceipt@applause.expensifail.com
  3. Submit two same scan receipts that will match with card transaction, or go to https://staging.new.expensify.com/r/4109811016204814
  4. Go to the transaction thread after scanning is complete

Expected Result:

Mark as cash and Review duplicates buttons will have some spacing between each other

Actual Result:

Mark as cash and Review duplicates buttons have no spacing between each other

Workaround:

Unknown

Platforms:

Which of our officially supported platforms is this issue occurring on?

Screenshots/Videos

Add any screenshot/video evidence

https://github.com/user-attachments/assets/045efd17-d96f-43cf-8525-32de753f9104

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~017310aba17e7a4229
  • Upwork Job ID: 1823604679203469131
  • Last Price Increase: 2024-08-14
  • Automatic offers:
    • c3024 | Reviewer | 103524496
    • dominictb | Contributor | 103524500
Issue OwnerCurrent Issue Owner: @kadiealexander
melvin-bot[bot] commented 2 months ago

Triggered auto assignment to @kadiealexander (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.

lanitochka17 commented 2 months ago

@kadiealexander FYI I haven't added the External label as I wasn't 100% sure about this issue. Please take a look and add the label if you agree it's a bug and can be handled by external contributors

lanitochka17 commented 2 months ago

We think that this bug might be related to #wave-collect - Release 1

dominictb commented 2 months ago

Edited by proposal-police: This proposal was edited at 2024-08-09 10:01:49 UTC.

Proposal

Please re-state the problem that we are trying to solve in this issue.

Mark as cash and Review duplicates buttons have no spacing between each other

What is the root cause of that problem?

If shouldUseNarrowLayout is false the mark as cash and review duplicate button doesn't have any spacing

https://github.com/Expensify/App/blob/d406254f3fc58a28c761cd353d4a4ac5cb81b427/src/components/MoneyRequestHeader.tsx#L140-L141

https://github.com/Expensify/App/blob/d406254f3fc58a28c761cd353d4a4ac5cb81b427/src/components/MoneyRequestHeader.tsx#L149-L150

What changes do you think we should make in order to solve the problem?

We can add margin-right style for mark as cash here button or margin-left style for review duplicate here. The spacing can be confirmed by design team, maybe it's 12px

Or we can wrap each button in a View and add the margin style that I mentioned above

OPTIONAL: We can only add the margin style if both button appears

What alternative solutions did you explore? (Optional)

We can wrap two buttons in a View and add gap style in the wrap View as we do here

https://github.com/Expensify/App/blob/e8df1c9039ab090d8a9906f22e6da400bdcbb038/src/components/MoneyReportHeader.tsx#L318-L319

And we also need to wrap these buttons here

https://github.com/Expensify/App/blob/d406254f3fc58a28c761cd353d4a4ac5cb81b427/src/components/MoneyRequestHeader.tsx#L161

https://github.com/Expensify/App/blob/d406254f3fc58a28c761cd353d4a4ac5cb81b427/src/components/MoneyRequestHeader.tsx#L172

https://github.com/Expensify/App/blob/d406254f3fc58a28c761cd353d4a4ac5cb81b427/src/components/MoneyRequestHeader.tsx#L185

dominictb commented 2 months ago

I updated proposal. Add an alternative solution.

melvin-bot[bot] commented 2 months ago

@kadiealexander Eep! 4 days overdue now. Issues have feelings too...

melvin-bot[bot] commented 2 months ago

Job added to Upwork: https://www.upwork.com/jobs/~017310aba17e7a4229

melvin-bot[bot] commented 2 months ago

Triggered auto assignment to Contributor-plus team member for initial proposal review - @c3024 (External)

c3024 commented 2 months ago

We can add margin-right style for mark as cash

When there is only Mark as cash button without the Review duplicates button, the Mark as cash button is shifted by this extra margin which will be consistent.

margin-left style for review duplicate

I think this looks the simplest and fixes it well.

@dominictb 's proposal here looks good to me!

πŸŽ€ πŸ‘€ πŸŽ€ C+ Reviewed

melvin-bot[bot] commented 2 months ago

Triggered auto assignment to @arosiclair, see https://stackoverflow.com/c/expensify/questions/7972 for more details.

arosiclair commented 2 months ago

margin-left style for review duplicate

I think this looks the simplest and fixes it well.

Agreed just use margin-left. spacing.ml1 should be fine.

I'm reducing the bounty on this to $125 since this is just a spacing change.

melvin-bot[bot] commented 2 months ago

Upwork job price has been updated to $125

melvin-bot[bot] commented 2 months ago

πŸ“£ @c3024 πŸŽ‰ An offer has been automatically sent to your Upwork account for the Reviewer role πŸŽ‰ Thanks for contributing to the Expensify app!

Offer link Upwork job

melvin-bot[bot] commented 2 months ago

πŸ“£ @dominictb πŸŽ‰ An offer has been automatically sent to your Upwork account for the Contributor role πŸŽ‰ Thanks for contributing to the Expensify app!

Offer link Upwork job Please accept the offer and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review πŸ§‘β€πŸ’» Keep in mind: Code of Conduct | Contributing πŸ“–

melvin-bot[bot] commented 2 months ago

Reviewing label has been removed, please complete the "BugZero Checklist".

melvin-bot[bot] commented 2 months ago

The solution for this issue has been :rocket: deployed to production :rocket: in version 9.0.23-0 and is now subject to a 7-day regression period :calendar:. Here is the list of pull requests that resolve this issue:

If no regressions arise, payment will be issued on 2024-08-29. :confetti_ball:

For reference, here are some details about the assignees on this issue:

melvin-bot[bot] commented 2 months ago

BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:

kadiealexander commented 2 months ago

@c3024 don't forget about the checklist :)

c3024 commented 2 months ago

BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:

  • [x] [@c3024] The PR that introduced the bug has been identified. Link to the PR: #44025
  • [x] [@c3024] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake. Link to comment: https://github.com/Expensify/App/commit/2528eac0ae335a5ef2a52e16ed40f197b2bf2e61#r146001158
  • [x] [@c3024] A discussion in #expensify-bugs has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner. Link to discussion: No discussion was started because this could not have been identified earlier.
  • [x] [@c3024] Determine if we should create a regression test for this bug. Yes
  • [x] [@c3024] If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again.

Regression test proposal

  1. Submit two scan receipts with same details to a workspace. The scan receipt amount should match with a card transaction
  2. Go to the transaction thread after scanning is complete
  3. Verify that: "Mark as cash" and "Review duplicates" buttons have gap between each other