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

[HOLD for payment 2024-09-17] [$250] Add Offline and Error Patterns to Remaining Integrations #45406

Closed
yuwenmemon opened this issue Jul 15, 2024 · 67 comments
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production External Added to denote the issue can be worked on by a contributor NewFeature Something to build that is a new item. Reviewing Has a PR in review Weekly KSv2

Comments

@yuwenmemon
Copy link
Contributor

yuwenmemon commented Jul 15, 2024

With #44739 we added offline and error patterns to the Sage Intacct connection menu.

One observation from discussion in Slack was that this pattern is not necessarily implemented for the other integrations (QBO, Xero, and NetSuite) and we'd like to maintain parity between all integrations menus.

Solution

Implement the same offline and error patterns implemented for Intacct in the other integrations

cc @war-in @JmillsExpensify @shawnborton @trjExpensify

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~014b0b4b88631ddf1d
  • Upwork Job ID: 1812869868565563336
  • Last Price Increase: 2024-07-15
  • Automatic offers:
    • ikevin127 | Reviewer | 103126194
Issue OwnerCurrent Issue Owner: @stephanieelliott
@yuwenmemon yuwenmemon added Daily KSv2 NewFeature Something to build that is a new item. labels Jul 15, 2024
@yuwenmemon yuwenmemon self-assigned this Jul 15, 2024
Copy link

melvin-bot bot commented Jul 15, 2024

Triggered auto assignment to @puneetlath (NewFeature), see https://stackoverflowteams.com/c/expensify/questions/14418#:~:text=BugZero%20process%20steps%20for%20feature%20requests for more details. Please add this Feature request to a GH project, as outlined in the SO.

@melvin-bot melvin-bot bot added Weekly KSv2 and removed Daily KSv2 labels Jul 15, 2024
Copy link

melvin-bot bot commented Jul 15, 2024

⚠️ It looks like this issue is labelled as a New Feature but not tied to any GitHub Project. Keep in mind that all new features should be tied to GitHub Projects in order to properly track external CAP software time ⚠️

Copy link

melvin-bot bot commented Jul 15, 2024

Triggered auto assignment to Design team member for new feature review - @shawnborton (NewFeature)

@yuwenmemon yuwenmemon added the External Added to denote the issue can be worked on by a contributor label Jul 15, 2024
@melvin-bot melvin-bot bot changed the title Add Offline and Error Patterns to Remaining Integrations [$250] Add Offline and Error Patterns to Remaining Integrations Jul 15, 2024
Copy link

melvin-bot bot commented Jul 15, 2024

Job added to Upwork: https://www.upwork.com/jobs/~014b0b4b88631ddf1d

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

melvin-bot bot commented Jul 15, 2024

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

@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 labels Jul 15, 2024
@war-in
Copy link
Contributor

war-in commented Jul 15, 2024

Hi, I'm Marcin from Software Mansion and I'd like to work on this issue!

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

melvin-bot bot commented Jul 15, 2024

📣 @ikevin127 🎉 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

@kabeer95
Copy link

Add Offline and Error Patterns to Remaining Integrations

Problem Statement

Our current integrations lack essential offline and error handling patterns, which results in a suboptimal user experience when encountering errors or losing connectivity.

Root Cause

The absence of robust offline and error handling stems from a rushed implementation to meet aggressive deadlines. Priority was given to functionality over resilience, leaving our system vulnerable to disruptions caused by network failures or errors.

Changes to Solve the Problem

Add Offline Pattern
Implement an offline pattern to ensure data persistence and synchronization when connectivity is restored.

// Offline pattern
if (!navigator.onLine) {
  // Store data locally and sync when connectivity is restored
  localStorage.setItem('data', JSON.stringify(data));
  displayOfflineMessage();
} else {
  // Sync data with server
  syncDataWithServer();
}

function displayOfflineMessage() {
  // Display offline message to user
  alert('You are offline. Your changes will be synced when connectivity is restored.');
}

Add Error Pattern

Introduce an error pattern to centrally manage and communicate errors to users, facilitating retries for failed actions.

javascript

try {
  // Perform action that may fail
  performAction();
} catch (error) {
  // Catch and handle error centrally
  handleError(error);
  displayErrorMessage();
}

function handleError(error) {
  // Log error for debugging purposes
  console.error(error);
  // Display clear and concise error message to user
  displayErrorMessage();
}

function displayErrorMessage() {
  // Display error message to user
  alert('An error occurred. Please try again.');
}

Benefits

Improved User Experience: Enhancing our system with offline and error patterns ensures users experience greater reliability and continuity, even when faced with connectivity issues or errors.
Increased User Adoption: By providing a seamless experience that minimizes disruption and frustration, we aim to enhance user satisfaction and encourage higher adoption rates.

@ikevin127
Copy link
Contributor

@kabeer95 Thanks for your proposal. Unfortunately this issue was already assigned to Marcin from Software Mansion based on #45406 (comment). Additionally, in the future - in order for reviewers to be able to consider your proposal you need to precisely follow the proposal template when posting a proposal.

@kabeer95
Copy link

@ikevin127 okay.

@war-in
Copy link
Contributor

war-in commented Jul 17, 2024

Posting my update because I'll be OOO till Monday

I started working on fixing offline and error patterns in Xero integration and created a draft PR. You can check the web video in the PR description but I haven't worked on offline handling yet.

The best (and fastest) way will be splitting this work into a few PRs (one per integration). It should help with testing.

@war-in
Copy link
Contributor

war-in commented Jul 17, 2024

I also found and fixed some bugs (e.g. showing offline state for all export subpages when only one is updated). It will require thorough review but @hungvu193 is up-to-date (he reviewed my Sage Intacct offline and error PR) so we should be able to merge things fast 🚀

@ikevin127
Copy link
Contributor

ℹ️ Notice that @shubham1206agra will take over the NetSuite PR #46667 as they have credentials for the integration and I don't - the passing over was discussed on Slack. Please remove me from the PR as reviewer and assign them!

Also @hungvu193 took over the SageIntaact PR #46294 for the same reason. This PR is already merged and payment is coming up on 13th.

@stephanieelliott Both C+ reviewers mentioned above will require payment as part of this issue.

cc @yuwenmemon @deetergp

I'm continuing with the review of the other PRs / follow-ups (QBO and Xero).

@melvin-bot melvin-bot bot added Weekly KSv2 and removed Weekly KSv2 labels Aug 12, 2024
@ikevin127
Copy link
Contributor

ikevin127 commented Aug 12, 2024

What's the difference between:

I thought we already handled that one 🤔

cc @war-in @289Adam289

Also @hungvu193, mind reviewing this one as well since you got the credential for Sage and reviewed the other PR ?

@hungvu193
Copy link
Contributor

Yeah, I can take that one 😄 . Hey @war-in @289Adam289, can you answer the above question?

@zfurtak
Copy link
Contributor

zfurtak commented Aug 13, 2024

What's the difference between:

I thought we already handled that one 🤔

Hello 👋 after merging the first PR, the strategy of handling error and offline behaviours changed a bit, so we needed to update the Sage Intacct PR (details in this thread on #wave8-collect-admins) 🤓

@hungvu193
Copy link
Contributor

I see, I'll review today 😄

@stephanieelliott
Copy link
Contributor

stephanieelliott commented Aug 14, 2024

Ok, so I want to make sure i have this right -- these are the PRs and reviewers due payment I have on this issue @hungvu193 @ikevin127 can you look this over and confirm I have the relevant PRs and correct person due payment?

@hungvu193
Copy link
Contributor

I reviewed 2 SageIntacct PRs, but no payment needed for me, I will be paid centrally later when SageIntacct project is completed

@ikevin127
Copy link
Contributor

@stephanieelliott The 2 Sage Intaact merged PRs were both reviewed by @hungvu193 which as they mentioned will not be due payment per every PR.

The Xero PR I reviewed first was already paid out to me on 8/5.

So far we're all good with payments, there will be other PRs reviewed by me as part of this issue where I'll need payment once the regression period is over.

@shubham1206agra
Copy link
Contributor

@stephanieelliott NetSuite will be handled by me actually.

@ikevin127
Copy link
Contributor

⚠️ Production deploy automation failed here -> a new payment date should be on [HOLD for Payment 2024-08-22] according to yesterday’s production deploy confirmed in #46898 (comment) and deploy checklist.

I will require payment as reviewer of PR:

cc @stephanieelliott

@stephanieelliott stephanieelliott changed the title [HOLD for payment 2024-08-13] [HOLD for payment 2024-08-05] [$250] Add Offline and Error Patterns to Remaining Integrations [HOLD for payment 2024-08-22] [$250] Add Offline and Error Patterns to Remaining Integrations Aug 21, 2024
@ikevin127
Copy link
Contributor

cc @stephanieelliott

@stephanieelliott
Copy link
Contributor

Summarizing payment for #46898

Contributor @war-in - no payment due (agency)
C+ @ikevin127 -$250 via Upwork on this job, milestone 2 - PAID

@stephanieelliott stephanieelliott changed the title [HOLD for payment 2024-08-22] [$250] Add Offline and Error Patterns to Remaining Integrations [$250] Add Offline and Error Patterns to Remaining Integrations Aug 28, 2024
@stephanieelliott
Copy link
Contributor

stephanieelliott commented Sep 4, 2024

Status check on the remaining PRs on this issue:

@ikevin127
Copy link
Contributor

ikevin127 commented Sep 4, 2024

The NetSuite one was taken by @shubham1206agra as C+ reviewer since only they have the credentials required to test NetSuite integration.

The 2nd one is correct, currently waiting on CME for final approve and merge, hopefully soon 😁

Copy link

melvin-bot bot commented Sep 6, 2024

⚠️ Looks like this issue was linked to a Deploy Blocker here

If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results.

If a regression has occurred and you are the assigned CM follow the instructions here.

If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future.

@stephanieelliott
Copy link
Contributor

#46667 - reviewer @shubham1206agra, Reviewing
#46511 - reviewer @ikevin127, Reviewing

Both on staging!

@ikevin127
Copy link
Contributor

⚠️ Automation failed here -> the last 2 payments should be on [HOLD for Payment 2024-09-17] according to 3 days ago production deploy from #48664 (comment) (both PRs are in this deploy checklist, first two).

Notes for payments

  • ⚠️ looks like the NetSuite one had a regression and the QBO one had no issues

cc @stephanieelliott

@shubham1206agra
Copy link
Contributor

Just noting that the regression happened due to changes in BE to accommodate another change not related to this issue. So I don't think normal regression applies here.

@stephanieelliott stephanieelliott changed the title [$250] Add Offline and Error Patterns to Remaining Integrations [HOLD for payment 2024-09-17] [$250] Add Offline and Error Patterns to Remaining Integrations Sep 17, 2024
@ikevin127
Copy link
Contributor

cc @stephanieelliott

@stephanieelliott
Copy link
Contributor

stephanieelliott commented Sep 20, 2024

Summarizing payment:


PR #46667

Upwork job is here: https://www.upwork.com/jobs/~021837018600586595691


PR #46511

Upwork job is here: https://www.upwork.com/jobs/~014b0b4b88631ddf1d

@shubham1206agra
Copy link
Contributor

@stephanieelliott Offer accepted

@stephanieelliott
Copy link
Contributor

All paid! Thanks

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 External Added to denote the issue can be worked on by a contributor NewFeature Something to build that is a new item. Reviewing Has a PR in review Weekly KSv2
Projects
Archived in project
Development

No branches or pull requests