-
Notifications
You must be signed in to change notification settings - Fork 87
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
Added a dragging feature #229
base: master
Are you sure you want to change the base?
Conversation
Plain javascript implementation for dragging by holding the edges of modal or by handle with class ".draggable".
Known issues: When multiple modal windows are opened, dragging one moves all of the opened modals. |
Hi @darkomtc11 and thank you for submitting us this PR. I'll take a look at:
The team and I will check and test it, then we'll come back to you. 😉 Regards 🖖 |
BUG FIX: Multiple opened dragging modals will now move independently when being dragged.
For codeclimate issue fix
@maximelafarie Hey, |
Thank you @darkomtc11! You did a great job! This is a really cool feature and it'll be a pleasure to release it! 🤓 The last thing to do is maybe to add some unit tests about position computing and error handling ( |
We attach great importance to unit testing, as you can see on our 100% coverage badge. In order to keep our quality standard, can you implement unit tests please? Otherwise excellent work, and thank you very much for contributing ! 😉✌️ |
Thanks! |
Feel free to inspire yourself from the existing unit tests, especially the tests on the modal "target placement" here 😉 |
Added 13 unit test methods for next methods: setPosition, moveDialog, startDrag, elementDrag, stopDrag
I have finished unit tests for my functions. All passing, all good, but since I have no experience with this, I advise you to check them in detail. |
src/ngx-smart-modal/src/components/ngx-smart-modal.component.ts
Outdated
Show resolved
Hide resolved
src/ngx-smart-modal/src/components/ngx-smart-modal.component.ts
Outdated
Show resolved
Hide resolved
src/ngx-smart-modal/tests/components/ngx-smart-modal.component.spec.ts
Outdated
Show resolved
Hide resolved
src/ngx-smart-modal/tests/components/ngx-smart-modal.component.spec.ts
Outdated
Show resolved
Hide resolved
src/ngx-smart-modal/tests/components/ngx-smart-modal.component.spec.ts
Outdated
Show resolved
Hide resolved
src/ngx-smart-modal/tests/components/ngx-smart-modal.component.spec.ts
Outdated
Show resolved
Hide resolved
src/ngx-smart-modal/tests/components/ngx-smart-modal.component.spec.ts
Outdated
Show resolved
Hide resolved
src/ngx-smart-modal/tests/components/ngx-smart-modal.component.spec.ts
Outdated
Show resolved
Hide resolved
src/ngx-smart-modal/tests/components/ngx-smart-modal.component.spec.ts
Outdated
Show resolved
Hide resolved
I have fixed all requested changes. I hope it is good now. If there's anything else, I will gladly hop in to change things. Also, I don't know if it's supposed to work like that, but, after 'npm installing' in inner angular project (ngx-smart-modal), I cannot start outer (full) project. I think you might have some node_modules installed locally and they are maybe missing in package.json. |
src/ngx-smart-modal/src/components/ngx-smart-modal.component.ts
Outdated
Show resolved
Hide resolved
Is there anything else I can do to fasten up the process? I really need this feature. :D |
There's merge conflicts 😕! Can @LouisAugry and @marco10024 take a look about the conflicts please? |
Conflicts are simple, only need to accept both sides and merge together the diffs |
Done. |
src/ngx-smart-modal/src/components/ngx-smart-modal.component.ts
Outdated
Show resolved
Hide resolved
@darkomtc11 I've let some review comments! We're not far from the release, hang on! 😉 |
I have done those, but there are package-lock conflicts. Do you have permission to resolve this? If not, tell me what to do exactly. 7.3.0 version has more packages than 7.2.1. I'm not sure which part of file should I take. |
Just remove the package-lock form your changes |
@darkomtc11 Build failed, can you resolve it please ? 😉After that I think we'll merge it ! Many thanks for your help and your contribution ✌️ |
This pull request is being automatically deployed with ZEIT Now (learn more). 🔍 Inspect: https://zeit.co/biig/ngx-smart-modal/2fllc1124 |
@darkomtc11 thank you for rebasing but I already done it locally. 😉 I removed the packages files changes and I'm now ready to merge it! Stay tuned! 🖖 |
Any news? |
Plain javascript implementation for dragging by holding the edges of modal or by handle with class ".draggable".