-
Notifications
You must be signed in to change notification settings - Fork 15
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
Introduction to moveable mixin #209
Conversation
This is a part of komitywa#208. Previously we were using jquery-ui draggable in order to move objects. In future we should refactor this mixin to use css transform property instead of top/left. This is why: https://csstriggers.com/left vs https://csstriggers.com/transform
Current coverage is 20.95%@@ master #209 diff @@
==========================================
Files 19 20 +1
Lines 400 420 +20
Methods 0 0
Messages 0 0
Branches 0 0
==========================================
+ Hits 68 88 +20
Misses 332 332
Partials 0 0
|
These diagrams looks great, much like these created by Sam :) I'm starting review, so be aware! |
@@ -0,0 +1,50 @@ | |||
export const MOVE_END = 'moveend'; | |||
export const MOVE_START = 'movestart'; |
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.
unnecessary export - we don't MOVE_START
anywhere else
Ok, I've review it. Looks like really good job! 🚀 I have some doubts if mixin here will not be an overkill (only these objects will be draggable). And You haven't removed |
We still need
Yeah, You're probably right. But I like that idea of creating separated mixins for features. Even though we use it for single element. It makes code easier to test. We might keep this code inside object module. What do you think? |
I found two major bugs in implementation:
I should fix it till end of the week. |
@magul I made some major changes comparing to last version. I thought again about the way I implemented this and I didn't like it so much. |
@@ -0,0 +1,56 @@ | |||
/* global describe,beforeEach,afterEach,before,it:false */ |
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.
what false
at the end here is doing?
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.
It means that these methods are read only
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.
I think we could improve this. Probably eslint has some environment settings for mocha/chai.
Few questions, but look ok. 🚀 |
This is a part of #208.
Previously we were using jquery-ui draggable in order to move objects.
In future we should refactor this mixin to use css transform property instead of top/left.
This is why:
https://csstriggers.com/left vs https://csstriggers.com/transform