Skip to content

[HOLD for payment 2023-12-29] [$500] Expense avatar and Report avatar in LHN look incorrect #32413

Closed

Description

@m-natarajan

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: 1.4.7-0
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: @shawnborton
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1701439047370489

Action Performed:

Create an expense on a workspace, submit it

Expected Result:

In the LHN (not in #focus mode), the avatar for an expense should have the user's avatar at 40x40 with the small workspace avatar to the bottom right.
For the report, we should have the diagonal avatar pattern where both the workspace avatar and user avatar are the same height/width, but are diagonal from each other

Actual Result:

The avatars are incorrect

Workaround:

Can the user still use Expensify without this being fixed? Have you informed them of the workaround?

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
CleanShot 2023-12-01 at 08 54 52@2x

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~0197708be36886dd46
  • Upwork Job ID: 1731331203476029440
  • Last Price Increase: 2023-12-10
  • Automatic offers:
    • Ollyws | Reviewer | 28036548
    • shubham1206agra | Contributor | 28036550

Activity

  1. added
    ExternalAdded to denote the issue can be worked on by a contributor
    BugSomething is broken. Auto assigns a BugZero manager.
    on Dec 3, 2023
  2. changed the title [-]Expense avatar and Report avatar in LHN look incorrect[/-] [+][$500] Expense avatar and Report avatar in LHN look incorrect[/+] on Dec 3, 2023
  3. melvin-bot commented on Dec 3, 2023

    @melvin-bot

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

  4. melvin-bot commented on Dec 3, 2023

    @melvin-bot
  5. melvin-bot commented on Dec 3, 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
  6. added
    Help WantedApply this label when an issue is open to proposals by contributors
    on Dec 3, 2023
  7. melvin-bot commented on Dec 3, 2023

    @melvin-bot

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

  8. chiItepin commented on Dec 3, 2023

    @chiItepin

    This appears to be by design since the request would be a thread from a report.

    And whenever there's an expense report thread, the avatar size is smaller

  9. yh-0218 commented on Dec 3, 2023

    @yh-0218
    Contributor

    Proposal

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

    Expense avatar and Report avatar in LHN look incorrect

    What is the root cause of that problem?

    Because we use CONST.AVATAR_SIZE.SMALL_NORMAL when isExpenseRequest = true

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

    We need to use only props.size or CONST.AVATAR_SIZE.DEFAULT here, here and here

    What alternative solutions did you explore? (Optional)

    Screenshot 2023-12-03 at 7 40 19 PM
  10. shubham1206agra commented on Dec 3, 2023

    @shubham1206agra
    Contributor

    Proposal

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

    Expense avatar and Report avatar in LHN look incorrect

    What is the root cause of that problem?

    The diagonal avatar pattern was missing from the Expense report and IOU report because there is a bug in isWorkspaceThread function which also gives true for the thread which is not a chat (i.e., IOU or expense).

    For design pattern reference
    #20512 (comment)

    For Avatar size, as referenced below, it was decided to keep the avatar size irrespective of isExpenseRequest. And here are the finalized avatar designs

    1. Subscript
      a. Normal Size
      The main avatar is of size 40x40, with the subscript avatar being of size 20x20, with a border width of 2, and an offset of -4 to the bottom and right
      b. Compact Size
      The main avatar is 24x24, with the subscript avatar being 12x12, with a border width of 2 and an offset of -2 to the bottom and right.

    2. Multiple Avatar
      a. Normal Size
      Both avatars have size 24x24, and the second avatar has a border width of 2, and an offset of -18 to the bottom and right.
      b. Compact Size
      Both avatars are 16x16, and the second avatar has a border width of 2 and an offset of -14 to the bottom and right.

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

    Use the following implementation instead cause the workspace thread will always be of type chat

    function isWorkspaceThread(report: OnyxEntry<Report>): boolean {
        return isThread(report) && isChatReport(report) && !isDM(report);
    }

    OR

    function isWorkspaceThread(report: OnyxEntry<Report>): boolean {
        return isThread(report) && isChatReport(report) && Boolean(getChatType(report));
    }

    There are too many changes regarding design, so please take a look at test branch https://github.com/shubham1206agra/App/tree/test-avatar

    Screen.Recording.2023-12-03.at.11.42.34.PM.mov

    What alternative solutions did you explore? (Optional)

    NA

  11. shubham1206agra commented on Dec 3, 2023

    @shubham1206agra
    Contributor

    @shawnborton Can you see the video uploaded here about the diagonal avatar, and see if the cases are correct? I have not adjusted size yet, but will do it later.

  12. 46 remaining items

  13. Ollyws commented on Jan 3, 2024

    @Ollyws
    Contributor

    BugZero Checklist:

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

    This was just a design update so no PR responsible.

    • 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:

    N/A

    • 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:

    N/A

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

    It might be worth adding to the monthly tests as it only requires a quick look.

  14. Ollyws commented on Jan 3, 2024

    @Ollyws
    Contributor

    Regression Test Proposal

    1. Verify that LHN avatars are according to https://github.com/Expensify/App/issues/32413#issuecomment-1838749642
    

    Do we agree 👍 or 👎

  15. rlinoz commented on Jan 8, 2024

    @rlinoz
    Contributor

    I am not familiar with how we add/remove things from the regression test, do you think it is worth adding this one @peterdbarkerUK ? Thinking that we will need to remove/change this test when we change how we represent each kind of chat.

  16. melvin-bot commented on Jan 11, 2024

    @melvin-bot

    @rlinoz, @Ollyws, @peterdbarkerUK, @shubham1206agra Whoops! This issue is 2 days overdue. Let's get this updated quick!

  17. Ollyws commented on Jan 15, 2024

    @Ollyws
    Contributor

    Good point, maybe I was being a little overzealous proposing a regression test here. Feel free to leave it off.

  18. rlinoz commented on Jan 17, 2024

    @rlinoz
    Contributor

    So I guess we can close this one?

  19. peterdbarkerUK commented on Jan 22, 2024

    @peterdbarkerUK
    Contributor

    I agree that we don't need to add regression tests, Olly is right this doesn't need much of a check closing!

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

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions