-
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-09-06] [$250] Report fields - No dropdown button after selecting the list value via checkbox #46911
Comments
Triggered auto assignment to @greg-schroeder ( |
@greg-schroeder 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 |
We think that this bug might be related to #wave-control |
ProposalPlease re-state the problem that we are trying to solve in this issue.Report fields - No dropdown button after selecting the list value via checkbox What is the root cause of that problem?
What changes do you think we should make in order to solve the problem?Use if (!!(isSmallScreenWidth && selectionMode?.isEnabled) || selectedValuesArray.length > 0) { What alternative solutions did you explore? (Optional)The App/src/pages/workspace/reportFields/ReportFieldsListValuesPage.tsx Lines 119 to 123 in 7975157
It should be const toggleAllValues = () => {
const isAllSelected = listValues.every((key) => !!selectedValues[key]);
setSelectedValues(isAllSelected ? {} : Object.fromEntries(listValues.map((value) => [value, true])));
}; |
ProposalPlease re-state the problem that we are trying to solve in this issue.No dropdown button after selecting the list value via checkbox What is the root cause of that problem?Since isSmallScreenWidth and selectionMode?.isEnabled are both false in this case, the condition will also be false.
What changes do you think we should make in order to solve the problem?We expect that
Therefore, we need to update it to be consistent with other pages
There is another issue with the toggle all button 43.mov
This issue is due to an incorrect condition. The selectedValues will include all values, regardless of whether they are selected or not. We need to use selectedValuesArray.length instead of Object.keys(selectedValues).length. |
@greg-schroeder Whoops! This issue is 2 days overdue. Let's get this updated quick! |
Job added to Upwork: https://www.upwork.com/jobs/~019f8aa64e5e051072 |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @ishpaul777 ( |
~Reviewing 👀 ~ Edit: Sorry I had to head out for a while |
@ishpaul777, friendly bump for a review. |
The Orignal issue here is fixed by #46698, but the other issue issue mention in @cretadn22 proposal is still reproducable. We can fix that here. @cretadn22's solution for the other issue looks good to me! 🎀 👀 🎀 C+ reviewed |
Triggered auto assignment to @puneetlath, see https://stackoverflow.com/c/expensify/questions/7972 for more details. |
@ishpaul777, what do you think about my alternative solution? My proposal identified the other issue before the other proposal. |
Your solution is correct but I chose the solution from @cretadn22 because time complexity is O(1) while your solution will have O(n). |
@ishpaul777, I don't think that matters much in this case, the same logic is also used in
|
I'll let assigned CME make the final call on assignment |
@ishpaul777, even if we consider performance, my solution is generally better in performance. Just wanted to note it down because I had a doubt about that. Also the time complexity is O(m) not O(1) because of cc: @puneetlath |
|
Still the performance difference will be very minor because of early termination, so I don't think the proposal should be selected based on that, I had identified the bug first and provided a valid solution first and the solution is also used in other place. Therefore, I see no reason to select a proposal solely based on time complexity, especially since the list will never be excessively large. EDIT: I also believe that performance, code refactoring, etc., are meant to be discussed during the PR phase. |
@puneetlath, @greg-schroeder, @ishpaul777 Uh oh! This issue is overdue by 2 days. Don't forget to update your issues! |
pending final proposal review from @puneetlath |
@puneetlath @greg-schroeder @ishpaul777 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! |
Sorry, @ishpaul777 would you mind summarizing the considerations for me? |
The original issue in issue description is fixed already, but @Krishna2323 found another bug (Video in @cretadn22's proposal alternative #46911 (comment)) i found @cretadn22 proposal solution a bit better performance wise since it just compare length of both array while @Krishna2323 traverse through array until it founds odd one out. Krishna proposed -> Please choose : ) |
I think both are valid solutions and would work fine, so this is ultimately a subjective opinion. And I know someone will end up disappointed, so I'm sorry about that, but there are always new issues and plenty of opportunities. I prefer this solution as I think it's just easier to read/follow: Also, small note for when you make the PR, I think proper grammar would be |
📣 @ishpaul777 🎉 An offer has been automatically sent to your Upwork account for the Reviewer role 🎉 Thanks for contributing to the Expensify app! |
📣 @cretadn22 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app! Offer link |
PR deployed to staging. Awaiting deploy to prod |
Deployed on Aug 29 with this #48035 checklist, Pay date - Sept 6 |
Thanks, will prep for 9/6 |
Processing |
@greg-schroeder What’s the status of the payment? |
Payments were completed. |
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.17-0
Reproducible in staging?: Y
Reproducible in production?: Y
If this was caught during regression testing, add the test name, ID and link from TestRail: N/A
Email or phone of affected tester (no customers): applausetester+kh050806@applause.expensifail.com
Issue reported by: Applause - Internal Team
Action Performed:
Expected Result:
There will be a dropdown button for enable, disable or delete the value after selecting the list value via checkbox
Actual Result:
There is no dropdown button after selecting the list value via checkbox
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
Add any screenshot/video evidence
Bug6563660_1722966650965.20240807_014736.mp4
View all open jobs on GitHub
Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @ishpaul777The text was updated successfully, but these errors were encountered: