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-09] [$500] Chat - Mentioning a user in new offline conversation displays user picker transparent #27036

Closed
2 of 6 tasks
lanitochka17 opened this issue Sep 8, 2023 · 29 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 Engineering External Added to denote the issue can be worked on by a contributor

Comments

@lanitochka17
Copy link

lanitochka17 commented Sep 8, 2023

If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!


Action Performed:

  1. Go to staging.new.expensify.com
  2. Turn off the connection
  3. Click FAB icon and select/start new chat
  4. Type @

Expected Result:

The suggestion list shows custom avatars for users that have them

Actual Result:

The suggestion list is shown transparent

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.66-3

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

Bug6193068_RPReplay_Final1694180324.mp4

Expensify/Expensify Issue URL:

Issue reported by: Applause - Internal team

Slack conversation:

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~014ab2a548d85f3dca
  • Upwork Job ID: 1700212174202789888
  • Last Price Increase: 2023-09-08
@lanitochka17 lanitochka17 added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Sep 8, 2023
@melvin-bot
Copy link

melvin-bot bot commented Sep 8, 2023

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

@melvin-bot
Copy link

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

@ginsuma
Copy link
Contributor

ginsuma commented Sep 8, 2023

Proposal

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

Chat - Mentioning a user in new offline conversation displays user picker transparent

What is the root cause of that problem?

The ReportActionCompose component is wrapped by OfflineWithFeedback, and the Suggestions component inherits its opacity.

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

When the composer focuses, we won't change the opacity of it. We did the same for ReportActionItemMessageEdit here.

Screen Shot 2023-09-09 at 12 24 11 AM

We change this LOC to:

pendingAction={isFocused ? null : pendingAction}
Before
Screen.Recording.2023-09-09.at.12.16.24.AM.mov
After
Screen.Recording.2023-09-09.at.12.06.49.AM.mov

@lschurr lschurr added the External Added to denote the issue can be worked on by a contributor label Sep 8, 2023
@melvin-bot melvin-bot bot changed the title Chat - Mentioning a user in new offline conversation displays user picker transparent [$500] Chat - Mentioning a user in new offline conversation displays user picker transparent Sep 8, 2023
@melvin-bot
Copy link

melvin-bot bot commented Sep 8, 2023

Job added to Upwork: https://www.upwork.com/jobs/~014ab2a548d85f3dca

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

melvin-bot bot commented Sep 8, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented Sep 8, 2023

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

@s-alves10
Copy link
Contributor

Proposal

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

Mention suggestions displays in a transparent popup in new offline conversation

What is the root cause of that problem?

In ReportActionCompose, OfflineWithFeedback component wraps all the children. OfflineWithFeedback component has opacity(0.5) in offline state for pending report.

opacity: 0.5,

Suggestions are children of this component and so opacity is applied to suggestions as well.
This is the root cause

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

We need to use React.createPortal to avoid opacity inheritance.
As you can see below, we have already this function in AutoCompleteSuggestions component

return ReactDOM.createPortal(<View style={StyleUtils.getBaseAutoCompleteSuggestionContainerStyle({left, width, bottom})}>{componentToRender}</View>, document.querySelector('body'));

We changed the parentContainerRef props to measureParentContainer props in this PR but this change was applied only to propTypes and parent components. Those changes were not applied to AutoCompleteSuggestions component itself.

In order to fix this, the following replacements are needed

function AutoCompleteSuggestions({parentContainerRef, ...props}) {

function AutoCompleteSuggestions({measureParentContainer, ...props}) {

React.useEffect(() => {
if (!parentContainerRef || !parentContainerRef.current) {
return;
}
parentContainerRef.current.measureInWindow((x, y, w) => setContainerState({left: x, bottom: windowHeight - y, width: w}));
}, [parentContainerRef, windowHeight, windowWidth]);

    React.useEffect(() => {
        if (!measureParentContainer) {
            return;
        }
        measureParentContainer((x, y, w) => setContainerState({left: x, bottom: windowHeight - y, width: w}));
    }, [measureParentContainer, windowHeight, windowWidth]);

function AutoCompleteSuggestions({parentContainerRef, ...props}) {

function AutoCompleteSuggestions({measureParentContainer, ...props}) {

This works as expected

Result
27036.mp4

What alternative solutions did you explore? (Optional)

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

lschurr commented Sep 11, 2023

@rushatgabhane could you review the proposals here?

@melvin-bot melvin-bot bot removed the Overdue label Sep 11, 2023
@rushatgabhane
Copy link
Member

When the composer focuses, we won't change the opacity of it. We did the same for ReportActionItemMessageEdit here.

@ginsuma interesting solution but I think it's a hack. Making opacity depend on focus state doesn't seem intuitive 😅

@rushatgabhane
Copy link
Member

rushatgabhane commented Sep 12, 2023

It looks like we forgot to pass the correct props down. I like @s-alves10's solution #27036 (comment)

C+ reviewed 🎀 👀 🎀

@rushatgabhane
Copy link
Member

rushatgabhane commented Sep 12, 2023

@lschurr could you please add engineering label, I'm temporarily removed from c+ team so my super powers are gone :)

@melvin-bot
Copy link

melvin-bot bot commented Sep 15, 2023

Triggered auto assignment to @techievivek (Engineering), see https://stackoverflow.com/c/expensify/questions/4319 for more details.

@lschurr
Copy link
Contributor

lschurr commented Sep 15, 2023

Shoot, I missed this. Adding Eng now.

@melvin-bot melvin-bot bot added Overdue and removed Overdue labels Sep 15, 2023
@lschurr
Copy link
Contributor

lschurr commented Sep 18, 2023

Bump @techievivek

@melvin-bot melvin-bot bot added Overdue and removed Overdue labels Sep 18, 2023
@melvin-bot melvin-bot bot added the Awaiting Payment Auto-added when associated PR is deployed to production label Oct 2, 2023
@melvin-bot melvin-bot bot changed the title [$500] Chat - Mentioning a user in new offline conversation displays user picker transparent [HOLD for payment 2023-10-09] [$500] Chat - Mentioning a user in new offline conversation displays user picker transparent Oct 2, 2023
@melvin-bot
Copy link

melvin-bot bot commented Oct 2, 2023

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

@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Oct 2, 2023
@melvin-bot
Copy link

melvin-bot bot commented Oct 2, 2023

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

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 2, 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:

  • [@rushatgabhane] The PR that introduced the bug has been identified. Link to the PR:
  • [@rushatgabhane] 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:
  • [@rushatgabhane] 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:
  • [@rushatgabhane] Determine if we should create a regression test for this bug.
  • [@rushatgabhane] 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.
  • [@lschurr] 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 and removed Weekly KSv2 Daily KSv2 labels Oct 9, 2023
@lschurr
Copy link
Contributor

lschurr commented Oct 9, 2023

@rushatgabhane could you complete the checklist for this one?

@lschurr
Copy link
Contributor

lschurr commented Oct 9, 2023

Payment summary:

  • Bug reporter: Applause (no payment needed)
  • Contributor: @s-alves10 $500 (paid in Upwork)
  • Contributor+: @rushatgabhane $500

@lschurr
Copy link
Contributor

lschurr commented Oct 9, 2023

@s-alves10 could you accept the offer in Upwork? (https://www.upwork.com/nx/wm/offer/26729370)

@s-alves10
Copy link
Contributor

@lschurr

Accepted. Thanks

@lschurr
Copy link
Contributor

lschurr commented Oct 10, 2023

Bump @rushatgabhane for the checklist: #27036 (comment)

@melvin-bot melvin-bot bot added the Overdue label Oct 13, 2023
@lschurr
Copy link
Contributor

lschurr commented Oct 13, 2023

Waiting on the checklist.

@melvin-bot melvin-bot bot added Overdue and removed Overdue labels Oct 13, 2023
@techievivek
Copy link
Contributor

Gentle bump @rushatgabhane to complete the above checklist.

@melvin-bot melvin-bot bot removed the Overdue label Oct 16, 2023
@rushatgabhane
Copy link
Member

WIP ⚠️

  1. The PR that introduced the bug has been identified. Link to the PR:

  2. 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:

  3. 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:

  4. Determine if we should create a regression test for this bug.

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

@rushatgabhane
Copy link
Member

created a payment request - https://staging.new.expensify.com/r/3291458028812337

@lschurr
Copy link
Contributor

lschurr commented Oct 18, 2023

Are you still working on that checklist @rushatgabhane or are we good to close this one?

@JmillsExpensify
Copy link

$500 payment approved for @rushatgabhane based on BZ summary.

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 Engineering External Added to denote the issue can be worked on by a contributor
Projects
None yet
Development

No branches or pull requests

7 participants