-
Notifications
You must be signed in to change notification settings - Fork 57
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
Remove jQuery #114
Merged
Merged
Remove jQuery #114
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note: I removed quite a bit of code duplicated from the original
EventDispatcher
, by calling its super method here, instead of overriding and duplicating everything.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is great work -- just so i fully understand -
previously we called
assign(events, this.get('_gestures'));
thenthis._fastFocus();
, and then registered each event, including those added viathis.get('_gestures')
--- now we're callingthis.set('events', events);
thenthis._fastFocus();
and then callingreturn this._super(additionalEvents, rootElement);
to allow the ember event dispatcher to do thefor (event in events) {... this.setupHandler ...
for us, correct?If I'm missing something, please let me know.
One more q, where'd this guy go?
other than that, at least with just an eyeball review on github here, it looks like you nailed it... is there any way u could bring a piece of code from ur app into a test? (there isn't really much testing now.. so u can provide another way to prove its correctness) -- basically anything that will verify the new behavior matches the previous behavior, without careful reading through the diff here, would be nice, in some form, even logging the events registered through ember vs those on the rootElement itself, via
this._fastFocus()
, aka, those not using the previous verbosethis.setupHandler
loop -- would ease any concerns I have over my own ability to read and understand this code, old and new :)also @runspired should approve this as he wrote it originally... i think i made any concerns obvious, the rest checks out except the ordering where mentioned, and the missing
.on('click...
from jquery (maybe i just missed it).There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@eriktrom the changes here lived in fork I created a while ago, so I have to refresh my memories a bit... 😬
Yes, exactly.
setup()
supports a list of additional events, so I just use that to pass the gestures specific events to the parent to let it attach the event listeners for them.This adds
click
andtouchend
listeners via jQuery, and the same happens here:https://github.com/html-next/ember-gestures/pull/114/files#diff-89ef10d070270d2503408f9f16d8b558R91
for the
fastFocusEvents
here: https://github.com/html-next/ember-gestures/pull/114/files#diff-89ef10d070270d2503408f9f16d8b558R27Hm, not really. These are app specific (lots of acceptance and component integration tests), which would certainly have failed indirectly if the EventDispatcher was not working correctly. I also verified that some gestures we used like swipes were still working.
For adding some real tests here, I am afraid to not have enough time for this atm, to do it properly. :(