-
-
Notifications
You must be signed in to change notification settings - Fork 170
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
feat(Keyboard): add touch events #35
Conversation
Can be enabled passing `useTouchEvents` option to the Keyboard constructor.
8ce1743
to
f8fb18e
Compare
Codecov Report
@@ Coverage Diff @@
## master #35 +/- ##
=====================================
Coverage 100% 100%
=====================================
Files 6 6
Lines 364 372 +8
Branches 110 113 +3
=====================================
+ Hits 364 372 +8
Continue to review full report at Codecov.
|
Looks neat, thanks! I actually prefer the native/standards approach, so your addition is very in line with that. Later today I will test it more thoroughly and do the merge as well as the docs update. As I check this out, just wanted to say that all your contributions are very welcome. Regards |
I stayed in the same code logic you already started, but as webpack and babel are used to build the project, I'll do another PR later in order to reorganise the code and bring all new ecmascripts features (ES6-7) in order to reduce the code size (less code = less surface for bugs), and also a more functional vision: avoid side effects, mutations, using, when it's possible, pure functions, etc. |
Excellent! I'm all for it, and appreciate these improvements. One thing I tend to obsess over is the code coverage when we run Another thing is the docs coverage ( All of these I would like to keep in check (This is why I don't do big cleanups often haha). So if you make a change and look out for these coverages it'd be really amazing! |
Ok, I'll have a look 😄 Really interesting, and Eric Elliott is just a master of creating/composing software knowledge! Be careful, because of him I changed my way of coding! (after I read this article, I starting to read it's book on "Composing Software", and that's magic... : https://medium.com/javascript-scene/composing-software-an-introduction-27b72500d6ea (a lot of articles)) |
Hehe thanks for these recommendations! I care for a more petty reason actually: Certain badges and tests influence search placement, like at npms.io and npm, and maybe even GitHub (?). Also, what good is having these little badges it they are not green? 😆 I was not aware of those articles however! I will check them out :) |
Just tested the PR on a couple tablets and on desktop, all is good - Thanks again for this quality addition 👍 |
Can be enabled passing
useTouchEvents
option to the Keyboard constructor.Sorry for the delay, I was working on understanding the whole library, and also I'd to work on a custom theme 😉
I don't know if there are side effects with these changes, I checked but I think you should check 😅
I'm using the native touch events api, and some browsers are incompatible, maybe it could be great to use a third library to be more compliant with all browsers (Hammer.js for exemple).
EDIT: API documentation will have to add the following option:
useTouchEvents
, as following: