Skip to content

[$500] Workspace-Some workspaces are shown in bold and some not #35766

Closed

Description

@izarutskaya

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.36
Reproducible in staging?: Y
Reproducible in production?: N
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:

Pre-condition: open account with many workspaces created

  1. Go to https://staging.new.expensify.com/
  2. Tap in top right icon
  3. Scroll down list of workspaces

Expected Result:

All workspaces should be displayed in same manner.

Actual Result:

Some workspaces are shown in bold and some not.

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

Bug6366196_1706985592680.az_recorder_20240203_015705.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~015db9082b5dbefc79
  • Upwork Job ID: 1753900794333388800
  • Last Price Increase: 2024-02-03

Activity

  1. added
    DeployBlockerCashThis issue or pull request should block deployment
    ExternalAdded to denote the issue can be worked on by a contributor
    BugSomething is broken. Auto assigns a BugZero manager.
    on Feb 3, 2024
  2. melvin-bot commented on Feb 3, 2024

    @melvin-bot
  3. changed the title [-]Workspace-Some workspaces are shown in bold and some not[/-] [+][$500] Workspace-Some workspaces are shown in bold and some not[/+] on Feb 3, 2024
  4. added
    Help WantedApply this label when an issue is open to proposals by contributors
    on Feb 3, 2024
  5. melvin-bot commented on Feb 3, 2024

    @melvin-bot

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

  6. melvin-bot commented on Feb 3, 2024

    @melvin-bot

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

  7. github-actions commented on Feb 3, 2024

    @github-actions
    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.
  8. melvin-bot commented on Feb 3, 2024

    @melvin-bot

    Triggered auto assignment to @marcaaron (Engineering), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.

  9. izarutskaya commented on Feb 3, 2024

    @izarutskaya
    Author

    We think that this bug might be related to #vip-vsb
    CC @quinthar

  10. ZhenjaHorbach commented on Feb 3, 2024

    @ZhenjaHorbach
  11. puneet2715 commented on Feb 3, 2024

    @puneet2715

    @ZhenjaHorbach then the actual bug is that some workspace names are not getting the bold font even after having a green or red dot, meanwhile some have bold text even without a dot.

  12. melvin-bot commented on Feb 3, 2024

    @melvin-bot

    📣 @puneet2715! 📣
    Hey, it seems we don’t have your contributor details yet! You'll only have to do this once, and this is how we'll hire you on Upwork.
    Please follow these steps:

    1. Make sure you've read and understood the contributing guidelines.
    2. Get the email address used to login to your Expensify account. If you don't already have an Expensify account, create one here. If you have multiple accounts (e.g. one for testing), please use your main account email.
    3. Get the link to your Upwork profile. It's necessary because we only pay via Upwork. You can access it by logging in, and then clicking on your name. It'll look like this. If you don't already have an account, sign up for one here.
    4. Copy the format below and paste it in a comment on this issue. Replace the placeholder text with your actual details.
      Screen Shot 2022-11-16 at 4 42 54 PM
      Format:
    Contributor details
    Your Expensify account email: <REPLACE EMAIL HERE>
    Upwork Profile Link: <REPLACE LINK HERE>
    
  13. muas19 commented on Feb 3, 2024

    @muas19

    Proposal

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

    Some workspaces are shown in bold and some not.

    What is the root cause of that problem?

    There might be a delay from onyx when new data is returned for a policy in
    This line

    boldStyle: hasUnreadData(policy?.id),

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

    We could pass a false type to the hasBoldStyle or remove it altogether since the unread have their own green/red dots.

    What alternative solutions did you explore? (Optional)

  14. ikevin127 commented on Feb 4, 2024

    @ikevin127
    Contributor

    Proposal

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

    Some workspaces names are not shown in bold text when they are supposed to due to either having red / green brick indicators.

    What is the root cause of that problem?

    App/src/libs/ReportUtils.ts

    Lines 3569 to 3578 in 3ab4e6e

    function isUnread(report: OnyxEntry<Report>): boolean {
    if (!report) {
    return false;
    }
    // lastVisibleActionCreated and lastReadTime are both datetime strings and can be compared directly
    const lastVisibleActionCreated = report.lastVisibleActionCreated ?? '';
    const lastReadTime = report.lastReadTime ?? '';
    return lastReadTime < lastVisibleActionCreated;
    }

    Both getWorkspacesUnreadStatuses and ReportUtils.isUnread functions are working as expected. If there's any unread report within a workspace (policy) based on the code block above -> the isUnread will return true for that said report which is part of the workspace -> therefore we will see the workspace name text having the bold style.

    If what we want here as expected result is to keep the workspace name in bold style when there's no unread reports, but we have red / green brick indicators present then the problem is we're missing an additional condition where we set the boldStyle: hasUnreadData(policy?.id).

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

    Within the WorkspaceSwitcherPage component, add additional condition to boldStyle as follows:

    • boldStyle: hasUnreadData(policy?.id) || !!getIndicatorTypeForPolicy(policy?.id)

    this way if within any of that workspace's reports there's any kind of indicator present -> the workspace name text will have the bold style until the indicator is resolved by the user within the report that is causing it.

    Videos

    iOS: Native
    Before After
    Screen.Recording.2024-02-04.at.15.53.24.mov
    b89f75a4-a9fb-467c-b867-5a44fabd4d3f.mp4
  15. mountiny commented on Feb 5, 2024

    @mountiny
    Contributor

    This is not a blocker, I actually think this is expected behaviour

  16. mountiny commented on Feb 5, 2024

    @mountiny
    Contributor

    This is a dupe of existing issue with better issue body/ repro steps here #35682

  17. trjExpensify commented on Feb 5, 2024

    @trjExpensify
    Contributor

    Right, if the workspace in question has chats with unread messages, the row should be bold. We don't add a GBR for unread messages.

    That said, I think there's a bug with the bold rows, as logged here: #35682

    Perhaps this issue is just a dupe.

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

Metadata

Metadata

Labels

BugSomething is broken. Auto assigns a BugZero manager.DailyKSv2EngineeringExternalAdded to denote the issue can be worked on by a contributorHelp WantedApply this label when an issue is open to proposals by contributors

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions