Skip to content

[HOLD for payment 2024-02-14] [$500] A border is being displayed on the second image of the group chat in the search model #34416

Closed

Description

@kavimuru

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!


Version Number: v1.4.24-7
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
Expensify/Expensify Issue URL:
Issue reported by: Applause internal team
Slack conversation:

Action Performed:

  1. Create group chat and send a message
  2. Go to the search model
  3. Hover over the first group chat
  4. Notice only second image displayed with border

Expected Result:

A border should not displayed on second image of the first group chat in the search model

Actual Result:

A border is being displayed on the second image of the group chat in the search model

Workaround:

unknown

Platforms:

Which of our officially supported platforms is this issue occurring on?

  • Android: Native
  • Android: mWeb Chrome
  • iOS: Native
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Add any screenshot/video evidence
Bug6339897_1705050171837!Screenshot_2024-01-12_at_12 25 44_AM
Bug6339897_1705050171821!Screenshot_2024-01-12_at_12 36 34_AM

Bug6339897_1705050171836.2024-01-12_00-29-44.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~0135be644839e7389d
  • Upwork Job ID: 1745742363732340736
  • Last Price Increase: 2024-01-12
  • Automatic offers:
    • bernhardoj | Contributor | 28128985

Activity

  1. added
    External
    Daily
    Bug
    on Jan 12, 2024
  2. changed the title [-]A border is being displayed on the second image of the group chat in the search model[/-] [+][$500] A border is being displayed on the second image of the group chat in the search model[/+] on Jan 12, 2024
  3. melvin-bot commented on Jan 12, 2024

    @melvin-bot
  4. melvin-bot commented on Jan 12, 2024

    @melvin-bot

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

  5. added
    Help Wanted
    on Jan 12, 2024
  6. melvin-bot commented on Jan 12, 2024

    @melvin-bot

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

  7. bernhardoj commented on Jan 12, 2024

    @bernhardoj
    Contributor

    Proposal

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

    The second avatar of a group chat shows a border while hovered.

    What is the root cause of that problem?

    The border color is actually doesn't match the background color when we hover over a focused option.

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

    We need to prevent the border from being applied when the option is focused.

    <SubscriptAvatar
    mainAvatar={option.icons[0]}
    secondaryAvatar={option.icons[1]}
    backgroundColor={hovered ? hoveredBackgroundColor : subscriptColor}
    size={CONST.AVATAR_SIZE.DEFAULT}
    />
    ) : (
    <MultipleAvatars
    icons={option.icons}
    size={CONST.AVATAR_SIZE.DEFAULT}
    secondAvatarStyle={[StyleUtils.getBackgroundAndBorderStyle(hovered ? hoveredBackgroundColor : subscriptColor)]}
    shouldShowTooltip={showTitleTooltip && OptionsListUtils.shouldOptionShowTooltip(option)}
    />

    (hovered && !optionIsFocused)

    just like we did in OptionRowLHN

  8. dukenv0307 commented on Jan 12, 2024

    @dukenv0307
    Contributor

    Proposal

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

    A border is being displayed on the second image of the group chat in the search model

    What is the root cause of that problem?

    We have a border width and border of the subscription avatar here.

    StyleUtils.getAvatarBorderWidth(isSmall ? CONST.AVATAR_SIZE.SMALL_SUBSCRIPT : CONST.AVATAR_SIZE.SUBSCRIPT),
    StyleUtils.getBorderColorStyle(backgroundColor ?? theme.componentBG),

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

    We should remove this border style.

    StyleUtils.getAvatarBorderWidth(isSmall ? CONST.AVATAR_SIZE.SMALL_SUBSCRIPT : CONST.AVATAR_SIZE.SUBSCRIPT),
    StyleUtils.getBorderColorStyle(backgroundColor ?? theme.componentBG),

    What alternative solutions did you explore? (Optional)

    NA

  9. dragnoir commented on Jan 12, 2024

    @dragnoir
    Contributor

    Proposal

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

    A border is being displayed on the second image of the group chat in the search model

    What is the root cause of that problem?

    OptionRow, src/components/OptionRow.tsx, is calculating the hoveredBackgroundColor

    const hoveredBackgroundColor = hoveredStyle?.backgroundColor ? (hoveredStyle.backgroundColor as string) : backgroundColor;

    The other components like SubscriptAvatar and MultipleAvatars are using the value hoveredBackgroundColor to set the border color:

    The issue is that the hoveredBackgroundColor is not updated when the Row is focused

    If we remove the border style, when hovering, there will be issues. BEcause now there's always a border === to the background color and it gives a feeling that there's transparency

    image

    When no hovered, border === background color
    when hovered, border === new background color

    When focused, we need to set background color to the focusBAckground color to adjust the border color.

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

    on OptionRow, update here:

    if (optionIsFocused) {
      subscriptColor  =  focusedBackgroundColor;
    +  hoveredBackgroundColor  =  focusedBackgroundColor;
    }

    We are updating the value of hoveredBackgroundColor to be equal to focusedBackgroundColor when optionIsFocused is true.

    Commit: src/components/OptionRow.tsx

    POC

    17.mp4
  10. melvin-bot commented on Jan 15, 2024

    @melvin-bot

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

  11. 33 remaining items

  12. added
    Weekly
    Awaiting Payment
    on Feb 7, 2024
  13. changed the title [-][$500] A border is being displayed on the second image of the group chat in the search model[/-] [+][HOLD for payment 2024-02-14] [$500] A border is being displayed on the second image of the group chat in the search model[/+] on Feb 7, 2024
  14. removed
    Reviewing
    on Feb 7, 2024
  15. melvin-bot commented on Feb 7, 2024

    @melvin-bot

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

  16. melvin-bot commented on Feb 7, 2024

    @melvin-bot

    The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.37-7 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 2024-02-14. 🎊

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

  17. melvin-bot commented on Feb 7, 2024

    @melvin-bot

    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:

    • [@thesahindia] The PR that introduced the bug has been identified. Link to the PR:
    • [@thesahindia] 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:
    • [@thesahindia] 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:
    • [@thesahindia] Determine if we should create a regression test for this bug.
    • [@thesahindia] 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.
    • [@slafortune] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:
  18. added
    Daily
    and removed
    Weekly
    on Feb 13, 2024
  19. slafortune commented on Feb 13, 2024

    @slafortune
    Contributor

    @thesahindia can you complete the checklist above? Thanks!

  20. slafortune commented on Feb 14, 2024

    @slafortune
    Contributor

    @bernhardoj - automatic offer (Contributor) Paid $500

    @thesahindia requires payment through NewDot Manual Requests - $500
    Waiting on checklist.

  21. thesahindia commented on Feb 14, 2024

    @thesahindia
    Member

    Test case steps -

    1. Open a group chat and send any message
    2. Open search page
    3. The first item on the search page should be the group chat. Hover over it.
    4. Verify the border color of the second avatar still matches with the background color
    5. Press the arrow down key once to move the focused option to the next item
    6. Repeat step 3-4
  22. slafortune commented on Feb 15, 2024

    @slafortune
    Contributor

    @thesahindia requires payment through NewDot Manual Requests - $500

  23. JmillsExpensify commented on Apr 8, 2024

    @JmillsExpensify
    Contributor

    $500 approved for @thesahindia

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

Metadata

Metadata

Labels

Awaiting PaymentBugDailyExternal

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions