Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[$500] Web - Task -Deleted task message & user avatar not greyed out when deleted offline #33986

Closed
5 of 6 tasks
lanitochka17 opened this issue Jan 5, 2024 · 28 comments
Closed
5 of 6 tasks
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. External Added to denote the issue can be worked on by a contributor Monthly KSv2 Reviewing Has a PR in review

Comments

@lanitochka17
Copy link

lanitochka17 commented Jan 5, 2024

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.22-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: Applause - Internal Team
Slack conversation:

Issue found when executing PR #29730

Action Performed:

  1. Go to https://staging.new.expensify.com/
    and log in
  2. Disable internet connection
  3. Create a task
  4. Add a comment to the task
  5. Delete the created task

Expected Result:

The "Deleted task" message and user avatar are greyed out

Actual Result:

The "Deleted task" message and user's avatar are not greyed out

Workaround:

Unknown

Platforms:

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

  • Android: Native
  • Android: mWeb Chrome
  • iOS: Native
  • iOS: mWeb Safari
  • Windows: Chrome
  • MacOS: Desktop

Screenshots/Videos

Add any screenshot/video evidence

Bug6332647_1704411433137.Recording__89.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01de665dd153fc50f2
  • Upwork Job ID: 1743064675274317824
  • Last Price Increase: 2024-01-05
  • Automatic offers:
    • dukenv0307 | Contributor | 28094515
@lanitochka17 lanitochka17 added External Added to denote the issue can be worked on by a contributor Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Jan 5, 2024
@melvin-bot melvin-bot bot changed the title Web - Task -Deleted task message & user avatar not greyed out when deleted offline [$500] Web - Task -Deleted task message & user avatar not greyed out when deleted offline Jan 5, 2024
Copy link

melvin-bot bot commented Jan 5, 2024

Job added to Upwork: https://www.upwork.com/jobs/~01de665dd153fc50f2

Copy link

melvin-bot bot commented Jan 5, 2024

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

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Jan 5, 2024
Copy link

melvin-bot bot commented Jan 5, 2024

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

Copy link

melvin-bot bot commented Jan 5, 2024

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

@abzokhattab
Copy link
Contributor

abzokhattab commented Jan 5, 2024

Proposal

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

Deleted task message & user avatar not greyed out when deleted offline

What is the root cause of that problem?

Currently, the [Deleted Task] message is displayed, but it's not integrated with the OfflineWithFeedback component, unlike other messages

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

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

we need to embed it into OfflineWithFeedback:

     return (
                    <OfflineWithFeedback pendingAction={props.action.pendingAction}>
                        <AnimatedEmptyStateBackground />
                        <View style={[StyleUtils.getReportWelcomeTopMarginStyle(props.isSmallScreenWidth)]}>
                            <ReportActionItemSingle
                                action={parentReportAction}
                                showHeader={_.isUndefined(props.draftMessage)}
                                report={props.report}
                            >
                                <RenderHTML html={`<comment>${props.translate('parentReportAction.deletedTask')}</comment>`} />
                            </ReportActionItemSingle>
                            <View style={styles.reportHorizontalRule} />
                        </View>
                    </OfflineWithFeedback>
                );

POC

image

@dukenv0307
Copy link
Contributor

Proposal

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

The "Deleted task" message and user's avatar are not greyed out

What is the root cause of that problem?

Delete task has no offline feedback

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

Wrap the delete task with OfflineWithFeedback with pendingAction is parentReportAction.pendingAction.

<OfflineWithFeedback pendingAction={parentReportAction.pendingAction}>
    <AnimatedEmptyStateBackground />
    <View style={[StyleUtils.getReportWelcomeTopMarginStyle(props.isSmallScreenWidth)]}>
        <ReportActionItemSingle
            action={parentReportAction}
            showHeader={_.isUndefined(props.draftMessage)}
            report={props.report}
        >
            <RenderHTML html={`<comment>${props.translate('parentReportAction.deletedTask')}</comment>`} />
        </ReportActionItemSingle>
        <View style={styles.reportHorizontalRule} />
    </View>
</OfflineWithFeedback>

*Note: We display delete task base on parentReportAction so we should use pendingAction of parentReportAction. If we use props.action.pendingAction, the delete task message doesn't grey out for this case

  1. Create task in online mode
  2. Go offline, open task report, send a message and cancel task report

What alternative solutions did you explore? (Optional)

NA

@abzokhattab
Copy link
Contributor

there is a typo here #33986 (comment) I mistakenly posted props.action.pendingAction but the correct one is the one used in the < ReportActionItemSingle tag and in the props.translate function mentioned in the proposal which is the parentReportAction not the action itself... thanks

@melvin-bot melvin-bot bot added the Overdue label Jan 8, 2024
@zanyrenney
Copy link
Contributor

@rushatgabhane please can you review the proposals?

@melvin-bot melvin-bot bot removed the Overdue label Jan 8, 2024
@rushatgabhane
Copy link
Member

I like @dukenv0307's proposal #33986 (comment) because it's more accurate
🎀 👀 🎀

Copy link

melvin-bot bot commented Jan 10, 2024

Triggered auto assignment to @marcaaron, see https://stackoverflow.com/c/expensify/questions/7972 for more details.

@melvin-bot melvin-bot bot removed the Help Wanted Apply this label when an issue is open to proposals by contributors label Jan 11, 2024
Copy link

melvin-bot bot commented Jan 11, 2024

📣 @dukenv0307 🎉 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 📖

@zanyrenney
Copy link
Contributor

Assignging @dukenv0307 to work on this, thanks!

@marcaaron
Copy link
Contributor

Delete task has no offline feedback

Isn't this already wrapped though?

{renderReportActionItem(hovered || isReportActionLinked, isWhisper, hasErrors)}
</OfflineWithFeedback>

Maybe I did not understand the proposal.

@dukenv0307
Copy link
Contributor

@marcaaron The deleted task is rendered here. We return it without OfflineWithFeedback and it's not a case of renderReportActionItem

@melvin-bot melvin-bot bot added Reviewing Has a PR in review and removed Daily KSv2 labels Jan 12, 2024
@melvin-bot melvin-bot bot added the Weekly KSv2 label Jan 12, 2024
@dukenv0307
Copy link
Contributor

@rushatgabhane The PR is ready for review.

@rushatgabhane
Copy link
Member

@dukenv0307 even then, some items aren't wrapped with OfflineWithFeedback.

I'm thinking if we could refactor the component so that everything is wrapped with OfflineWithFeedback?

@rushatgabhane
Copy link
Member

@dukenv0307 i agree with @marcaaron #33986 (comment), could you dig deeper into why OfflineWithFeedback is required when renderReportActionItem() is already wrapped with OfflineWithFeedback.

{renderReportActionItem(hovered || isReportActionLinked, isWhisper, hasErrors)}
</OfflineWithFeedback>

@dukenv0307
Copy link
Contributor

@rushatgabhane Other created action already had OfflineWithFeedback in component it self.

OfflineWithFeedback is added to make the report action is grey out when it's create in offline.

@dukenv0307
Copy link
Contributor

@rushatgabhane Is there any other confuse here? Should PR be ready for review.?

@melvin-bot melvin-bot bot removed the Weekly KSv2 label Feb 19, 2024
Copy link

melvin-bot bot commented Feb 19, 2024

This issue has not been updated in over 15 days. @rushatgabhane, @marcaaron, @zanyrenney, @dukenv0307 eroding to Monthly issue.

P.S. Is everyone reading this sure this is really a near-term priority? Be brave: if you disagree, go ahead and close it out. If someone disagrees, they'll reopen it, and if they don't: one less thing to do!

@melvin-bot melvin-bot bot added the Monthly KSv2 label Feb 19, 2024
@dukenv0307
Copy link
Contributor

The PR is merged and just deployed to production @zanyrenney Please help to add weekly label again.

@rushatgabhane
Copy link
Member

payment request here- https://staging.new.expensify.com/r/6779795954208025

@rushatgabhane
Copy link
Member

@zanyrenney could you please attach payment summary. thanks 🙇

@JmillsExpensify
Copy link

Awaiting payment summary from @zanyrenney

@garrettmknight
Copy link
Contributor

garrettmknight commented Mar 27, 2024

Payment summary:

Upwork job: https://www.upwork.com/jobs/~01de665dd153fc50f2

@JmillsExpensify
Copy link

$500 approved for @rushatgabhane based on summary.

@zanyrenney
Copy link
Contributor

zanyrenney commented Apr 2, 2024

Thank you @garrettmknight for handling this one! I didn't see this bump before my OOO.

@rushatgabhane
Copy link
Member

Issue can be closed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something is broken. Auto assigns a BugZero manager. External Added to denote the issue can be worked on by a contributor Monthly KSv2 Reviewing Has a PR in review
Projects
None yet
Development

No branches or pull requests

8 participants