Skip to content

[Due for payment 2025-03-10] [$250] Cards - No space between last selection and next button #56963

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

Closed
2 of 8 tasks
lanitochka17 opened this issue Feb 17, 2025 · 23 comments
Closed
2 of 8 tasks
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor

Comments

@lanitochka17
Copy link

lanitochka17 commented Feb 17, 2025

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


Version Number: 9.0.99-0
Reproducible in staging?: Y
Reproducible in production?: Y
If this was caught on HybridApp, is this reproducible on New Expensify Standalone?: Y
If this was caught during regression testing, add the test name, ID and link from TestRail: N/A
Issue reported by: Applause - Internal Team

Action Performed:

  1. Launch app
  2. Login as [email protected]
  3. Go to workspace settings - company card test do not delete
  4. Tap expensify card- issue card
  5. Select a user
  6. Tap back and note user is not shown as selected
  7. Tap company card - assign card
  8. Select a last user
  9. Note here page design is different with next button and no space between last user and next button.
  10. Tap next
  11. Select last card in list
  12. Note no space between last card and next button
  13. Tap back button
  14. User remains selected

Expected Result:

Issue card and assign card selecting member design must be consistent. There must be space between last selection and next button

Actual Result:

Issue card and assign card selecting member design is inconsistent. No space between last selection and next button

Workaround:

Unknown

Platforms:

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

  • Android: Standalone
  • Android: HybridApp
  • Android: mWeb Chrome
  • iOS: Standalone
  • iOS: HybridApp
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Add any screenshot/video evidence
Bug6745932_1739812109269.Screenrecorder-2025-02-17-22-27-00-709.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021892535268930867316
  • Upwork Job ID: 1892535268930867316
  • Last Price Increase: 2025-02-20
  • Automatic offers:
    • linhvovan29546 | Contributor | 106258006
Issue OwnerCurrent Issue Owner: @dylanexpensify
@lanitochka17 lanitochka17 added Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 labels Feb 17, 2025
Copy link

melvin-bot bot commented Feb 17, 2025

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

@nkdengineer
Copy link
Contributor

nkdengineer commented Feb 17, 2025

🚨 Edited by proposal-police: This proposal was edited at 2025-02-17 18:00:04 UTC.

Proposal

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

Issue card and assign card selecting member design is inconsistent. No space between last selection and next button

What is the root cause of that problem?

We are not adding margin bottom to this selection list or adding margin top to confirm button

<SelectionList
textInputLabel={textInputLabel}
textInputValue={searchTerm}
onChangeText={setSearchTerm}
sections={sections}
headerMessage={headerMessage}
ListItem={UserListItem}
onSelectRow={selectMember}
initiallyFocusedOptionKey={selectedMember}
shouldUpdateFocusedIndex
/>
<FormAlertWithSubmitButton
buttonText={translate(isEditing ? 'common.confirm' : 'common.next')}
onSubmit={submit}
isAlertVisible={shouldShowError}
containerStyles={styles.ph5}
message={translate('common.error.pleaseSelectOne')}
buttonStyles={styles.mb5}
/>

<FormAlertWithSubmitButton
buttonText={translate(isEditing ? 'common.confirm' : 'common.next')}
onSubmit={submit}
isAlertVisible={shouldShowError}
containerStyles={styles.ph5}
message={translate('common.error.pleaseSelectOne')}
buttonStyles={styles.mb5}
/>

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

We can add styles.mt5 to confirm button like we did with SelectBankStep

<FormAlertWithSubmitButton
buttonText={translate(isEditing ? 'common.confirm' : 'common.next')}
onSubmit={submit}
isAlertVisible={shouldShowError}
containerStyles={styles.ph5}
message={translate('common.error.pleaseSelectOne')}
buttonStyles={styles.mb5}
/>

<FormAlertWithSubmitButton
buttonText={translate(isEditing ? 'common.confirm' : 'common.next')}
onSubmit={submit}
isAlertVisible={shouldShowError}
containerStyles={styles.ph5}
message={translate('common.error.pleaseSelectOne')}
buttonStyles={styles.mb5}
/>

Or we can add styles.mb5 for selectionList above

Note: some minor styles can be discuss in PR phase

What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?

None

What alternative solutions did you explore? (Optional)

NA

Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job.

@linhvovan29546
Copy link
Contributor

Proposal

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

Cards - No space between last selection and next button

What is the root cause of that problem?

There is no spacing above the confirm button, causing the last item in the list and the confirm button to appear too close together.

<SelectionList
textInputLabel={textInputLabel}
textInputValue={searchTerm}
onChangeText={setSearchTerm}
sections={sections}
headerMessage={headerMessage}
ListItem={UserListItem}
onSelectRow={selectMember}
initiallyFocusedOptionKey={selectedMember}
shouldUpdateFocusedIndex
/>
<FormAlertWithSubmitButton
buttonText={translate(isEditing ? 'common.confirm' : 'common.next')}
onSubmit={submit}
isAlertVisible={shouldShowError}
containerStyles={styles.ph5}
message={translate('common.error.pleaseSelectOne')}
buttonStyles={styles.mb5}
/>

<>
<SelectionList
sections={[{data: searchedListOptions}]}
headerMessage={searchedListOptions.length ? undefined : translate('common.noResultsFound')}
shouldShowTextInput={cardListOptions.length > CONST.COMPANY_CARDS.CARD_LIST_THRESHOLD}
textInputLabel={translate('common.search')}
textInputValue={searchText}
onChangeText={setSearchText}
ListItem={RadioListItem}
onSelectRow={({value}) => handleSelectCard(value)}
initiallyFocusedOptionKey={cardSelected}
listHeaderContent={
<View>
<View style={[styles.ph5, styles.mb5, styles.mt3, {height: CONST.BANK_ACCOUNT.STEPS_HEADER_HEIGHT}]}>
<InteractiveStepSubHeader
startStepIndex={1}
stepNames={CONST.COMPANY_CARD.STEP_NAMES}
/>
</View>
<Text style={[styles.textHeadlineLineHeightXXL, styles.ph5, styles.mt3]}>{translate('workspace.companyCards.chooseCard')}</Text>
<Text style={[styles.textSupporting, styles.ph5, styles.mv3]}>
{translate('workspace.companyCards.chooseCardFor', {
assignee: assigneeDisplayName,
feed: getBankName(feed),
})}
</Text>
</View>
}
shouldShowTextInputAfterHeader
shouldShowHeaderMessageAfterHeader
includeSafeAreaPaddingBottom={false}
shouldShowListEmptyContent={false}
shouldUpdateFocusedIndex
/>
<FormAlertWithSubmitButton
buttonText={translate(isEditing ? 'common.confirm' : 'common.next')}
onSubmit={submit}
isAlertVisible={shouldShowError}
containerStyles={styles.ph5}
message={translate('common.error.pleaseSelectOne')}
buttonStyles={styles.mb5}
/>
</>

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

We should add a margin top to the containerStyles of the confirm button. Note: The margin top should only be added when there is no error message, as the error message already has its own spacing.

<FormAlertWithSubmitButton
buttonText={translate(isEditing ? 'common.confirm' : 'common.next')}
onSubmit={submit}
isAlertVisible={shouldShowError}
containerStyles={styles.ph5}
message={translate('common.error.pleaseSelectOne')}
buttonStyles={styles.mb5}
/>

                     containerStyles={[styles.ph5, !shouldShowError && styles.mt5]}

<FormAlertWithSubmitButton
buttonText={translate(isEditing ? 'common.confirm' : 'common.next')}
onSubmit={submit}
isAlertVisible={shouldShowError}
containerStyles={styles.ph5}
message={translate('common.error.pleaseSelectOne')}
buttonStyles={styles.mb5}
/>

                    containerStyles={[styles.ph5, !shouldShowError && styles.mt5]}

What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?

N/A, UI bug

What alternative solutions did you explore? (Optional)

We can add !shouldShowError && styles.mt5 to buttonStyles instead containerStyles

@dylanexpensify
Copy link
Contributor

@lanitochka17 is this only with a tester account?

@dylanexpensify dylanexpensify added the External Added to denote the issue can be worked on by a contributor label Feb 20, 2025
@melvin-bot melvin-bot bot changed the title Cards - No space between last selection and next button [$250] Cards - No space between last selection and next button Feb 20, 2025
Copy link

melvin-bot bot commented Feb 20, 2025

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

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Feb 20, 2025
Copy link

melvin-bot bot commented Feb 20, 2025

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

@lanitochka17
Copy link
Author

@dylanexpensify This issue occurs with two more testers

screen-20250217-193743.mp4

@ahmedGaber93
Copy link
Contributor

@nkdengineer @linhvovan29546 are you able to add a company cards? If yes, please let me know the steps?

Image

@linhvovan29546
Copy link
Contributor

I'm mocking data and updating the code to force these pages to display.

@nkdengineer
Copy link
Contributor

nkdengineer commented Feb 21, 2025

@ahmedGaber93 you can add more members to that workspace and hard code isDisabled here to false

isDisabled={!currentFeedData || !!currentFeedData?.pending || isSelectedFeedConnectionBroken}

Note: the main idea to fix OP bug is to add margin-top to the 2 positions that I mentioned in the proposal. Other minor styles can be discussed in PR phase.

@ahmedGaber93
Copy link
Contributor

Thanks both for help 🙏

@ahmedGaber93
Copy link
Contributor

Thanks all for the proposal.

The both proposal suggest adding margin top for FormAlertWithSubmitButton, but @linhvovan29546 highlighted a good case when the error message is displayed, it already has its own spacing and no need to add extra margin in this case.

@linhvovan29546's proposal by adding conditionally margin top when no error displayed LGTM!

🎀 👀 🎀 C+ reviewed

Copy link

melvin-bot bot commented Feb 23, 2025

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

@melvin-bot melvin-bot bot removed the Help Wanted Apply this label when an issue is open to proposals by contributors label Feb 24, 2025
Copy link

melvin-bot bot commented Feb 24, 2025

📣 @linhvovan29546 🎉 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 melvin-bot bot added Reviewing Has a PR in review Weekly KSv2 and removed Daily KSv2 labels Feb 25, 2025
@linhvovan29546
Copy link
Contributor

PR is ready for review!

@melvin-bot melvin-bot bot removed the Weekly KSv2 label Mar 3, 2025
@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production labels Mar 3, 2025
@melvin-bot melvin-bot bot changed the title [$250] Cards - No space between last selection and next button [Due for payment 2025-03-10] [$250] Cards - No space between last selection and next button Mar 3, 2025
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Mar 3, 2025
Copy link

melvin-bot bot commented Mar 3, 2025

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

Copy link

melvin-bot bot commented Mar 3, 2025

The solution for this issue has been 🚀 deployed to production 🚀 in version 9.1.7-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 2025-03-10. 🎊

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

Copy link

melvin-bot bot commented Mar 3, 2025

@ahmedGaber93 @dylanexpensify @ahmedGaber93 The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]

@dylanexpensify
Copy link
Contributor

Nice! Coming up!

@ahmedGaber93
Copy link
Contributor

ahmedGaber93 commented Mar 5, 2025

BugZero Checklist:

  • [Contributor] Classify the bug:
Bug classification

Source of bug:

  • 1a. Result of the original design (eg. a case wasn't considered)
  • 1b. Mistake during implementation
  • 1c. Backend bug
  • 1z. Other:

Where bug was reported:

  • 2a. Reported on production (eg. bug slipped through the normal regression and PR testing process on staging)
  • 2b. Reported on staging (eg. found during regression or PR testing)
  • 2d. Reported on a PR
  • 2z. Other:

Who reported the bug:

  • 3a. Expensify user
  • 3b. Expensify employee
  • 3c. Contributor
  • 3d. QA
  • 3z. Other: Applause - Internal Team
  • [Contributor] 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/48278/files#r1981283082

  • [Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source 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: N/A

  • [Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again.

No need for regression test here, it is simple UI fix.

@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 labels Mar 10, 2025
@dylanexpensify
Copy link
Contributor

Paying today!

@dylanexpensify
Copy link
Contributor

Payment summary:

Contributor: @linhvovan29546 $250 via Upwork
Contributor+: @ahmedGaber93 $250 via NewDot

Please apply/request!

@JmillsExpensify
Copy link

$250 approved for @ahmedGaber93

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 External Added to denote the issue can be worked on by a contributor
Projects
None yet
Development

No branches or pull requests

7 participants