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

fix: improve drag type detection and fix styling in Safari #695

Merged
merged 1 commit into from Oct 13, 2018

Conversation

rolandjitsu
Copy link
Collaborator

What kind of change does this PR introduce?

  • bugfix
  • feature
  • refactoring / style
  • build / chore
  • documentation

Did you add tests for your changes?

  • Yes, my code is well tested
  • Not relevant

If relevant, did you update the documentation?

  • Yes, I've updated the documentation
  • Not relevant

Summary

We currently rely on getting the data transfer data to detect what kind of data is being dragged. While that works in Chrome, Firefox and Edge, it does not work in Safari.

Hence this PR which uses {types} to do the data type detection.

And a few other things:

Does this PR introduce a breaking change?

No.

Other information

@codecov
Copy link

codecov bot commented Oct 13, 2018

Codecov Report

Merging #695 into master will decrease coverage by 0.95%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #695      +/-   ##
==========================================
- Coverage   99.11%   98.15%   -0.96%     
==========================================
  Files           3        3              
  Lines         226      217       -9     
  Branches       68       63       -5     
==========================================
- Hits          224      213      -11     
- Misses          2        3       +1     
- Partials        0        1       +1
Impacted Files Coverage Δ
src/index.js 99.43% <100%> (-0.02%) ⬇️
src/utils/index.js 90.9% <100%> (-6.32%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update fd99719...1dcd832. Read the comment docs.

- cleanup some of the tests
- apply different active styling when file type cannot be inferred and close react-dropzone#668
- use DataTransfer{types} for drag data type detection
@rolandjitsu rolandjitsu merged commit 78d8eed into react-dropzone:master Oct 13, 2018
@okonet
Copy link
Collaborator

okonet commented Oct 13, 2018

🎉 This PR is included in version 6.1.3 🎉

The release is available on:

Your semantic-release bot 📦🚀

rolandjitsu added a commit to rolandjitsu/react-dropzone that referenced this pull request Oct 14, 2018
- do not use synthetic default imports in typings, close react-dropzone#696
- invoke onDrop when called from input change, close react-dropzone#698
- add more tests to increase coverage
rolandjitsu added a commit to rolandjitsu/react-dropzone that referenced this pull request Oct 14, 2018
- do not use synthetic default imports in typings, close react-dropzone#696
- invoke onDrop when called from input change, close react-dropzone#698
- add more tests to increase coverage
rolandjitsu added a commit that referenced this pull request Oct 14, 2018
- do not use synthetic default imports in typings, close #696
- invoke onDrop when called from input change, close #698
- add more tests to increase coverage
@rolandjitsu rolandjitsu deleted the fix/drag-active branch February 6, 2022 02:22
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.

None yet

2 participants