Skip to content

[$500] Task - [Deleted task] is not grayed out in task report when the task is deleted offline #28190

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!


Action Performed:

  1. Go to staging.new.expensify.com
  2. click the green FAB button > Assign a Task
  3. Add a Title and a Description
  4. Assign a known user to the Task
  5. Navigate to a task report
  6. Go offline
  7. Click three-dot menu > Cancel (you should see [Deleted Task])
  8. Return to the 1:1 DM where the task is shared

Expected Result:

In Step 4, after deleting the task, [Deleted task] message is grayed out

Actual Result:

In Step 4, after deleting the task, [Deleted task] message is not grayed out in the task report, while [Deleted task] is grayed out in 1:1 DM in Step 5

Workaround:

Unknown

Platforms:

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

  • Android / native
  • Android / Chrome
  • iOS / native
  • iOS / Safari
  • MacOS / Chrome / Safari
  • MacOS / Desktop

Version Number: 1.3.74-0

Reproducible in staging?: Yes

Reproducible in production?: Yes

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

Notes/Photos/Videos: Any additional supporting documentation

Bug6214084_20230926_023232.mp4

Expensify/Expensify Issue URL:

Issue reported by: Applause - Internal Team

Slack conversation:

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~0140a361ebd43cf297
  • Upwork Job ID: 1706757467311755264
  • Last Price Increase: 2023-10-03

Activity

  1. added
    BugSomething is broken. Auto assigns a BugZero manager.
    on Sep 25, 2023
  2. melvin-bot commented on Sep 25, 2023

    @melvin-bot

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

  3. melvin-bot commented on Sep 25, 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
  4. hungvu193 commented on Sep 26, 2023

    @hungvu193
    Contributor

    Proposal

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

    Task - [Deleted task] is not grayed out in task report when the task is deleted offline

    What is the root cause of that problem?

    When user canceled a task, we only added the pendingAction for taskAction and the parentAction here:

    [parentReportAction.reportActionID]: {
    pendingAction: CONST.RED_BRICK_ROAD_PENDING_ACTION.UPDATE,

    onyxMethod: Onyx.METHOD.MERGE,
    key: `${ONYXKEYS.COLLECTION.REPORT_ACTIONS}${taskReportID}`,
    value: {
    [optimisticReportActionID]: optimisticCancelReportAction,

    Also we didn't wrap our canceled task view with OfflineWithFeedback, so we it won't grey out when task is deleted offline:

    if (ReportUtils.isCanceledTaskReport(props.report, parentReportAction)) {
    return (
    <>
    <ReportActionItemSingle
    action={parentReportAction}
    showHeader={!props.draftMessage}
    wrapperStyles={[styles.chatItem]}
    report={props.report}
    >
    <RenderHTML html={`<comment>${props.translate('parentReportAction.deletedTask')}</comment>`} />
    </ReportActionItemSingle>
    <View style={styles.reportHorizontalRule} />
    </>

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

    Add pendingAction: CONST.RED_BRICK_ROAD_PENDING_ACTION.UPDATE to our optimisticData here

    Also clean up it here:

            {
                onyxMethod: Onyx.METHOD.MERGE,
                key: `${ONYXKEYS.COLLECTION.REPORT}${taskReportID}`,
                value: {
                    pendingAction: null
                }
            }

    Finally wrap our canceled task view with OfflineWithFeedback.

    if (ReportUtils.isCanceledTaskReport(props.report, parentReportAction)) {
        return (
            <OfflineWithFeedback pendingAction={props.report.pendingAction}>
            </OfflineWithFeedback>
        );
    }

    What alternative solutions did you explore? (Optional)

    N/A

  5. DylanDylann commented on Sep 26, 2023

    @DylanDylann
    Contributor

    Proposal

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

    [Deleted task] is not grey when cancelling task offline

    What is the root cause of that problem?

    if (ReportUtils.isTaskReport(props.report)) {
    if (ReportUtils.isCanceledTaskReport(props.report, parentReportAction)) {
    return (
    <>
    <ReportActionItemSingle
    action={parentReportAction}
    showHeader={!props.draftMessage}
    wrapperStyles={[styles.chatItem]}
    report={props.report}
    >
    <RenderHTML html={`<comment>${props.translate('parentReportAction.deletedTask')}</comment>`} />
    </ReportActionItemSingle>
    <View style={styles.reportHorizontalRule} />
    </>
    );
    }

    We don’t wrap [Deleted task] message by OfflineWithFeedback Component

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

    we should add OfflineWithFeedback Component as wrapper like this

    <OfflineWithFeedback pendingAction={parentReportAction.pendingAction}>
    
  6. DylanDylann commented on Sep 26, 2023

    @DylanDylann
    Contributor

    My proposal post first in Slack

  7. Christinadobrzyn commented on Sep 26, 2023

    @Christinadobrzyn
    Contributor

    I can reproduce this but I'm not actually sure if this is a bug or a feature request.

    When you come back online, the [Deleted Task] is bold in both the chat and the Task Assignment. I don't know if this needs to be fixed now. What is expected when you're online? It should be bold right?

    2023-09-26_11-14-22 (1)

  8. Christinadobrzyn commented on Sep 26, 2023

    @Christinadobrzyn
    Contributor
  9. Christinadobrzyn commented on Sep 26, 2023

    @Christinadobrzyn
    Contributor

    Follow up from Slack chat: https://expensify.slack.com/archives/C01SKUP7QR0/p1695748789919179

    This is a polish job so something we should move forward with fixing.

    Expensify Tasks Design doc (not available for everyone) says we follow offline first. So that would indicate that the [Deleted Message] needs to be greyed out not bold.

    I'm not sure if this should be Internal or External so adding External.

  10. added
    InternalRequires API changes or must be handled by Expensify staff
    on Sep 26, 2023
  11. melvin-bot commented on Sep 26, 2023

    @melvin-bot
  12. melvin-bot commented on Sep 26, 2023

    @melvin-bot

    Triggered auto assignment to Contributor Plus for review of internal employee PR - @jjcoffee (Internal)

  13. 20 remaining items

  14. jjcoffee commented on Oct 3, 2023

    @jjcoffee
    Contributor

    @hungvu193 Do you want to weigh in on this?

  15. hungvu193 commented on Oct 3, 2023

    @hungvu193
    Contributor

    I believe the task in LHN grey out is expected, because we're deleting the task not a specific action.

  16. DylanDylann commented on Oct 3, 2023

    @DylanDylann
    Contributor

    One more thing, We want to grey out the first message of task report (It is a report action). IMO, It is more suitable if we use pending action of report action to grey out report action (this is way we use in other palces). we shouldn't use pending action of report to grey out the report action (don't use in other places).

  17. hungvu193 commented on Oct 3, 2023

    @hungvu193
    Contributor

    We still use the pendingAction of the report for action for few cases, for examples:

    pendingAction={lodashGet(props.report, 'pendingFields.addWorkspaceRoom') || lodashGet(props.report, 'pendingFields.createChat')}

    In this case, I just want to update pendingAction on the actual task report.

  18. jjcoffee commented on Oct 3, 2023

    @jjcoffee
    Contributor

    @DylanDylann The task report is already greyed out in LHN for me on latest main.

    Remember that the point of pendingAction isn't only to grey things out 😄 We could also technically just pass isDeletedParentAction as the pendingAction in OfflineWithFeedback, since we already set that optimistically here but I think we're just splitting hairs here as any method works, unless @francoisl has a strong opinion otherwise!

  19. DylanDylann commented on Oct 3, 2023

    @DylanDylann
    Contributor

    We want to grey out the first message of task report (It is a report action). IMO, It is more suitable if we use pending action of report action to grey out report action (this is way we use in other palces). we shouldn't use pending action of report to grey out the report action (don't use in other places).

    Just a final note, some action to task report on offline will make the first message of task report is greyed out if we use pendingAction of report for it.

  20. melvin-bot commented on Oct 3, 2023

    @melvin-bot

    📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

  21. Christinadobrzyn commented on Oct 3, 2023

    @Christinadobrzyn
    Contributor

    hi @jjcoffee let me know if these proposals are looking good or if you'd like to see more!

  22. francoisl commented on Oct 4, 2023

    @francoisl
    Contributor

    Looks like we just did some refactoring for tasks with #24601 / #27827 and I'm not sure this is still an issue... in particular, after canceling a task while offline, we now still display the regular task view, with the task name / checkbox, description and assignee - and no [Deleted task] message as reported above.

    Screen.Recording.2023-10-03.at.9.06.04.PM.mov

    Am I missing something, or is this no longer an issue?

  23. hungvu193 commented on Oct 4, 2023

    @hungvu193
    Contributor

    Looks like we just did some refactoring for tasks with #24601 / #27827 and I'm not sure this is still an issue... in particular, after canceling a task while offline, we now still display the regular task view, with the task name / checkbox, description and assignee - and no [Deleted task] message as reported above.

    Screen.Recording.2023-10-03.at.9.06.04.PM.mov
    Am I missing something, or is this no longer an issue?

    Hmm yeah, It seems we are no longer added [Deleted task] message. So this is not reproducible anymore.

  24. jjcoffee commented on Oct 4, 2023

    @jjcoffee
    Contributor

    Sorry I missed that! We're good to close this then @francoisl

  25. Christinadobrzyn commented on Oct 4, 2023

    @Christinadobrzyn
    Contributor

    I'll ask QA to test just to make sure this is not happening anymore - https://expensify.slack.com/archives/C9YU7BX5M/p1696434612063849

  26. kbecciv commented on Oct 4, 2023

    @kbecciv

    @Christinadobrzyn Issue is not reproduced on v1.3.77-5. We are seeing old UI task page instead of the new one. Is this expected?

    20231005_001741.mp4

    New UI task page
    Screenshot 2023-10-05 at 00 25 00

  27. francoisl commented on Oct 5, 2023

    @francoisl
    Contributor

    I believe your "New UI task page" is from the video in the original post on an older version? Anyway, looks like this is no longer an issue, going to close.

    Thanks for the proposals anyway everyone, and on to the next one 🚀

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.DailyKSv2ExternalAdded 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