Skip to content

[HOLD for payment 2023-08-17] [$1000] Update Task title/description/assignee when offline is not grey out #23200

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

Closed
1 of 6 tasks
kavimuru opened this issue Jul 19, 2023 · 30 comments
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. External Added to denote the issue can be worked on by a contributor Weekly KSv2

Comments

@kavimuru
Copy link

kavimuru commented Jul 19, 2023

If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!


Action Performed:

  1. Go to any Task report
  2. Turn off network
  3. Update task title/description/assignee

Expected Result:

Task title/description/assignee should be grey out when update in offline mode

Actual Result:

Task title/description/assignee is not grey out

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 / Chrome
  • iOS / native
  • iOS / Safari
  • MacOS / Chrome / Safari
  • MacOS / Desktop

Version Number: 1.3.43-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
Notes/Photos/Videos: Any additional supporting documentation

Screen.Recording.2023-07-17.at.23.20.26.mov

Snip - (4) New Expensify - Google Chrome

Expensify/Expensify Issue URL:
Issue reported by: @hoangzinh
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1689611035906189

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~0138286787014f7dd4
  • Upwork Job ID: 1682219760636948480
  • 2023-07-21
  • Automatic offers:
    • mollfpr | Reviewer | 25750552
    • | | 0
    • hoangzinh | Reporter | 25750553
@kavimuru kavimuru added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Jul 19, 2023
@melvin-bot
Copy link

melvin-bot bot commented Jul 19, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented Jul 19, 2023

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

@allroundexperts
Copy link
Contributor

allroundexperts commented Jul 19, 2023

Proposal

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

Updated task actions are not greyed out when offline.

What is the root cause of that problem?

We're not wrapping the items inside the TaskView component inside a OfflineWithFeedback component.

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

Wrap the items inside TaskView inside OfflineWithFeedback. In order for this to work, we need to make sure that the edited fields are correctly represented in the pendingFields section of the report. To do this, we can add the appropriate pending fields while setting the optimistic data in editTaskAndNavigate and createTaskAndNavigate function.

To demonstrate the approach, I'll just show the steps needed to implement the greying out of the task title on edit.

  1. Replace the fragment here with:
<OfflineWithFeedback
    onClose={() => {}}
    pendingAction={props.report.pendingFields.reportName}
    errors={null}
    errorRowStyles={[styles.ml10, styles.mr2]}
>
.
.
.
</OfflineWithFeedback>
  1. Add the following pendingFields in the report when editing a task here.
pendingFields: {
    ...title && {reportName: 'update'},
},
  1. Set the pendingFields as {} in the success data.

Result

Screenshot 2023-07-20 at 3 04 36 AM

What alternative solutions did you explore? (Optional)

Instead of using OfflineWithFeedback component, we can just add a style that sets opacity to 0.5 if there is a pending field in the report.

@tjferriss tjferriss added the External Added to denote the issue can be worked on by a contributor label Jul 21, 2023
@melvin-bot melvin-bot bot changed the title Update Task title/description/assignee when offline is not grey out [$1000] Update Task title/description/assignee when offline is not grey out Jul 21, 2023
@melvin-bot
Copy link

melvin-bot bot commented Jul 21, 2023

Job added to Upwork: https://www.upwork.com/jobs/~0138286787014f7dd4

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Jul 21, 2023
@melvin-bot
Copy link

melvin-bot bot commented Jul 21, 2023

Current assignee @tjferriss is eligible for the External assigner, not assigning anyone new.

@melvin-bot
Copy link

melvin-bot bot commented Jul 21, 2023

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

@tjferriss
Copy link
Contributor

It actually looks like it's intended that we do not grey this out per #22907

@allroundexperts
Copy link
Contributor

@tjferriss The bug that you linked is actually something different. There, the following was happening:

  1. You're online and create a task. It gets created successfully and the backend returns a correct response.
  2. The user goes offline and the task is greyed.

Since the task was created successfully previously (the user was online then) it should not be greyed once the user goes offline. That was the bug there.

Please re-open this as its a valid bug.

@tjferriss
Copy link
Contributor

Got it. Thanks for the clarification. I'm able to reproduce the bug.

@tjferriss tjferriss reopened this Jul 24, 2023
@mollfpr
Copy link
Contributor

mollfpr commented Jul 25, 2023

I agree with @allroundexperts RCA and solution. We didn't use the OfflineWithFeedback on the desired fields.

Let's go with go @allroundexperts proposal 🚀

🎀 👀 🎀 C+ reviewed!

@melvin-bot
Copy link

melvin-bot bot commented Jul 25, 2023

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

@neil-marcellini
Copy link
Contributor

Let's go with go @allroundexperts proposal 🚀

Yeah this looks good. A couple notes so far:

  • We don't need to pass optional props unless we're going to use them
  • There might be errors from the backend under report.errorFields.editTask

cc @thienlnam in case you want to also review the PR.

@melvin-bot melvin-bot bot removed the Help Wanted Apply this label when an issue is open to proposals by contributors label Jul 25, 2023
@melvin-bot
Copy link

melvin-bot bot commented Jul 25, 2023

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

Offer link
Upwork job

@melvin-bot
Copy link

melvin-bot bot commented Jul 25, 2023

📣 @allroundexperts Please request via NewDot manual requests for the Contributor role ($1000)

@melvin-bot
Copy link

melvin-bot bot commented Jul 25, 2023

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

Offer link
Upwork job

@thienlnam
Copy link
Contributor

Thanks for the ping - agree with the solution

@melvin-bot melvin-bot bot added the Reviewing Has a PR in review label Jul 27, 2023
@melvin-bot melvin-bot bot added the Weekly KSv2 label Jul 27, 2023
@allroundexperts
Copy link
Contributor

PR created!

@tjferriss
Copy link
Contributor

Some discussion on the error placement in the PR. Otherwise, it looks like we're on track to get this merged.

@Pujan92
Copy link
Contributor

Pujan92 commented Aug 3, 2023

@allroundexperts
Copy link
Contributor

Created a follow up PR that adds offline mode to the task creation flow in addition to fixing the console errors. cc @neil-marcellini @mollfpr

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Weekly KSv2 labels Aug 10, 2023
@melvin-bot melvin-bot bot changed the title [$1000] Update Task title/description/assignee when offline is not grey out [HOLD for payment 2023-08-17] [$1000] Update Task title/description/assignee when offline is not grey out Aug 10, 2023
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Aug 10, 2023
@melvin-bot
Copy link

melvin-bot bot commented Aug 10, 2023

Reviewing label has been removed, please complete the "BugZero Checklist".

@melvin-bot
Copy link

melvin-bot bot commented Aug 10, 2023

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.52-5 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:

If no regressions arise, payment will be issued on 2023-08-17. 🎊

After the hold period is over and BZ checklist items are completed, please complete any of the applicable payments for this issue, and check them off once done.

For reference, here are some details about the assignees on this issue:

As a reminder, here are the bonuses/penalties that should be applied for any External issue:

  • Merged PR within 3 business days of assignment - 50% bonus
  • Merged PR more than 9 business days after assignment - 50% penalty

@melvin-bot
Copy link

melvin-bot bot commented Aug 10, 2023

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:

  • [@mollfpr / @allroundexperts] The PR that introduced the bug has been identified. Link to the PR:
  • [@mollfpr / @allroundexperts] 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:
  • [@mollfpr / @allroundexperts] 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:
  • [@mollfpr / @allroundexperts] Determine if we should create a regression test for this bug.
  • [@mollfpr / @allroundexperts] If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again.
  • [@tjferriss] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:

@tjferriss
Copy link
Contributor

@hoangzinh and @mollfpr are both hired in Upworks: https://www.upwork.com/ab/applicants/1682219760636948480/hired. We're waiting on the regression period for payment.

@mollfpr @allroundexperts can you get started on the checklist?

@mollfpr
Copy link
Contributor

mollfpr commented Aug 18, 2023

[@mollfpr / @allroundexperts] The PR that introduced the bug has been identified. Link to the PR:
[@mollfpr / @allroundexperts] 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:

I don't think there's an offending PR. We haven't implemented the offline feedback in the first place.

[@mollfpr / @allroundexperts] 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:

The regression step should be enough.

[@mollfpr / @allroundexperts] Determine if we should create a regression test for this bug.
[@mollfpr / @allroundexperts] If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again.

  1. Go to any Task report
  2. Turn off the network
  3. Update task title/description/assignee
  4. Verify that the updated fields are greyed out
  5. Turn on the network
  6. Verify that fields are not greyed out
  7. Turn off the network again
  8. Verify that fields are not greyed out

@melvin-bot melvin-bot bot added the Overdue label Aug 28, 2023
@neil-marcellini
Copy link
Contributor

Bump @tjferriss

@michaelhaxhiu
Copy link
Contributor

michaelhaxhiu commented Aug 30, 2023

Should this PR have addressed the problem cited in #25956 (comment)? I realize that's a separate bug report, but it appears super similar / duplicate in terms of the style of bug. So I'm curious if we can update the PR here (or draft a new PR) to accommodate this too?

@mollfpr
Copy link
Contributor

mollfpr commented Aug 31, 2023

@michaelhaxhiu My test on the PR shows the assignee field grey out but not in the current main.

I think #25956 is the legit report. The issue is a regression from #22778. In this issue PR, we are still using editTaskAndNavigate and have the RBR action set up there. In #22778, we changed that to editTaskAssigneeAndNavigate, but it hasn't got the RBR action.

@michaelhaxhiu
Copy link
Contributor

Thanks luthfi @mollfpr i appreciate your input as always 🙏

@melvin-bot melvin-bot bot added the Overdue label Sep 11, 2023
@tjferriss
Copy link
Contributor

Regression test submitted to Applause.

@melvin-bot melvin-bot bot removed the Overdue label Sep 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. External Added to denote the issue can be worked on by a contributor Weekly KSv2
Projects
None yet
Development

No branches or pull requests

8 participants