Skip to content

[HOLD for payment 2024-09-12] [$250] Workspace - Workspace profile page becomes grayed out when go offline #47260

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!


Version Number: 9.0.19-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: N/A
Email or phone of affected tester (no customers): gocemate+a919@gmail.com
Issue reported by: Applause - Internal Team

Action Performed:

  1. Login with gmail account
  2. Create workspace
  3. Go offline
  4. Go to workspace profile page

Expected Result:

Workspace profile page should not be grayed out since the workspace was created in online mode

Actual Result:

Workspace profile page becomes grayed out when user goes offline

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

Bug6570133_1723480443136.Recording__3695.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~0182138e49511ea4ac
  • Upwork Job ID: 1823362392640621309
  • Last Price Increase: 2024-08-27
  • Automatic offers:
    • shubham1206agra | Reviewer | 103705107
    • Krishna2323 | Contributor | 103705109
Issue OwnerCurrent Issue Owner: @shubham1206agra

Activity

  1. added
    BugSomething is broken. Auto assigns a BugZero manager.
    on Aug 12, 2024
  2. melvin-bot commented on Aug 12, 2024

    @melvin-bot

    Triggered auto assignment to @puneetlath (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. lanitochka17 commented on Aug 12, 2024

    @lanitochka17
    Author

    @puneetlath FYI I haven't added the External label as I wasn't 100% sure about this issue. Please take a look and add the label if you agree it's a bug and can be handled by external contributors

  4. lanitochka17 commented on Aug 12, 2024

    @lanitochka17
    Author

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

  5. Krishna2323 commented on Aug 12, 2024

    @Krishna2323
    Contributor

    Proposal

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

    Workspace - Workspace profile page becomes grayed out when go offline

    What is the root cause of that problem?

    Pending fields are not cleared in success data.

    pendingFields: {
    autoReporting: CONST.RED_BRICK_ROAD_PENDING_ACTION.ADD,
    approvalMode: CONST.RED_BRICK_ROAD_PENDING_ACTION.ADD,
    reimbursementChoice: CONST.RED_BRICK_ROAD_PENDING_ACTION.ADD,
    generalSettings: CONST.RED_BRICK_ROAD_PENDING_ACTION.ADD,
    description: CONST.RED_BRICK_ROAD_PENDING_ACTION.ADD,
    },

    pendingFields: {
    autoReporting: null,
    approvalMode: null,
    reimbursementChoice: null,
    },

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

    Clear pending fields in success data for generalSettings & description also.

    What alternative solutions did you explore? (Optional)

  6. Nodebrute commented on Aug 12, 2024

    @Nodebrute
    Contributor

    Proposal

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

    Workspace profile page becomes grayed out when go offline

    What is the root cause of that problem?

    We add these pendingFields in optimistic data

    generalSettings: CONST.RED_BRICK_ROAD_PENDING_ACTION.ADD,
    description: CONST.RED_BRICK_ROAD_PENDING_ACTION.ADD,

    But we do not remove them in Success data
    generalSettings: CONST.RED_BRICK_ROAD_PENDING_ACTION.ADD,
    description: CONST.RED_BRICK_ROAD_PENDING_ACTION.ADD,

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

    Actually, there's no need to include these lines because we're not waiting for a backend response for them. The backend response here doesn’t return a description or general settings, so we can safely remove these two lines.

    generalSettings: CONST.RED_BRICK_ROAD_PENDING_ACTION.ADD,
    description: CONST.RED_BRICK_ROAD_PENDING_ACTION.ADD,

    What alternative solutions did you explore? (Optional)

  7. added
    ExternalAdded to denote the issue can be worked on by a contributor
    on Aug 13, 2024
  8. changed the title [-]Workspace - Workspace profile page becomes grayed out when go offline[/-] [+][$250] Workspace - Workspace profile page becomes grayed out when go offline[/+] on Aug 13, 2024
  9. melvin-bot commented on Aug 13, 2024

    @melvin-bot
  10. added
    Help WantedApply this label when an issue is open to proposals by contributors
    on Aug 13, 2024
  11. melvin-bot commented on Aug 13, 2024

    @melvin-bot

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

  12. dominictb commented on Aug 14, 2024

    @dominictb
    Contributor

    Edited by proposal-police: This proposal was edited at 2024-08-14 11:16:16 UTC.

    Proposal

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

    Workspace profile page becomes grayed out when user goes offline

    What is the root cause of that problem?

    In this PR, we plan to just add generalSettings: CONST.RED_BRICK_ROAD_PENDING_ACTION, but description: CONST.RED_BRICK_ROAD_PENDING_ACTION.ADD, is also added.

    And these pendingFields are not cleared in successData and failureData:

    pendingFields: {
    autoReporting: null,
    approvalMode: null,
    reimbursementChoice: null,
    },
    leads to the bug.

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

    • We can add:
                        generalSettings: null,
                        description: null,
    

    in:

    pendingFields: {

    and

            {
                onyxMethod: Onyx.METHOD.MERGE,
                key: `${ONYXKEYS.COLLECTION.POLICY}${policyID}`,
                value: {
                    pendingAction: null,
                    pendingFields: {
                        autoReporting: null,
                        approvalMode: null,
                        reimbursementChoice: null,
                        generalSettings: null,
                        description: null,
                    },
                },
            },
    

    in:

    const failureData: OnyxUpdate[] = [

    address: CONST.RED_BRICK_ROAD_PENDING_ACTION.ADD,
    generalSettings: CONST.RED_BRICK_ROAD_PENDING_ACTION.ADD
    

    and then also clear these in successData and failureData.

    What alternative solutions did you explore? (Optional)

    • We can remove all the pendingFields:
      pendingFields: {
      autoReporting: CONST.RED_BRICK_ROAD_PENDING_ACTION.ADD,
      approvalMode: CONST.RED_BRICK_ROAD_PENDING_ACTION.ADD,
      reimbursementChoice: CONST.RED_BRICK_ROAD_PENDING_ACTION.ADD,
      generalSettings: CONST.RED_BRICK_ROAD_PENDING_ACTION.ADD,
      description: CONST.RED_BRICK_ROAD_PENDING_ACTION.ADD,
      },

    then update:

    <OfflineWithFeedback pendingAction={policy?.pendingFields?.generalSettings}>

                                <OfflineWithFeedback pendingAction={policy?.pendingFields?.generalSettings ?? policy?.pendingAction}>
    

    Similar logic should applied to:

    pendingAction={policy?.pendingFields?.description}

    pendingAction={policy?.pendingFields?.generalSettings}

    <OfflineWithFeedback pendingAction={policy?.pendingFields?.generalSettings}>

  13. 30 remaining items

  14. melvin-bot commented on Aug 27, 2024

    @melvin-bot

    📣 @Krishna2323 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app!

    Offer link
    Upwork job
    Please accept the offer and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review 🧑‍💻
    Keep in mind: Code of Conduct | Contributing 📖

  15. shubham1206agra commented on Sep 7, 2024

    @shubham1206agra
    Contributor

    @trjExpensify Can you add label for payment on 12th September?

  16. changed the title [-][$250] Workspace - Workspace profile page becomes grayed out when go offline[/-] [+][HOLD for payment 2024-09-12] [$250] Workspace - Workspace profile page becomes grayed out when go offline[/+] on Sep 9, 2024
  17. added
    Awaiting PaymentAuto-added when associated PR is deployed to production
    and removed
    ReviewingHas a PR in review
    on Sep 10, 2024
  18. trjExpensify commented on Sep 10, 2024

    @trjExpensify
    Contributor

    @puneetlath has actioned on that, I've added the Awaiting payment label as well now.

  19. puneetlath commented on Sep 13, 2024

    @puneetlath
    Contributor

    I've paid @Krishna2323.

    @shubham1206agra can you please complete the checklist?

  20. shubham1206agra commented on Sep 13, 2024

    @shubham1206agra
    Contributor

    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:

  21. puneetlath commented on Sep 13, 2024

    @puneetlath
    Contributor

    Ok great. All paid. Thanks everyone!

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

Type

No type

Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions