Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[HOLD for payment 2024-08-14] [$125][Payment card / Subscription] - No spacing between "Add payment card" and "Request early cancellation" button #46180

Closed
4 of 6 tasks
m-natarajan opened this issue Jul 25, 2024 · 35 comments
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 Engineering External Added to denote the issue can be worked on by a contributor

Comments

@m-natarajan
Copy link

m-natarajan commented Jul 25, 2024

If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!


Issue found validating #44763
Version Number: 9.0.12-0
Reproducible in staging?: y
Reproducible in production?: no, not able to check the feature
If this was caught during regression testing, add the test name, ID and link from TestRail:
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Expensify/Expensify Issue URL:
Issue reported by: applause internal team
Slack conversation:

Action Performed:

Precondition:

  • Account has collect workspace with an annual subscription.
  1. Go to staging.new.expensify.com
  2. Go to Subscription.
  3. Long click on "Request early cancellation" button.

Expected Result:

There will be spacing between "Add payment card" and "Request early cancellation" button.

Actual Result:

There is no spacing between "Add payment card" and "Request early cancellation" button.

Workaround:

unknown

Platforms:

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

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

Screenshots/Videos

Add any screenshot/video evidence
Bug6552300_1721888335003!PR_result

Bug6552300_1721888335021.20240725_141515.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~0186c94058bc49c730
  • Upwork Job ID: 1816471263631591362
  • Last Price Increase: 2024-07-25
  • Automatic offers:
    • c3024 | Reviewer | 103355027
    • nkdengineer | Contributor | 103355030
Issue OwnerCurrent Issue Owner: @twisterdotcom
@m-natarajan m-natarajan added DeployBlockerCash This issue or pull request should block deployment Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. DeployBlocker Indicates it should block deploying the API labels Jul 25, 2024
Copy link

melvin-bot bot commented Jul 25, 2024

Triggered auto assignment to @cristipaval (DeployBlockerCash), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.

Copy link

melvin-bot bot commented Jul 25, 2024

Triggered auto assignment to @twisterdotcom (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.

@github-actions github-actions bot added Engineering Hourly KSv2 and removed Daily KSv2 labels Jul 25, 2024
Copy link
Contributor

👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:

  1. Identify the pull request that introduced this issue and revert it.
  2. Find someone who can quickly fix the issue.
  3. Fix the issue yourself.

@etCoderDysto
Copy link
Contributor

etCoderDysto commented Jul 25, 2024

Proposal

Offending PR #44763

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

No spacing between "Add payment card" and "Request early cancellation" button

What is the root cause of that problem?

We are not adding niether margin top for Request early cancellation nor margin bottom for Add payment card button

<MenuItem
title={translate('subscription.requestEarlyCancellation.title')}
icon={Expensicons.CalendarSolid}
iconFill={theme.success}
shouldShowRightIcon
wrapperStyle={styles.sectionMenuItemTopDescription}

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

add margin top for Request early cancellation

wrapperStyle={[styles.sectionMenuItemTopDescription, styles.mt2]}

What alternative solutions did you explore? (Optional)

Add margin bottom to Add payment card button

style={[styles.w100, styles.mb2]}

<Button
text={translate('subscription.cardSection.addCardButton')}
onPress={openAddPaymentCardScreen}
style={styles.w100}

@etCoderDysto
Copy link
Contributor

Offending PR #44763

@nkdengineer
Copy link
Contributor

nkdengineer commented Jul 25, 2024

Proposal

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

There is no spacing between "Add payment card" and "Request early cancellation" button.

What is the root cause of that problem?

We have a margin-bottom style here to add a space between these menuItems and the card button. But this item is not always displayed and then when it's not displayed, there is no space between menuItem and the card button.

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

We should remove the margin-top style here and wrap CardSectionDataEmpty in a view with style mb5

{isEmptyObject(defaultCard?.accountData) && <CardSectionDataEmpty />}

What alternative solutions did you explore? (Optional)

Or we can add mt5 style for the second menu item if the first item isn't displayed and add mt5 style for the third menu item if both the first and the second item are not displayed.

@cristipaval
Copy link
Contributor

Demoting it

@cristipaval
Copy link
Contributor

Making it a $125 issue as it is a super simple visual thing

@cristipaval cristipaval added External Added to denote the issue can be worked on by a contributor Daily KSv2 and removed DeployBlockerCash This issue or pull request should block deployment DeployBlocker Indicates it should block deploying the API Hourly KSv2 labels Jul 25, 2024
@melvin-bot melvin-bot bot changed the title Subscription - No spacing between "Add payment card" and "Request early cancellation" button [$250] Subscription - No spacing between "Add payment card" and "Request early cancellation" button Jul 25, 2024
Copy link

melvin-bot bot commented Jul 25, 2024

Job added to Upwork: https://www.upwork.com/jobs/~0186c94058bc49c730

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Jul 25, 2024
Copy link

melvin-bot bot commented Jul 25, 2024

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

@cristipaval cristipaval changed the title [$250] Subscription - No spacing between "Add payment card" and "Request early cancellation" button [$125] Subscription - No spacing between "Add payment card" and "Request early cancellation" button Jul 25, 2024
@c3024
Copy link
Contributor

c3024 commented Aug 1, 2024

@nkdengineer 's proposal here looks good to me.

🎀 👀 🎀 C+ Reviewed

Copy link

melvin-bot bot commented Aug 1, 2024

Current assignee @cristipaval is eligible for the choreEngineerContributorManagement assigner, not assigning anyone new.

@melvin-bot melvin-bot bot removed the Help Wanted Apply this label when an issue is open to proposals by contributors label Aug 1, 2024
Copy link

melvin-bot bot commented Aug 1, 2024

📣 @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

Copy link

melvin-bot bot commented Aug 1, 2024

📣 @nkdengineer 🎉 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 📖

@etCoderDysto
Copy link
Contributor

etCoderDysto commented Aug 1, 2024

@c3024 can you please comment on my propsoal?

@c3024
Copy link
Contributor

c3024 commented Aug 1, 2024

@etCoderDysto

Sorry for not giving clear feedback. Here is why I felt @nkdengineer 's proposal was better.

These three (including RequestEarlyCancellationMenuItem)

{!!account?.hasPurchases && (
<MenuItem
shouldShowRightIcon
icon={Expensicons.History}
wrapperStyle={styles.sectionMenuItemTopDescription}
title={translate('subscription.cardSection.viewPaymentHistory')}
titleStyle={styles.textStrong}
onPress={() => Navigation.navigate(ROUTES.SEARCH_CENTRAL_PANE.getRoute({query: CONST.SEARCH.TAB.EXPENSE.ALL}))}
hoverAndPressStyle={styles.hoveredComponentBG}
style={styles.mt5}
/>
)}
{!!(subscriptionPlan && account?.isEligibleForRefund) && (
<MenuItem
shouldShowRightIcon
icon={Expensicons.Bill}
wrapperStyle={styles.sectionMenuItemTopDescription}
title={translate('subscription.cardSection.requestRefund')}
titleStyle={styles.textStrong}
disabled={isOffline}
onPress={() => setIsRequestRefundModalVisible(true)}
/>
)}
{privateSubscription?.type === CONST.SUBSCRIPTION.TYPE.ANNUAL && <RequestEarlyCancellationMenuItem />}

are menu items and menu items do not have gaps between themselves. A set of menu items is separated from other elements like a button etc.

This is the same pattern used everywhere in the repo.

That is why only the first item has a margin top but others do not. But these menu items render conditionally so the top most menu item may not render. In such cases, there will be no gap between the button and menu item (or set of menu items). This logic was missed in the code.

If we add mt2 to RequestEarlyCancellationMenuItem like you suggested then if either or both of these menu items

{!!account?.hasPurchases && (
<MenuItem
shouldShowRightIcon
icon={Expensicons.History}
wrapperStyle={styles.sectionMenuItemTopDescription}
title={translate('subscription.cardSection.viewPaymentHistory')}
titleStyle={styles.textStrong}
onPress={() => Navigation.navigate(ROUTES.SEARCH_CENTRAL_PANE.getRoute({query: CONST.SEARCH.TAB.EXPENSE.ALL}))}
hoverAndPressStyle={styles.hoveredComponentBG}
style={styles.mt5}
/>
)}
{!!(subscriptionPlan && account?.isEligibleForRefund) && (
<MenuItem
shouldShowRightIcon
icon={Expensicons.Bill}
wrapperStyle={styles.sectionMenuItemTopDescription}
title={translate('subscription.cardSection.requestRefund')}
titleStyle={styles.textStrong}
disabled={isOffline}
onPress={() => setIsRequestRefundModalVisible(true)}
/>
)}

appear, then there will be a undesired 8px gap between these menu item(s) and the RequestEarlyCancellationMenuItem.

@etCoderDysto
Copy link
Contributor

No problem! That makes sense. Thanks for the explanation @c3024 🙌.

@melvin-bot melvin-bot bot added Reviewing Has a PR in review Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Daily KSv2 Weekly KSv2 labels Aug 2, 2024
@melvin-bot melvin-bot bot changed the title [$125][Payment card / Subscription] - No spacing between "Add payment card" and "Request early cancellation" button [HOLD for payment 2024-08-14] [$125][Payment card / Subscription] - No spacing between "Add payment card" and "Request early cancellation" button Aug 7, 2024
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Aug 7, 2024
Copy link

melvin-bot bot commented Aug 7, 2024

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

Copy link

melvin-bot bot commented Aug 7, 2024

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

If no regressions arise, payment will be issued on 2024-08-14. 🎊

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

Copy link

melvin-bot bot commented Aug 7, 2024

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:

  • [@c3024] The PR that introduced the bug has been identified. Link to the PR:
  • [@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:
  • [@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:
  • [@c3024] Determine if we should create a regression test for this bug.
  • [@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.
  • [@twisterdotcom] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:

@melvin-bot melvin-bot bot added Daily KSv2 Overdue and removed Weekly KSv2 labels Aug 14, 2024
@c3024
Copy link
Contributor

c3024 commented Aug 15, 2024

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:

  • [@c3024] The PR that introduced the bug has been identified. Link to the PR: feat: integrate retry billing with backend #44268
  • [@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/pull/44268/files#r1717695800
  • [@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.
  • [@c3024] Determine if we should create a regression test for this bug. Yes
  • [@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. Login with an account with a workspace
  2. Click on Avatar (Account Settings) in the Bottom Bar > Subscriptions on the left pane
  3. Long click on "Request early cancellation" button.
  4. Verify that there is space between "Add payment card" button and "Request early cancellation" menu item.

@twisterdotcom
Copy link
Contributor

Payment Summary:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 Engineering External Added to denote the issue can be worked on by a contributor
Projects
No open projects
Status: Done
Development

No branches or pull requests

9 participants