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-03] [$1000] IOU has pin option in LHN #20255

Closed
1 of 6 tasks
kbecciv opened this issue Jun 6, 2023 · 28 comments
Closed
1 of 6 tasks

[HOLD for payment 2023-07-03] [$1000] IOU has pin option in LHN #20255

kbecciv opened this issue Jun 6, 2023 · 28 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 External Added to denote the issue can be worked on by a contributor

Comments

@kbecciv
Copy link

kbecciv commented Jun 6, 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. Send money request to user B
  2. Open the IOU thread
  3. Right-click on IOU thread LHN

4. Click on 'Pin' button
5. Observe that IOU thread is pinned to the top but that there is no pin icon on the LHN

Expected Result:

Pin option shouldn't show since the IOU/expense report can't be pinned because it has the green dot.

Pin icon should be displayed on LHN when pinning the thread, and the pin icon should be removed when unpinning the thread

Actual Result:

Pin option is shown.

Pin icon is not displayed when pinning the IOU thread

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

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

2023-06-03.09.03.46.mp4

Expensify/Expensify Issue URL:

Issue reported by: @Natnael-Guchima

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

View all open jobs on GitHub

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

melvin-bot bot commented Jun 6, 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 6, 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

@Ollyws
Copy link
Contributor

Ollyws commented Jun 6, 2023

Proposal

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

The LHN context menu allows the user to pin IOU threads.

What is the root cause of that problem?

As per #19438 (comment), IOU reports should not have any pin options as they are pinned by default, but the transaction chats should. Whereas this new contextmenu functionality is enabled for all reports

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

We should disable the pin button on the contextmenu for IOU reports.
To implement this, in OptionRowLHN we can create a variable returned by SidebarUtils.getOptionData to check if the report is an IOU, and either pass optionItem.isIOU to ReportActionContextMenu.showContextMenu() or early return in showPopover if optionItem.isIOU is true.
The first approach is probably the better way to do it incase more popover menuitems need to be added in the future. We can then pass this isIOU variable along to ContextMenuActions and return false if it is an IOU report.
One issue here is that the ContextMenu still opens even if there are no menuitems, this can be resolved in BaseReportActionContextMenu by checking if the filtered context menu actions are empty using _.map and calling hideContextMenu if this is the case.

What alternative solutions did you explore? (Optional)

None

@melvin-bot melvin-bot bot added the Overdue label Jun 8, 2023
@mallenexpensify
Copy link
Contributor

I think this is expected behaviour but .... ¯_(ツ)_/¯.
Checking here

Is it expected behavior to NOT show the 📌 in LHN for an IOU thread? Asking because we're currently showing the :greenlight: and the chat is pinned at the top. ie. the :greenlight: supersedes the 📌 since money is owed (and it's pinned at the top of LHN) so therefore we want to continue to show :greenlight: and not 📌 .... right?

@melvin-bot melvin-bot bot removed the Overdue label Jun 9, 2023
@Ollyws
Copy link
Contributor

Ollyws commented Jun 9, 2023

There was a discussion about this in #19438 (comment) as far as the pin icon/green light is concerned the current behaviour is expected, the problem here is that there is the option to pin/unpin IOUs from the LHN context menu which shouldn't be there, if you look at the IOU header in the chat it has no pin option.

@Natnael-Guchima
Copy link

Natnael-Guchima commented Jun 9, 2023

I think @trjExpensify might know what the expected behaviour should be here.

@melvin-bot melvin-bot bot added the Overdue label Jun 12, 2023
@melvin-bot
Copy link

melvin-bot bot commented Jun 12, 2023

@mallenexpensify Whoops! This issue is 2 days overdue. Let's get this updated quick!

@mallenexpensify
Copy link
Contributor

mallenexpensify commented Jun 13, 2023

the problem here is that there is the option to pin/unpin IOUs from the LHN context menu which shouldn't be there,

@Ollyws , good catch. It does make sense that, if the chat isn't pin-able, then we shouldn't show the option. I like that better than allowing pinning
image

I was going to put this on hold pending the below but noticed it hit production a week ago and that worked on the PR for that @Ollyws

I updated the OP, moving this along
image

@melvin-bot melvin-bot bot removed the Overdue label Jun 13, 2023
@mallenexpensify mallenexpensify added the External Added to denote the issue can be worked on by a contributor label Jun 13, 2023
@melvin-bot melvin-bot bot changed the title Web - LHN- There is no pin icon on LHN for pinned IOU threads [$1000] Web - LHN- There is no pin icon on LHN for pinned IOU threads Jun 13, 2023
@melvin-bot
Copy link

melvin-bot bot commented Jun 13, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented Jun 13, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented Jun 13, 2023

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

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

melvin-bot bot commented Jun 13, 2023

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

@amyevans amyevans changed the title [$1000] Web - LHN- There is no pin icon on LHN for pinned IOU threads [$1000] Web - LHN- IOU has pin option in LHN Jun 13, 2023
@amyevans amyevans changed the title [$1000] Web - LHN- IOU has pin option in LHN [$1000] IOU has pin option in LHN Jun 13, 2023
@parasharrajat
Copy link
Member

@Ollyws Thanks for the proposal. What if we use ReportUtils.isMoneyRequest and modify this to take reportID as a param? We are already subscribe to Report collection in ReportUtils, we can get the report data from it via reportID.

@Ollyws
Copy link
Contributor

Ollyws commented Jun 14, 2023

@parasharrajat I did consider that approach, it would be viable but I thought maybe it would be better to keep it all in getOptionData.
We could modify ReportUtils.isMoneyRequest and use it straight in OptionRowLHN, which would save us modifying SideBarUtils.getOptionData.

@parasharrajat
Copy link
Member

I don't see why we need to modify any of these functions.

!ReportUtils.IsMoneyRequest(reportId) && type === CONTEXT_MENU_TYPES.REPORT

@Ollyws
Copy link
Contributor

Ollyws commented Jun 14, 2023

@parasharrajat Yes exactly. I meant modify ReportUtils.isMoneyRequest to use reportID as you suggested. I was considering using a variable to keep it tidy but the way you're suggesting is good.

@parasharrajat
Copy link
Member

parasharrajat commented Jun 14, 2023

Ok, Great.

@Ollyws' proposal looks good with #20255 (comment) suggestion as it more tidy.

Feedback: @Ollyws Try to break your statement into paragraphs especially when two different problems are being explained. Use Code links that show code directly in the comment. e.g.

shouldShow: (type, reportAction, isArchivedRoom, betas, anchor, isChronosReport, reportID, isPinnedChat) => type === CONTEXT_MENU_TYPES.REPORT && !isPinnedChat,

cc: @amyevans

🎀 👀 🎀 C+ reviewed

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

melvin-bot bot commented Jun 14, 2023

📣 @Ollyws You have been assigned to this job by @amyevans!
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 the Reviewing Has a PR in review label Jun 14, 2023
@mallenexpensify
Copy link
Contributor

@Ollyws , @parasharrajat , @Natnael-Guchima hired in Upwork, please accept https://www.upwork.com/jobs/~0139b2338fd7598cc2

@Natnael-Guchima
Copy link

Accepted. Thanks @mallenexpensify

@melvin-bot
Copy link

melvin-bot bot commented Jun 22, 2023

Based on my calculations, the pull request did not get merged within 3 working days of assignment. Please, check out my computations here:

  • when @Ollyws got assigned: 2023-06-14 14:25:47 Z
  • when the PR got merged: 2023-06-22 18:30:21 UTC
  • days elapsed: 7

On to the next one 🚀

@melvin-bot
Copy link

melvin-bot bot commented Jun 23, 2023

@amyevans, @Ollyws, @mallenexpensify, @parasharrajat Whoops! This issue is 2 days overdue. Let's get this updated quick!

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Daily KSv2 labels Jun 26, 2023
@melvin-bot melvin-bot bot changed the title [$1000] IOU has pin option in LHN [HOLD for payment 2023-07-03] [$1000] IOU has pin option in LHN Jun 26, 2023
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Jun 26, 2023
@melvin-bot
Copy link

melvin-bot bot commented Jun 26, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented Jun 26, 2023

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

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 Jun 26, 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:

  • [@parasharrajat] The PR that introduced the bug has been identified. Link to the PR:
  • [@parasharrajat] 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:
  • [@parasharrajat] 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:
  • [@parasharrajat] Determine if we should create a regression test for this bug.
  • [@parasharrajat] 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:

@melvin-bot melvin-bot bot added Daily KSv2 Overdue and removed Weekly KSv2 labels Jul 3, 2023
@mallenexpensify
Copy link
Contributor

Everyone paid!
@parasharrajat can you fill out the checklist above please?

@parasharrajat
Copy link
Member

[@parasharrajat] The PR that introduced the bug has been identified. Link to the PR:#16079
[@parasharrajat] 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/16079/files#r1254793469
[@parasharrajat] 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: https://expensify.slack.com/archives/C049HHMV9SM/p1688668784257109
[@parasharrajat] Determine if we should create a regression test for this bug. Yes
[@parasharrajat] 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. Open the FAB menu -> Request money and follow the steps to create a new money request.
  2. Right-click on the IOU thread (the one with a green light) in the LHN.
  3. Verify that there is no pin option on the context Menu.
  4. Similiar to step 1, request the money in a Workspace Chat.
  5. Follow steps 2 and 3.

Do you agree 👍 or 👎 ?

@melvin-bot melvin-bot bot added the Overdue label Jul 10, 2023
@mallenexpensify
Copy link
Contributor

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

6 participants