Add direction grid
This feature allows users to create a sortable list that works with a grid. Items can be moved up, down, right, or left within the same list.
Motivation?
We are currently using ember-drag-sort, which supports this feature. Unfortunately, the addon uses classic components, and updating it to the latest edition would require significant effort. Additionally, it is not as flexible as this addon. The drag-and-drop animation in ember-drag-sort is a simple arrow with no options for customization.
Implementing this feature in ember-sortable will help us transition away from ember-drag-sort. This update might also encourage others still using the previous addon to switch to this one.
@NullVoxPopuli can you make a rerun of test? Local it is passing without any issue and also same changes on my repo are getting a green ci: https://github.com/mkszepp/ember-sortable/pull/1
@NullVoxPopuli do you have any plan when we can get this feature?
Sorry, my email situation is a bit wonky atm <3 feature looks good -- gonna review the code
@NullVoxPopuli test were now added... while adding tests i have discovered two bugs, but now they are fixed
It looks like the test fails, cause a timing... locally i have got also sometimes a fail... maybe we need to add a short delay in reorder test helper, because we are moving 26 items in some seconds.. on my fork PR tests are looking sometimes good (but i have also needed some test retries)
seems like things are failing pretty regularly -- def can't merge without resolving 🤔
Do you think a test waiter needs to be added so that the waiter system "just works", and consumers of this library then also don't need to worry about adding random waiting in their tests?
agree, atm its not mergable, beacause tests do fail... i will look to find a fix... maybe waitUntil helps me... i will try
@NullVoxPopuli i have left some comments... all test should now pass (without retries 😅)
While adding this feature i was running in errors, which are still present in current version, but tests were never failed beacuse the lists were always small.
drag has never waited for transitionEnd, it works with 5 elements without any issue, but when we use more (can' t tell you the exact number) this tests do always randomly fail like we have now got in grid.
For consumer apps this change should not be braking
There was also never waited if all transition from items were completed, by using transition time with 1 secound + you will get crazy animations 😂. With my fix now we do wait since everything is completed.