Skip to content

[Due for payment 2025-02-27] [$250] Group - Hover profile of group 6+ members, the tooltip displays five members without ellipsis #56582

Closed

Description

@IuliiaHerets

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: v9.0.95-1
Reproducible in staging?: Yes
Reproducible in production?: Yes
If this was caught during regression testing, add the test name, ID and link from TestRail: Exp
Issue reported by: Applause Internal Team
Device used: Win 11/Chrome
App Component: Chat Report View

Action Performed:

  1. Open https://staging.new.expensify.com/
  2. Click on group chat having 6+ members
  3. Hover over profile

Expected Result:

Hover over profile, the tooltip should display five members and ellipsis

Actual Result:

Hover over profile, the tooltip is displaying five members as this group only having 5 members

Workaround:

Unknown

Platforms:

  • Android: Standalone
  • Android: HybridApp
  • Android: mWeb Chrome
  • iOS: Standalone
  • iOS: HybridApp
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Bug6736754_1738976735798.Recording__900.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021889709690861886156
  • Upwork Job ID: 1889709690861886156
  • Last Price Increase: 2025-02-12
  • Automatic offers:
    • daledah | Contributor | 106130113
Issue OwnerCurrent Issue Owner: @CortneyOfstad

Activity

  1. added
    BugSomething is broken. Auto assigns a BugZero manager.
    on Feb 8, 2025
  2. melvin-bot commented on Feb 8, 2025

    @melvin-bot

    Triggered auto assignment to @CortneyOfstad (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.

  3. Shahidullah-Muffakir commented on Feb 8, 2025

    @Shahidullah-Muffakir
    Contributor

    🚨 Edited by proposal-police: This proposal was edited at 2025-02-08 19:21:33 UTC.

    Proposal

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

    we are only showing 5 users names in the group chat when user hovers over the avatar, but we are not adding the ellipsis for the rest of the names

    What is the root cause of that problem?

    1. we are not considering ellipsis here if the the length is more than 5:
      participantAccountIDs = participantAccountIDs.slice(0, 5);

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

    1. we can create a variable like
    let shouldUseEllipsis = false;
    1. and here when the length is more than 5 then show ellipsis:

      App/src/libs/ReportUtils.ts

      Lines 2583 to 2585 in 631006e

      if (shouldApplyLimit) {
      participantAccountIDs = participantAccountIDs.slice(0, 5);
      }

      as:
        if (shouldApplyLimit) {
            if(participantAccountIDs.length > 5) {
                shouldUseEllipsis = true;
            }
            participantAccountIDs = participantAccountIDs.slice(0, 5);
        }
    1. add the ... in the end here:

      App/src/libs/ReportUtils.ts

      Lines 2588 to 2597 in 631006e

      if (isMultipleParticipantReport) {
      return participantAccountIDs
      .map(
      (participantAccountID, index) =>
      getDisplayNameForParticipant({accountID: participantAccountID, shouldUseShortForm: isMultipleParticipantReport}) || formatPhoneNumber(participants?.[index]?.login ?? ''),
      )
      .sort((first, second) => localeCompare(first ?? '', second ?? ''))
      .filter(Boolean)
      .join(', ');
      }

      as:
                   .join(', ') + (shouldUseEllipsis ? '...' : '');

    What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?

    NA

    What alternative solutions did you explore? (Optional)

    If we want the ellipsis to be added only in the HeaderView, then:

    1. we can pass a new param like showEllipsis to the getIcons here:
      const icons = getIcons(reportHeaderData, personalDetails, null, '', -1, policy, invoiceReceiverPolicy);
    2. Then pass it here to the getGroupChatName:

      App/src/libs/ReportUtils.ts

      Lines 2764 to 2772 in 631006e

      if (isGroupChat(report)) {
      const groupChatIcon = {
      // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
      source: report.avatarUrl || getDefaultGroupAvatar(report.reportID),
      id: -1,
      type: CONST.ICON_TYPE_AVATAR,
      name: getGroupChatName(undefined, true, report),
      };
      return [groupChatIcon];
    3. and then only add the ellipsis based on this new param
    Screen.Recording.2025-02-09.at.12.39.14.AM.mov

    The alternative approach will work if we don't want the ellipsis in the details page as shown:

    Image
  4. daledah commented on Feb 9, 2025

    @daledah
    Contributor

    Proposal

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

    Group - Hover profile of group 6+ members, the tooltip displays five members without ellipsis

    What is the root cause of that problem?

    If the report has multiple participants we're get the first 5 first participants, then concat them in a single report name

    App/src/libs/ReportUtils.ts

    Lines 2583 to 2597 in 631006e

    if (shouldApplyLimit) {
    participantAccountIDs = participantAccountIDs.slice(0, 5);
    }
    const isMultipleParticipantReport = participantAccountIDs.length > 1;
    if (isMultipleParticipantReport) {
    return participantAccountIDs
    .map(
    (participantAccountID, index) =>
    getDisplayNameForParticipant({accountID: participantAccountID, shouldUseShortForm: isMultipleParticipantReport}) || formatPhoneNumber(participants?.[index]?.login ?? ''),
    )
    .sort((first, second) => localeCompare(first ?? '', second ?? ''))
    .filter(Boolean)
    .join(', ');
    }

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

    We have 2 issues here:

    1. The group name doesn't have the ellipsis style
    2. If the participant's display name/login name is too long, then when the user opens the group name settings, this may cause an error without any changes as we limit the maximum name length to 100 characters
    Image

    We should truncate the group name in

    .join(', ');

    .join(', ').slice(0, 100)
    

    What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?

    Test the getGroupChatName function to verify the output length is less than or equal 100 characters

    What alternative solutions did you explore? (Optional)

    We can also add the flag to enable/disable this feature in the specific page

    Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job.

  5. melvin-bot commented on Feb 12, 2025

    @melvin-bot

    @CortneyOfstad Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

  6. CortneyOfstad commented on Feb 12, 2025

    @CortneyOfstad
    Contributor

    Was able to see this within my own account (AM customer group with 7 members and only 5 names displaying, as shown below):

    Image
  7. added
    ExternalAdded to denote the issue can be worked on by a contributor
    on Feb 12, 2025
  8. changed the title [-]Group - Hover profile of group 6+ members, the tooltip displays five members without ellipsis[/-] [+][$250] Group - Hover profile of group 6+ members, the tooltip displays five members without ellipsis[/+] on Feb 12, 2025
  9. melvin-bot commented on Feb 12, 2025

    @melvin-bot
  10. 31 remaining items

  11. changed the title [-][$250] Group - Hover profile of group 6+ members, the tooltip displays five members without ellipsis[/-] [+][Due for payment 2025-02-27] [$250] Group - Hover profile of group 6+ members, the tooltip displays five members without ellipsis[/+] on Feb 20, 2025
  12. melvin-bot commented on Feb 20, 2025

    @melvin-bot

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

  13. melvin-bot commented on Feb 20, 2025

    @melvin-bot

    The solution for this issue has been 🚀 deployed to production 🚀 in version 9.1.1-6 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 2025-02-27. 🎊

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

  14. melvin-bot commented on Feb 20, 2025

    @melvin-bot

    @dukenv0307 @CortneyOfstad @dukenv0307 The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]

  15. CortneyOfstad commented on Feb 27, 2025

    @CortneyOfstad
    Contributor

    @dukenv0307 — please complete the checklist by EOD — thanks!

  16. dukenv0307 commented on Feb 27, 2025

    @dukenv0307
    Contributor

    BugZero Checklist:

    • [Contributor] Classify the bug:
    Bug classification

    Source of bug:

    • 1a. Result of the original design (eg. a case wasn't considered)
    • 1b. Mistake during implementation
    • 1c. Backend bug
    • 1z. Other:

    Where bug was reported:

    • 2a. Reported on production
    • 2b. Reported on staging (deploy blocker)
    • 2c. Reported on a PR
    • 2z. Other:

    Who reported the bug:

    • 3a. Expensify user
    • 3b. Expensify employee
    • 3c. Contributor
    • 3d. QA
    • 3z. Other:
    • [Contributor] 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: This is new requirement

    • [Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source 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

    • [Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again. Yes

    Regression Test Proposal Template
    • [BugZero Assignee] Create a GH issue for creating/updating the regression test once above steps have been agreed upon.

      Link to issue:

    Regression Test Proposal

    Test:

    1. Start a chat with many members, making the chat name very long
    2. Open Chat details
    3. Verify that: The Group name section the chat name is cut off
    4. Click on Group name
    5. Verify that: No errors is shown

    Do we agree 👍 or 👎

  17. dukenv0307 commented on Feb 27, 2025

    @dukenv0307
    Contributor

    @CortneyOfstad Done. Thank you

  18. CortneyOfstad commented on Feb 27, 2025

    @CortneyOfstad
    Contributor

    Payment Summary

    @daledah — paid $250 via Upwork
    @dukenv0307 — to be paid $250 via NewDot

    Regression Test

    https://github.com/Expensify/Expensify/issues/474937

  19. JmillsExpensify commented on Mar 12, 2025

    @JmillsExpensify
    Contributor

    $250 approved for @dukenv0307

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.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributor

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions