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-02-07] [$125] IOU - The selected category moves to the top of the list when <8 categories active #34018

Closed
6 tasks done
lanitochka17 opened this issue Jan 5, 2024 · 36 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

@lanitochka17
Copy link

lanitochka17 commented Jan 5, 2024

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: 1.4.22-0
Reproducible in staging?: Y
Reproducible in production?: N
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:

Preconditions:
In OldDot under admin, create a Collect group policy, enable categories and add 3 categories, add an employee to the policy.

  1. Open New Expensify app
  2. Log in to the employee's account
  3. Tap on the green plus button (FAB)
  4. Select Request money
  5. Select any currency and amount
  6. Click next
  7. Choose a group policy room
  8. Click on "Show more"
  9. In the category section, select the category at the bottom of the list
  10. Navigate to the categories section again

Expected Result:

The selected category must remain in its place in alphabetical order

Actual Result:

The selected category moves to the top of the list when <8 categories active

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

Bug6332919_1704440244489.Recording__1022.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01cd8814b702406217
  • Upwork Job ID: 1746949913490251776
  • Last Price Increase: 2024-01-15
  • Automatic offers:
    • akinwale | Reviewer | 28111782
    • bernhardoj | Contributor | 28111783
@lanitochka17 lanitochka17 added the DeployBlockerCash This issue or pull request should block deployment label Jan 5, 2024
Copy link
Contributor

github-actions bot commented Jan 5, 2024

👋 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.

Copy link

melvin-bot bot commented Jan 5, 2024

Triggered auto assignment to @youssef-lr (Engineering), see https://stackoverflow.com/c/expensify/questions/4319 for more details.

@lanitochka17
Copy link
Author

Production:

Recording.1023.mp4

@youssef-lr youssef-lr added Daily KSv2 and removed DeployBlockerCash This issue or pull request should block deployment Hourly KSv2 labels Jan 5, 2024
@youssef-lr
Copy link
Contributor

Removing blocker, this is a minor bug.

@youssef-lr youssef-lr added Help Wanted Apply this label when an issue is open to proposals by contributors Bug Something is broken. Auto assigns a BugZero manager. labels Jan 5, 2024
Copy link

melvin-bot bot commented Jan 5, 2024

Triggered auto assignment to @muttmuure (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.

@youssef-lr youssef-lr changed the title IOU - The selected category moves to the top of the list when <8 categories active [$125] IOU - The selected category moves to the top of the list when <8 categories active Jan 5, 2024
Copy link

melvin-bot bot commented Jan 5, 2024

Bug0 Triage Checklist (Main S/O)

  • This "bug" occurs on a supported platform (ensure Platforms in OP are ✅)
  • This bug is not a duplicate report (check E/App issues and #expensify-bugs)
    • If it is, comment with a link to the original report, close the issue and add any novel details to the original issue instead
  • This bug is reproducible using the reproduction steps in the OP. S/O
    • If the reproduction steps are clear and you're unable to reproduce the bug, check with the reporter and QA first, then close the issue.
    • If the reproduction steps aren't clear and you determine the correct steps, please update the OP.
  • This issue is filled out as thoroughly and clearly as possible
    • Pay special attention to the title, results, platforms where the bug occurs, and if the bug happens on staging/production.
  • I have reviewed and subscribed to the linked Slack conversation to ensure Slack/Github stay in sync

Copy link

melvin-bot bot commented Jan 5, 2024

⚠️ Could not update price automatically because there is no linked Upwork Job ID. The BZ team member will need to update the price manually in Upwork.

@shubham1206agra
Copy link
Contributor

Let me mark the offending PR here #29901
cc @aimane-chnaif

@njmulsqb
Copy link

njmulsqb commented Jan 5, 2024

I am not getting this "category" section even
image

@aimane-chnaif
Copy link
Contributor

Why is this bug? It's aligned with the behavior when >8 categories

@njmulsqb
Copy link

njmulsqb commented Jan 5, 2024

Proposal

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

The selected option gets the first position in the category list and breaks the alphabetical order.

What is the root cause of that problem?

We are passing the 0th index to "Options Selector" component and each time it focuses the first item in the list, since at the same time we're passing initiallyFocusedOptionKey the currently selected option, because of 0th index it moves to the top.

<OptionsSelector
optionHoveredStyle={styles.hoveredComponentBG}
sectionHeaderStyle={styles.mt5}
sections={sections}
selectedOptions={selectedOptions}
// Focus the first option when searching
focusedIndex={0}
// Focus the selected option on first load
initiallyFocusedOptionKey={selectedOptionKey}
headerMessage={headerMessage}
shouldShowTextInput={shouldShowTextInput}
textInputLabel={translate('common.search')}
boldStyle
highlightSelectedOptions
isRowMultilineSupported
onChangeText={setSearchValue}
onSelectRow={onSubmit}
/>
);

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

We need to modify the attributes passed to this component and remove the hard-coded 0th index focus

Note: I still can't see the category section in my web portal, but I checked the code and found this solution. Let me know if some specific configuration is required to see categories in UI.

@melvin-bot melvin-bot bot added the Overdue label Jan 8, 2024
Copy link

melvin-bot bot commented Jan 8, 2024

@youssef-lr, @muttmuure Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

@muttmuure
Copy link
Contributor

Asked about expected behavior here: https://expensify.slack.com/archives/C02MW39LT9N/p1704741107302739

@melvin-bot melvin-bot bot removed the Overdue label Jan 8, 2024
@muttmuure
Copy link
Contributor

We think that this is expected.

@muttmuure muttmuure reopened this Jan 9, 2024
@melvin-bot melvin-bot bot removed the Overdue label Jan 17, 2024
@akinwale
Copy link
Contributor

akinwale commented Jan 18, 2024

We can move forward with @bernhardoj's proposal.

🎀👀🎀 C+ reviewed.

Copy link

melvin-bot bot commented Jan 18, 2024

Current assignee @youssef-lr is eligible for the choreEngineerContributorManagement assigner, not assigning anyone new.

Copy link

melvin-bot bot commented Jan 19, 2024

@akinwale @youssef-lr @muttmuure this issue was created 2 weeks ago. Are we close to approving a proposal? If not, what's blocking us from getting this issue assigned? Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks!

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

melvin-bot bot commented Jan 20, 2024

📣 @akinwale 🎉 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 Jan 20, 2024

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

@bernhardoj
Copy link
Contributor

PR is ready

cc: @akinwale

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Weekly KSv2 labels Jan 31, 2024
@melvin-bot melvin-bot bot changed the title [$125] IOU - The selected category moves to the top of the list when <8 categories active [HOLD for payment 2024-02-07] [$125] IOU - The selected category moves to the top of the list when <8 categories active Jan 31, 2024
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Jan 31, 2024
Copy link

melvin-bot bot commented Jan 31, 2024

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

Copy link

melvin-bot bot commented Jan 31, 2024

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.34-1 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-02-07. 🎊

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

Copy link

melvin-bot bot commented Jan 31, 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:

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

@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 labels Feb 7, 2024
@muttmuure
Copy link
Contributor

All paid up.

I do think we might need a regression test here

@akinwale
Copy link
Contributor

  • [@akinwale] The PR that introduced the bug has been identified. Link to the PR:
  • [@akinwale] 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:
  • [@akinwale] 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:

This is a specific case which was not considered nor handled when #32902 was implemented.

  • [@akinwale] Determine if we should create a regression test for this bug.
  • [@akinwale] 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 Steps

  1. Launch the Expensify app
  2. Log in as an employee that is a member of a Collect or Control workspace
  3. Open the global create menu and select Request money
  4. Enter any amount
  5. Click next
  6. Select any Collect or Control policy room that has less than 8 categories configured
  7. Click "Show more"
  8. Click Category
  9. Select any category
  10. Open the category page again
  11. Verify that the selected category remains in the same position
  12. Repeat steps 6 through 10 with a Collect or Control policy room that has more than 8 categories configured
  13. Verify that the selected category is at the top

Do we agree 👍 or 👎?

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
None yet
Development

No branches or pull requests

8 participants