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

Handle remove from progress in its own mutation #2225

Merged
merged 1 commit into from
Oct 14, 2019

Conversation

LukasHirt
Copy link
Collaborator

Description

Move remove from progress into its own method, use id instead of name to find the right progress and call the action on requests loadend event.

How Has This Been Tested?

  • test environment: Manually
  1. Upload one file
  2. Upload multiple files
  3. Upload folder

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Technical debt
  • Tests

Checklist:

  • Code changes
  • Unit tests added
  • Acceptance tests added
  • Documentation ticket raised:

@LukasHirt LukasHirt added Status:Needs-Review Needs review from a maintainer bug-solved labels Oct 11, 2019
@LukasHirt LukasHirt self-assigned this Oct 11, 2019
const promise = new Promise((resolve, reject) => {
xhr.onload = e => {
xhr.status >= 200 && xhr.status < 400 ? resolve(e) : reject(new Error(xhr.statusText))
}
xhr.onloadend = e => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AFAIK using onload should be enough here ?

Copy link
Collaborator Author

@LukasHirt LukasHirt Oct 14, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested it in ie11 (Win 7) - works.

The good thing about onloadend is that it's triggered also in case it failed.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, so if it works it means we have a polyfill in place.

note that chrome also doesn't support this property, mind testing there as well ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Already tested. Works in IE11, FF, chrome, safari and edge.

Copy link
Contributor

@PVince81 PVince81 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@PVince81 PVince81 merged commit 7c8fdfc into master Oct 14, 2019
@PVince81 PVince81 deleted the bugfix/remove-from-progress branch October 14, 2019 14:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status:Needs-Review Needs review from a maintainer
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants