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 2023-07-10] [$1000] Report List option is not highlighted on long pressing in LNH #21066

Closed
6 tasks done
kbecciv opened this issue Jun 19, 2023 · 47 comments
Closed
6 tasks done
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

@kbecciv
Copy link

kbecciv commented Jun 19, 2023

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!


Action Performed:

  1. Open the App
  2. In LNH, long press/right click on any report option

Expected Result:

The Report option should be highlighted to indicate which one is being pinned.

Actual Result:

No option is highlighted and the user cannot see which one is being pinned.

Workaround:

Unknown

Platforms:

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

  • Android / native
  • Android / Chrome
  • iOS / native
  • iOS / Safari
  • MacOS / Chrome / Safari
  • MacOS / Desktop

Version Number: 1.3.27-2

Reproducible in staging?: yes

Reproducible in production?: yes

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

Notes/Photos/Videos: Any additional supporting documentation

Screen.Recording.2023-06-02.at.12.05.45.PM.mov

Expensify/Expensify Issue URL:

Issue reported by: @esh-g

Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1686629557027629

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01999e34796fd5152c
  • Upwork Job ID: 1670922936437043200
  • Last Price Increase: 2023-06-19
@kbecciv kbecciv added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Jun 19, 2023
@melvin-bot
Copy link

melvin-bot bot commented Jun 19, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented Jun 19, 2023

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

@kbecciv
Copy link
Author

kbecciv commented Jun 19, 2023

Proposal

Please restate the problem

Report is not selected in LNH on long pressing for context menu.

What do you think is the root cause of the problem?

We have no logic in place to highlight the selected report in LNH.

What changes do you think we should make to fix that problem?

We should first add a state variable to track the context menu called isContextMenuActive in OptionRowLNH.js.
2. Then in the method showPopover :

const showPopover = (event) => {
ReportActionContextMenu.showContextMenu(
ContextMenuActions.CONTEXT_MENU_TYPES.REPORT,
event,
'',
popoverAnchor,
props.reportID,
{},
'',
() => {},
() => {},
false,
false,
optionItem.isPinned,
);
};

We should add setIsContextMenuActive(true) when called and pass () => setIsContextMenuActive(false) to the onHideparameter of the ReportActionContextMenu.showContextMenu
3. Finally on line 137 in OptionRowLNH.js
https://github.com/Expensify/App/blob/93957f0eb66a7e6998365b201a4c54ea2029ff60/src/components/LHNOptionsList/OptionRowLHN.js#LL137C5-L137C5
We need to modify the condition to the following:
props.isFocused || isContextMenuActive
Result:
https://github.com/Expensify/App/assets/77237602/754c692e-e2f7-4778-ac61-e9cdd3b6da6d

What other alternatives did you explore (optional)

@mallenexpensify mallenexpensify added the External Added to denote the issue can be worked on by a contributor label Jun 19, 2023
@melvin-bot melvin-bot bot changed the title Report List option is not highlighted on long pressing in LNH [$1000] Report List option is not highlighted on long pressing in LNH Jun 19, 2023
@melvin-bot
Copy link

melvin-bot bot commented Jun 19, 2023

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

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Jun 19, 2023
@melvin-bot
Copy link

melvin-bot bot commented Jun 19, 2023

Current assignee @mallenexpensify is eligible for the External assigner, not assigning anyone new.

@melvin-bot
Copy link

melvin-bot bot commented Jun 19, 2023

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

@mallenexpensify
Copy link
Contributor

Pretty sure they can be External. @mollfpr can you please review @esh-g's proposal above?
For the fix/improvement, we def want the highlighting to be clearly visible on all platforms, since Desktop and iOS function differently (and I'm guessing others too)

@mollfpr
Copy link
Contributor

mollfpr commented Jun 20, 2023

@mallenexpensify Sure; I will review the proposal today!

@Ali-ch88
Copy link

Hi, Hope you're doing well.
I have checked the issue but when I clicked long press to any, the modal is open for report and pin.
So is the issue is resolved now?

@melvin-bot
Copy link

melvin-bot bot commented Jun 20, 2023

📣 @Ali-ch88! 📣
Hey, it seems we don’t have your contributor details yet! You'll only have to do this once, and this is how we'll hire you on Upwork.
Please follow these steps:

  1. Get the email address used to login to your Expensify account. If you don't already have an Expensify account, create one here. If you have multiple accounts (e.g. one for testing), please use your main account email.
  2. Get the link to your Upwork profile. It's necessary because we only pay via Upwork. You can access it by logging in, and then clicking on your name. It'll look like this. If you don't already have an account, sign up for one here.
  3. Copy the format below and paste it in a comment on this issue. Replace the placeholder text with your actual details.
    Screen Shot 2022-11-16 at 4 42 54 PM
    Format:
Contributor details
Your Expensify account email: <REPLACE EMAIL HERE>
Upwork Profile Link: <REPLACE LINK HERE>

@Ali-ch88
Copy link

Contributor details
Your Expensify account email: alii.razaa8800@gmail.com
Upwork Profile Link: https://www.upwork.com/freelancers/~012a1375209e7966f9

@melvin-bot
Copy link

melvin-bot bot commented Jun 20, 2023

✅ Contributor details stored successfully. Thank you for contributing to Expensify!

@Ali-ch88
Copy link

Hi, Hope you're doing well.
I have checked the issue but when I clicked long press to any, the modal is open for report and pin.
So is the issue is resolved now?

@jeet-dhandha
Copy link
Contributor

Proposal

Please restate the problem

  • Report is not selected in LNH on long pressing for context menu.

What do you think is the root cause of the problem?

  • There is no such implementation in the codebase right now.

What changes do you think we should make to fix that problem?

  1. We can basically create a withPopUpContextReportId context Provider and then use it in SidebarLinks.js file to pass the popUpReportId to the LHNOptionsList component.
  2. We will need to add PopUpContextReportIDProvider to the App.js file.
  3. Then add withPopUpContextReportId to PopoverReportActionContextMenu.js File and use updatePopUpContextReportId to update the popUpReportId in the context.
  4. Finally we can use isContextActive to show the hovered style in OptionRowLHN.js file.
    const isContextActive = `${props.popUpReportId}` === `${props.reportID}`;

Fixed:

Fix-HighlightReportContextMenu.mp4

What other alternatives did you explore (optional)

  • N/A

@Ali-ch88
Copy link

@jeet-dhandha but where is the report list in your video?

@jeet-dhandha
Copy link
Contributor

jeet-dhandha commented Jun 20, 2023

@Ali-ch88 As you know the issue is that when long pressing / Right clicking on the OptionRowLHN the PopoverReportActionContextMenu is opened but OptionRowLHN is not highlighted in this case. So these are the below screenshots from video which shows before and after fix ScreenShots.

Before:

Screenshot 2023-06-20 at 2 49 57 PM

After:

Screenshot 2023-06-20 at 2 49 48 PM

@toseef31
Copy link

Contributor details
Your Expensify account email: toseefa071@gmail.com
Upwork Profile Link: https://www.upwork.com/fl/~01e6deb3b1064ee6bd

@melvin-bot
Copy link

melvin-bot bot commented Jun 20, 2023

⚠️ Missing/invalid email or upwork profile link. Please make sure you add both your Expensify email and Upwork profile link in the format specified.

@toseef31
Copy link

Contributor details
Your Expensify account email: toseefa071@gmail.com
Upwork Profile Link: https://www.upwork.com/freelancers/~01e6deb3b1064ee6bd

@melvin-bot
Copy link

melvin-bot bot commented Jun 20, 2023

✅ Contributor details stored successfully. Thank you for contributing to Expensify!

@mollfpr
Copy link
Contributor

mollfpr commented Jun 20, 2023

Thanks for the proposal @jeet-dhandha but I think using context is over-engineer.

Screenshot 2023-06-20 at 22 16 21

@mallenexpensify May I know the expected highlighted color for the focus LHN item?

@jeet-dhandha
Copy link
Contributor

@mollfpr I had to use context as i am not able to get OptionRowLHN to re-render on change of reportID in ReportActionContextMenu. As ref doesn't give any side effect due which we can re-render OptionsRowLHN.

@mallenexpensify
Copy link
Contributor

@mollfpr I think the highlight color should be the dark one, the same as when you're hovering over a row in LHN with your pointer.

image

@mollfpr
Copy link
Contributor

mollfpr commented Jun 23, 2023

Thank you all for the proposals!

I am inclined to go with @esh-g proposals. It can be simple enough to use the local state in the component and handle it based on the popover method call.

🎀 👀 🎀 C+ reviewed!

@melvin-bot
Copy link

melvin-bot bot commented Jun 23, 2023

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

@melvin-bot melvin-bot bot added the Overdue label Jun 26, 2023
@melvin-bot melvin-bot bot removed the Help Wanted Apply this label when an issue is open to proposals by contributors label Jun 26, 2023
@melvin-bot
Copy link

melvin-bot bot commented Jun 26, 2023

📣 @esh-g You have been assigned to this job by @roryabraham!
Please apply to this job in Upwork 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 and removed Overdue labels Jun 26, 2023
@esh-g
Copy link
Contributor

esh-g commented Jun 26, 2023

@mollfpr @roryabraham The PR is here #21613 🚀

@mallenexpensify
Copy link
Contributor

@esh-g @mollfpr, can you please accept the job?
https://www.upwork.com/jobs/~01999e34796fd5152c

@esh-g
Copy link
Contributor

esh-g commented Jun 27, 2023

Thanks @mallenexpensify I have accepted

@melvin-bot
Copy link

melvin-bot bot commented Jun 29, 2023

🎯 ⚡️ Woah @mollfpr / @esh-g, great job pushing this forwards! ⚡️

The pull request got merged within 3 working days of assignment, so this job is eligible for a 50% #urgency bonus 🎉

  • when @esh-g got assigned: 2023-06-26 18:43:00 Z
  • when the PR got merged: 2023-06-29 14:11:18 UTC

On to the next one 🚀

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Daily KSv2 labels Jul 3, 2023
@melvin-bot melvin-bot bot changed the title [$1000] Report List option is not highlighted on long pressing in LNH [HOLD for payment 2023-07-10] [$1000] Report List option is not highlighted on long pressing in LNH Jul 3, 2023
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Jul 3, 2023
@melvin-bot
Copy link

melvin-bot bot commented Jul 3, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented Jul 3, 2023

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

After the hold period is over and BZ checklist items are completed, please complete any of the applicable payments for this issue, and check them off once done.

  • External issue reporter
  • Contributor that fixed the issue
  • Contributor+ that helped on the issue and/or PR

As a reminder, here are the bonuses/penalties that should be applied for any External issue:

  • Merged PR within 3 business days of assignment - 50% bonus
  • Merged PR more than 9 business days after assignment - 50% penalty

@melvin-bot
Copy link

melvin-bot bot commented Jul 3, 2023

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:

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

@roryabraham
Copy link
Contributor

Looks like the remaining TODOs here are BZ checklist and payments

@mollfpr
Copy link
Contributor

mollfpr commented Jul 9, 2023

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

The first commit that adds the secondary interaction to show popover is #16079, but I don't think this is a bug but rather an improvement.

[@mollfpr] 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:

The regression steps should be enough.

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

  1. Open the App
  2. Observe the LHN
  3. For small screens long-press or larger screen right click on the current focus chat
  4. Verify the background of the chat in LHN is not changed and showing the context menu actions popover
  5. Do step 3 but on the other chat where is not focused
  6. Verify the background of the chat in LHN is darker or similar to the background when we hovered the chat list and showed the context menu actions popover
  7. 👍 or 👎

@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 labels Jul 9, 2023
@esh-g
Copy link
Contributor

esh-g commented Jul 10, 2023

bump @mallenexpensify I think this issue is due

@mallenexpensify
Copy link
Contributor

@esh-g paid $1750 - $1500 for job, w/ urgency bonus + $250 for reporting
@mollfpr paid $1500.
TestRail update GH here

Thanks all!

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

9 participants