Skip to content

[HOLD for payment 2023-10-09] [$500] Chat - Mentioning a user in new offline conversation displays user picker transparent #27036

Closed

Description

@lanitochka17

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

Activity

  1. added
    Daily
    Bug
    on Sep 8, 2023
  2. melvin-bot commented on Sep 8, 2023

    @melvin-bot

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

  3. melvin-bot commented on Sep 8, 2023

    @melvin-bot

    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
  4. ginsuma commented on Sep 8, 2023

    @ginsuma
    Contributor

    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
  5. added
    External
    on Sep 8, 2023
  6. 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[/+] on Sep 8, 2023
  7. melvin-bot commented on Sep 8, 2023

    @melvin-bot
  8. added
    Help Wanted
    on Sep 8, 2023
  9. melvin-bot commented on Sep 8, 2023

    @melvin-bot

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

  10. melvin-bot commented on Sep 8, 2023

    @melvin-bot

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

  11. dummy-1111 commented on Sep 9, 2023

    @dummy-1111
    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)

  12. 37 remaining items

  13. dummy-1111 commented on Oct 9, 2023

    @dummy-1111
    Contributor

    @lschurr

    Accepted. Thanks

  14. lschurr commented on Oct 10, 2023

    @lschurr
    Contributor

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

  15. lschurr commented on Oct 13, 2023

    @lschurr
    Contributor

    Waiting on the checklist.

  16. techievivek commented on Oct 16, 2023

    @techievivek
    Contributor

    Gentle bump @rushatgabhane to complete the above checklist.

  17. rushatgabhane commented on Oct 17, 2023

    @rushatgabhane
    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

  18. rushatgabhane commented on Oct 17, 2023

    @rushatgabhane
    Member
  19. lschurr commented on Oct 18, 2023

    @lschurr
    Contributor

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

  20. JmillsExpensify commented on Oct 18, 2023

    @JmillsExpensify
    Contributor

    $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

Metadata

Metadata

Labels

Awaiting PaymentBugDailyEngineeringExternal

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions