-
Notifications
You must be signed in to change notification settings - Fork 438
Need extra reviews to push angular1.2 as master #61
Comments
Holy jeezus that is a long Pull Request discussion. I didn't read the whole thing, but at the point you were reaching (drag+drop then reverting and having angular reflect changes) have you guys considered just rolling this natively? Primarily, I would think the focus is:
I'm not saying this is necessarily easy, I'm just wondering if we're going through so much effort, is it necessarily harder than what we're already doing? |
@thgreasi I'm going to have to trust you guys. If it works it's your judgement on pushing this into master. One note: https://github.com/angular-ui/ui-sortable/blob/angular1.2/src/sortable.js#L42 I'm not sure 100% I'd trust this solution. If you remove AND add in the same $scope.$apply(), my guess is that the order won't be updated properly since the length doesn't change. Let's also hope this doesn't throw errors if the value is a non-array. You should probably also slap a huge warning on the readme that this only works with arrays (because people are stupid). |
So is this enough to get his merged into master? Or should we get a few more reviewers? |
@CyborgMaster @thgreasi There's still a bug in the latest version. If you drag an item over a new slot and then move back to it's original position, effectively cancelling the operation, sortable still messes with the ng-repeat comments. So if you then do the same thing but actually drop it you end up with a correct model but incorrect rendered view. A quick fix for this is to re-attach the savedNodes inside the stop event as well if no sorting happened, e.g.
|
@thgreasi I just tested again with latest version of angular1.2 branch and the issue mentioned previously seems to have been fixed. I was unable to reproduce it in my own code not using your pen, so all is good. PS Thank you for providing the pen. Very nice to have a quick starting point. |
As per the case mentioned in angular-ui#61. Created jquery.sumilate.dragandrevert to reduce complexiy.
As per the case mentioned in #61. Created jquery.sumilate.dragandrevert to reduce complexiy.
Has this been tested with the new ng-repeat="item in items track by item.id" functionality offered by |
@pennersr Here is a pen using PS: please use the demo pens found in READEME.MD. It only took me 5 mins to create this forked pen. |
I tried to recreate this in a pen but the problem did not show, which finally led to a bug in my own code. My apologies! All is working fine now ... |
Hello, thanks for the great job. However, I have 2 issues to report for the angular 1.2 branch : You can check this out here: http://codepen.io/anon/pen/AKnaf Thanks again |
@julien-gm nice to have your feedback. PS to all in this thread: |
@julien-gm I just opened a new issue focusing to the helper: "clone" part of your example. The reason I had to split your example, is that you are using extra elements inside the directive (aside from the ng-repeat).
|
Since angular1.2 branch supports more jquery-ui features than master (and is better tested), I opened PR #116 to merge it. |
Closed by #116 |
Thanks @thgreasi! Sorry I haven't been around as much lately to help with continued development. Now that it's working for our project, I haven't had any more time to dedicate. Thank for all your continued hard work. |
@thgreasi thank you for pushing progress here. Much kudos to you! |
We need some extra collaborators (cough ex. @ProLoser) to review angular1.2 branch.
If it seems solid we could push it as master since the current master does not work with AngularJS 1.2.x.
There already exists an issue #48 that got bloated by demand. PR #56 was then open to ease the merge and was later merged.
Of course, it would be wise to keep a seperate 1.0.x branch as well.
The text was updated successfully, but these errors were encountered: