-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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-04-05] [$500] Category - Recent and All sections appear when selected category is invalid with <8 categories #37766
Comments
👋 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:
|
Triggered auto assignment to @luacmartins ( |
We think that this bug might be related to #wave6 |
@luacmartins 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 |
ProposalPlease re-state the problem that we are trying to solve in this issue.Category - Recent and All sections appear when selected category is invalid with <8 categories What is the root cause of that problem?We include App/src/libs/OptionsListUtils.ts Lines 998 to 1009 in 5199604
What changes do you think we should make in order to solve the problem?We should subtract number of disabled selected option from const selectedOptionNames = selectedOptions.map((selectedOption) => selectedOption.name);
const disabledSelectedOptionLength = selectedOptions.filter((selectedOption) => !selectedOption.enabled).length;
const enabledAndSelectedCategories = [...selectedOptions, ...sortedCategories.filter((category) => category.enabled && !selectedOptionNames.includes(category.name))];
const numberOfVisibleCategories = enabledAndSelectedCategories.length - disabledSelectedOptionLength;
if (numberOfVisibleCategories < CONST.CATEGORY_LIST_THRESHOLD) {
categorySections.push({
// "All" section when items amount less than the threshold
title: '',
shouldShow: false,
indexOffset,
data: getCategoryOptionTree(enabledAndSelectedCategories),
});
return categorySections;
} We might need to do the same for Tags or other similar fields. ResultAlternativeWe can use App/src/libs/OptionsListUtils.ts Line 963 in 2faffcd
|
I'm unable to reproduce this issue on staging. See video below: Screen.Recording.2024-03-05.at.1.58.39.PM.mov |
Triggered auto assignment to @johncschuster ( |
Applying the |
@johncschuster , i think you are trying this on new IOU request, can you try this on previous IOU request as stated in the bug description, this should then be visible on your side as well :) Also disable the exact category which is currently selected |
ProposalPlease re-state the problem that we are trying to solve in this issue.Recent and All sections appear when selected category is invalid with <8 categories What is the root cause of that problem?This is an edge case, if the options are 8 and we disable the selected option itself then though the available options are 7 but since the disabled option is still selected, it will diplay us the App/src/libs/OptionsListUtils.ts Line 999 in 5199604
App/src/libs/OptionsListUtils.ts Line 1000 in 5199604
The following condition will not hold true as even the disabled tag is considered as enabled: App/src/libs/OptionsListUtils.ts Line 1002 in 5199604
What changes do you think we should make in order to solve the problem?Actually we need to redefine const numberOfVisibleCategories = ([...sortedCategories.filter((category) => category.enabled]).length; This will give us right results for the below condition: App/src/libs/OptionsListUtils.ts Lines 1002 to 1004 in 5199604
App/src/libs/OptionsListUtils.ts Line 1008 in 5199604
What alternative solutions did you explore? (Optional)As we already have if (enabledCategories.length < CONST.CATEGORY_LIST_THRESHOLD) {
categorySections.push({ |
@johncschuster, @luacmartins Eep! 4 days overdue now. Issues have feelings too... |
Job added to Upwork: https://www.upwork.com/jobs/~01c18a41a21d81a420 |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @allroundexperts ( |
|
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.57-5 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-04-05. 🎊 For reference, here are some details about the assignees on this issue:
|
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:
|
@johncschuster, friendly bump for payments process :) |
Payment Summary:C+ Review: @allroundexperts - $500 via Manual Requests |
(Leaving open until the BZ checklist is complete) |
Payment Summary
BugZero Checklist (@johncschuster)
|
I changed the amount owed to $500, as this issue was created prior to the effective date of the new payment structure (announcement) |
@johncschuster, the summary says I have been paid, but I haven't received the payment yet. Just pointing this out in case there is any confusion. I just accepted the new offer. |
@johncschuster, bump for payments 🙇🏻 |
@johncschuster, @luacmartins, @allroundexperts, @Krishna2323 Uh oh! This issue is overdue by 2 days. Don't forget to update your issues! |
Sorry I missed your ping, @Krishna2323! The note above wasn't meant to say you were already paid – it was meant to mean that the method by which you would be paid is through Upwork. I've just issued payment now! 🎉 |
@allroundexperts can you complete the BZ Checklist above? Thank you! |
Checklist
|
$500 approved for @allroundexperts |
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: 1.4.47-2
Reproducible in staging?: Y
Reproducible in production?: N
If this was caught during regression testing, add the test name, ID and link from TestRail: https://expensify.testrail.io/index.php?/tests/view/4381056
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:
Expected Result:
Since there is now less than 8 categories, the category list will not show search field, Recent and All sections
Actual Result:
Although there is less than 8 categories, the category list still shows Recent and All sections
When employee selects another category and reopens the list, the sections are gone
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
Add any screenshot/video evidence
Bug6402931_1709651644885.20240305_180506.mp4
View all open jobs on GitHub
Upwork Automation - Do Not Edit
The text was updated successfully, but these errors were encountered: