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-10-25] [$500] Web - The horizontal line separating the header and the messages in the IOU report room disappears and reappears irregularly #26529

Closed
1 of 6 tasks
kbecciv opened this issue Sep 1, 2023 · 58 comments
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. External Added to denote the issue can be worked on by a contributor Reviewing Has a PR in review Weekly KSv2

Comments

@kbecciv
Copy link

kbecciv commented Sep 1, 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:

  • You Can open any IOU report room and skip the first two steps
  1. Click on the FAB and request Money from any user this will take you to that chat room
  2. Click on the IOU message to open the IOU report room
  3. Hover over the first Message in the IOU report room and mark it as unread
  4. Now notice the unread mark appears and the grey horizontal line still appears
  5. leave the the IOU report room and return
  6. Notice the horizontal grey line disappears
  7. Hover over the first message again and mark it as unread again
  8. Now the horizontal grey line appears again

Expected Result:

The unread indicator should be consistently be aligned with the grey bar in IOUs/tasks.

Actual Result:

The horizontal line separating the header and the messages in the IOU report room disappears and reappears irregularly.

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.61.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:
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Notes/Photos/Videos: Any additional supporting documentation

Screencast.from.28-08-23.02_23_41.webm
Recording.4176.mp4

Expensify/Expensify Issue URL:
Issue reported by: @Ahmed-Abdella
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1693183486459189

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01a365a66bcfc380e7
  • Upwork Job ID: 1699177381705969664
  • Last Price Increase: 2023-09-05
  • Automatic offers:
    • Ahmed-Abdella | Reporter | 26638143
@kbecciv kbecciv added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Sep 1, 2023
@melvin-bot
Copy link

melvin-bot bot commented Sep 1, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented Sep 1, 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

@melvin-bot melvin-bot bot added the Overdue label Sep 4, 2023
@joekaufmanexpensify
Copy link
Contributor

OOO today, will triage tomorrow!

@melvin-bot melvin-bot bot removed the Overdue label Sep 4, 2023
@joekaufmanexpensify
Copy link
Contributor

joekaufmanexpensify commented Sep 5, 2023

The behavior of the unread indicator here is consistent with the rest of the app. We just need to figure out the alignment of the unread bar. This same issue also applies to tasks, we should fix both here.

IMO, we should just change the unread alignment, so the unread indicator consistently matches the grey bar. (This is what we do in regular chat threads).

@joekaufmanexpensify
Copy link
Contributor

Or alternatively, perhaps there shouldn't be margin between the top the first message in the IOU/task room and the grey bar.

@joekaufmanexpensify joekaufmanexpensify added the External Added to denote the issue can be worked on by a contributor label Sep 5, 2023
@melvin-bot melvin-bot bot changed the title Web - The horizontal line separating the header and the messages in the IOU report room disappears and reappears irregularly [$500] Web - The horizontal line separating the header and the messages in the IOU report room disappears and reappears irregularly Sep 5, 2023
@melvin-bot
Copy link

melvin-bot bot commented Sep 5, 2023

Job added to Upwork: https://www.upwork.com/jobs/~01a365a66bcfc380e7

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

melvin-bot bot commented Sep 5, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented Sep 5, 2023

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

@zukilover
Copy link
Contributor

Proposal

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

The unread indicator should be consistently be aligned with the grey bar in IOUs/tasks.

What is the root cause of that problem?

This is caused by the shouldHideThreadDividerLine flag not being read correctly by ReportActionItem component. We use useCallback to render the item, and the shouldHideThreadDividerLine is evaluated within the callback and not as a dependency. This caused the ReportActionItem to not re-render when it should.

const shouldHideThreadDividerLine = sortedReportActions.length > 1 && sortedReportActions[sortedReportActions.length - 2].reportActionID === currentUnreadMarker.current;

Changing the style so that the unread indicator overlaps the grey line is not the best solution because it's not addressing the underlying problem. Also, the unread indicator has new label on the right that uses transparent background. A portion of the grey line will be exposed if we only use the styling fix.

I propose the following:

Change currentUnreadMarker from useRef to useState so that it triggers re-render when it should.
Change shouldHideThreadDividerLine to useMemo and add it as dependency to the renderItem.

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

    const [currentUnreadMarker, setCurrentUnreadMarker] = useState(null);
    const shouldHideThreadDividerLine = useMemo(() => {
        return sortedReportActions.length > 1 && sortedReportActions[sortedReportActions.length - 2].reportActionID === currentUnreadMarker
    }, [sortedReportActions, currentUnreadMarker])

What alternative solutions did you explore? (Optional)

N/A

@joekaufmanexpensify
Copy link
Contributor

Pending review of proposals

@joekaufmanexpensify
Copy link
Contributor

@robertKozik mind taking a look at this proposal when you have a sec?

@robertKozik
Copy link
Contributor

Yeah I'm on it 👀

@robertKozik
Copy link
Contributor

Sorry for keeping you waiting @zukilover, I think your proposal is good, I checked it briefly on my branch and it solved the problem. Let's see it in action!

Selected proposal: Proposal
Contributor: @zukilover

🎀 👀 🎀 C+ reviewed

@melvin-bot
Copy link

melvin-bot bot commented Sep 7, 2023

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

@joekaufmanexpensify
Copy link
Contributor

Pending internal engineering review.

@melvin-bot melvin-bot bot added the Overdue label Sep 11, 2023
@joekaufmanexpensify
Copy link
Contributor

@deetergp mind signing off on this proposal when you have a sec?

@melvin-bot melvin-bot bot removed the Overdue label Sep 11, 2023
@deetergp
Copy link
Contributor

I agree with @robertKozik, let's go with @zukilover's proposal 👍

@joekaufmanexpensify
Copy link
Contributor

Catching up on this one now, and is this a correct understanding of where we're at? We had the first PR for this issue, which fixed the bug in some, but not all situations. Now the PR above, is in review, and should fix it in the remaining situations.

Is that right?

@zukilover
Copy link
Contributor

@joekaufmanexpensify that's about right. The original problem has been solved and completed. The new PR is an extended implementation.

@joekaufmanexpensify
Copy link
Contributor

Got it, okay. thanks for confirming

@joekaufmanexpensify
Copy link
Contributor

PR still in review

@melvin-bot
Copy link

melvin-bot bot commented Oct 17, 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 @zukilover got assigned: 2023-09-12 19:08:04 Z
  • when the PR got merged: 2023-10-17 19:35:06 UTC
  • days elapsed: 25

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 Weekly KSv2 labels Oct 18, 2023
@melvin-bot melvin-bot bot changed the title [$500] Web - The horizontal line separating the header and the messages in the IOU report room disappears and reappears irregularly [HOLD for payment 2023-10-25] [$500] Web - The horizontal line separating the header and the messages in the IOU report room disappears and reappears irregularly Oct 18, 2023
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Oct 18, 2023
@melvin-bot
Copy link

melvin-bot bot commented Oct 18, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented Oct 18, 2023

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

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

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

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 Oct 18, 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:

@joekaufmanexpensify
Copy link
Contributor

@robertKozik mind completing the BZ checklist here so we can prep to close this one?

@robertKozik
Copy link
Contributor

  • [@robertKozik] The PR that introduced the bug has been identified. Link to the PR: It had more feature-like vibe, as it was consistent behaviour which needed to be changed (context)
  • [@robertKozik] 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: N/A
  • [@robertKozik] 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: N/A
  • [@robertKozik] Determine if we should create a regression test for this bug. I think we don't need it for this one
  • [@robertKozik] 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. N/A

@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 labels Oct 25, 2023
@joekaufmanexpensify
Copy link
Contributor

Great, ty!

@joekaufmanexpensify
Copy link
Contributor

BZ checklist is complete, so we need to now issue payment. Here's a summary of payments:

@joekaufmanexpensify
Copy link
Contributor

@zukilover your $500 was already previously paid out from when you submitted your work for approval in Upwork. I ended your contract!

@joekaufmanexpensify
Copy link
Contributor

@Ahmed-Abdella $50 sent and contract ended!

@joekaufmanexpensify
Copy link
Contributor

Also noting that the initial PR was completed in less than 9 days, which is why no urgency penalty applied here. We later than decided to do a second clean up PR, which was also merged in less than 9 days.

@joekaufmanexpensify
Copy link
Contributor

Bug is fixed, BZ checklist complete, and all payment issued. Closing as this is all set. Thanks everyone!

@melvin-bot melvin-bot bot added Reviewing Has a PR in review Weekly KSv2 and removed Daily KSv2 labels Feb 22, 2024
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. External Added to denote the issue can be worked on by a contributor Reviewing Has a PR in review Weekly KSv2
Projects
None yet
Development

No branches or pull requests

8 participants