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

Drag drop and loader #76

Merged
merged 7 commits into from
Nov 9, 2018
Merged

Drag drop and loader #76

merged 7 commits into from
Nov 9, 2018

Conversation

gloriousducks
Copy link
Contributor

@gloriousducks gloriousducks commented Oct 22, 2018

New Feature: #12 (PR #22)

Added a number of things:

  • Drag and drop local files (image only support for now)
  • Edit image and save
  • When playing videos, show an icon to go back to H2 Homepage for dragging files
  • Loader to be used anywhere

Image editor demo:
46687261-76b0dc00-cbc8-11e8-8b75-72c0360e1789

Go back to H2 homepage:
ezgif com-video-to-gif 2

Using the loader elsewhere:

Change 'YOUR_QUERY_SELECTOR' to the element that needs to exist before removing loading spinner. If element doesn't appear in 10 seconds, waitForLoader throws an error. You can create alternative spinners, just add the css and create your element with the ID 'loading'. Once the element exists, element with ID 'loading' is removed.

Example:
let loader = document.createElement("div");
loader.setAttribute("id", "loading");
loader.setAttribute("class", "loading");
loader.innerHTML = "Loading…";
document.body.appendChild(loader);
waitForLoader("YOUR_QUERY_SELECTOR")
.then(res => {
// Remove spinner once the element exists in DOM.
document.getElementById("loading").remove();
})
.catch(err => {
// 10 seconds has passed and element doesn't exists
});

Loader demo:
ezgif com-video-to-gif 1

@poush
Copy link
Owner

poush commented Oct 22, 2018

This pull request introduces 1 alert when merging 5074a76 into 59594e7 - view on LGTM.com

new alerts:

  • 1 for Unused variable, import, function or class

Comment posted by LGTM.com

* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members
- Using welcoming and inclusive language
Copy link
Owner

Choose a reason for hiding this comment

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

This changes even if required should be performed in separate PR. Let's keep the changes which are mainly for the issue.

@@ -1,8 +1,6 @@
CC0 1.0 Universal
==================
# CC0 1.0 Universal
Copy link
Owner

Choose a reason for hiding this comment

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

Similarly, this one.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's just the "Markdown" extension on visual studio code.

@poush poush self-assigned this Nov 2, 2018
README.md Outdated
## Credits

| Contributor | Name | |
Copy link
Owner

Choose a reason for hiding this comment

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

I would prefer this to be present is a separate file like "contributors.md" which can be linked here.

To be added as a separate file.
@poush
Copy link
Owner

poush commented Nov 3, 2018

This pull request introduces 1 alert when merging 58998a8 into 59594e7 - view on LGTM.com

new alerts:

  • 1 for Unused variable, import, function or class

Comment posted by LGTM.com

@poush poush merged commit d55b422 into poush:master Nov 9, 2018
@poush
Copy link
Owner

poush commented Nov 9, 2018

Thank you!

poush pushed a commit that referenced this pull request Nov 10, 2018
* Drag&Drop + Loader

* Edit Readme

* Remove redundant code

* Remove redundant code

* Remove contributors section

To be added as a separate file.
poush pushed a commit that referenced this pull request Nov 10, 2018
* Drag&Drop + Loader

* Edit Readme

* Remove redundant code

* Remove redundant code

* Remove contributors section

To be added as a separate file.
poush pushed a commit that referenced this pull request Nov 10, 2018
* Drag&Drop + Loader

* Edit Readme

* Remove redundant code

* Remove redundant code

* Remove contributors section

To be added as a separate file.
poush pushed a commit that referenced this pull request Nov 10, 2018
* Drag&Drop + Loader

* Edit Readme

* Remove redundant code

* Remove redundant code

* Remove contributors section

To be added as a separate file.
poush pushed a commit that referenced this pull request Nov 10, 2018
* Drag&Drop + Loader

* Edit Readme

* Remove redundant code

* Remove redundant code

* Remove contributors section

To be added as a separate file.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants