Skip to content

[HOLD for payment 2023-07-20] [HOLD for payment 2023-07-17] [$1000] Chat - Area outside the group avatar is clickable #22445

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!


Issue found when executing PR #21402

Action Performed:

  1. Go to staging.new.expensify.com
  2. Create a group of five
  3. Resize the conversation view to small screen
  4. Tap outside the group avatar

Expected Result:

The area outside the group avatar is not clickable

Actual Result:

The area outside the group avatar is clickable

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

Reproducible in staging?: Yes

Reproducible in production?: No

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

Bug6120101_bandicam_2023-07-08_04-10-13-252.mp4

Bug6120101_bandicam_2023-07-08_04-10-54-161

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/~016720a203167c26a6
  • Upwork Job ID: 1678527009111691264
  • Last Price Increase: 2023-07-10

Activity

  1. OSBotify commented on Jul 7, 2023

    @OSBotify
    Contributor

    👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open StagingDeployCash deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:

    1. Identify the pull request that introduced this issue and revert it.
    2. Find someone who can quickly fix the issue.
    3. Fix the issue yourself.
  2. melvin-bot commented on Jul 7, 2023

    @melvin-bot

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

  3. allroundexperts commented on Jul 7, 2023

    @allroundexperts
    Contributor

    Proposal

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

    Area outside the group avatar is clickable

    What is the root cause of that problem?

    The horizontal padding included here is considered to be part of the Pressable when clicking on the avatar group.

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

    We need to replace the padding here with margins.

    If we want to keep on using the paddings, then we have to shift them to the wrapping component instead.

    What alternative solutions did you explore? (Optional)

    None

  4. DrLoopFall commented on Jul 8, 2023

    @DrLoopFall
    Contributor

    Proposal

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

    The area outside the group avatar is clickable

    What is the root cause of that problem?

    There are actually two problems here,

    1. We are using padding here, which expands the clickable area
      image
      style={[styles.ph5, styles.pb3, styles.alignSelfStart]}
    2. We are using left for positioning/shifting avatars but the PressableWithoutFeedback itself is not shifted, which causes it to be clickable in both the original and shifted positions.
      image
      left: -(overlapSize * index),

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

    Make individual avatars/row clickable.

    Remove pressable from here

    <PressableWithoutFeedback

    Wrap this with PressableWithoutFeedback

    <UserDetailsTooltip

    or this

    We add onPress prop in MultipleAvatars

    What alternative solutions did you explore? (Optional)

    Replace paddings with margins.

    - style={[styles.ph5, styles.pb3, styles.alignSelfStart]} 
    + style={[styles.mh5, styles.mb3, styles.alignSelfStart]} 

    Use margin-left instead of left for positioning the avatar.

    - left: -(overlapSize * index)
    + marginLeft: index ? -overlapSize : 0

    We also need to update(or remove) the width

    if (props.icons.length > 4) {
    // Width of overlapping avatars + border space
    width = oneAvatarSize.width * 3 + oneAvatarBorderWidth * 8;
    } else {
    // one avatar width + overlaping avatar sizes + border space
    width = oneAvatarSize.width + overlapSize * 2 * (props.icons.length - 1) + oneAvatarBorderWidth * (props.icons.length * 2);
    }

    NOTE: In alternate solution this gap is still clickable.
    image

  5. situchan commented on Jul 10, 2023

    @situchan
    Contributor

    Proposal

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

    Chat - welcome area outside the group avatar is clickable

    What is the root cause of that problem?

    There are 2 root causes.

    Screenshot 2023-07-10 at 7 28 44 AM

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

    Based on above analysis,

    After fix:
    Screenshot 2023-07-10 at 7 29 16 AM

    • refactor width calculation logic: get max length of row
            const length = avatarRows.length > 1 ? Math.max(avatarRows[0].length, avatarRows[1].length) : avatarRows[0].length;
            const width = oneAvatarSize.width + overlapSize * 2 * (length - 1) + oneAvatarBorderWidth * (length * 2);
    

    After fix:
    Screenshot 2023-07-10 at 7 30 03 AM

  6. stitesExpensify commented on Jul 10, 2023

    @stitesExpensify
    Contributor

    Okay so everyone so far has pointed to this line as the culprit, but as far as I can tell that hasn't been updated in 6 months. What happened in this staging deploy that caused things to break since it's working properly on production?

  7. stitesExpensify commented on Jul 10, 2023

    @stitesExpensify
    Contributor

    Was it just something that was missed by this pr maybe? https://github.com/Expensify/App/pull/20512/files

  8. 44 remaining items

  9. added
    BugSomething is broken. Auto assigns a BugZero manager.
    on Jul 14, 2023
  10. melvin-bot commented on Jul 14, 2023

    @melvin-bot

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

  11. melvin-bot commented on Jul 14, 2023

    @melvin-bot
  12. Christinadobrzyn commented on Jul 14, 2023

    @Christinadobrzyn
    Contributor

    Reassigning as I'm going ooo. @sonialiap This is just waiting for payment based on #22445 (comment) Thanks!

  13. sonialiap commented on Jul 20, 2023

    @sonialiap
    Contributor

    Paid ✔️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.DailyKSv2EngineeringExternalAdded to denote the issue can be worked on by a contributor

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions