Comments (12)
Ah yeah.... 🤦 I meant to switch the POST request to dragend
but forgot. I think it's actually bad UX as-is and the change should only apply when the mouse button is released.
I'll work on that soon.
from activeadmin_reorderable.
looks good, the UI still does the little bit where if the horizontal size is small enough and I drag the lines just slightly it starts to endlessly swap rows, but as no network requests are generated this is less of a problem
I'll push this to production, thaaaaaaaaaaaaank you Derek ❤️
from activeadmin_reorderable.
@dramalho Interesting. Thank you for reporting and investigating. In my testing, I hadn't tested the index as: :reorderable_table
version.
I'll add that to the test suite now and change the querySelectorAll(".aa-reorderable")
to querySelectorAll("table.aa-reorderable")
and see if that resolves it. If it does, I'll push a patch version w/ the fix
from activeadmin_reorderable.
Yeah, that should fix it, it's really just a specific JS issue, I just wanted to run it by you in case I was missing something super obvious
thank you Derek 🫶
from activeadmin_reorderable.
@dramalho I fixed it and pushed a v0.3.1. Can you test it and let me know if it resolves the issue for you?
from activeadmin_reorderable.
ok, re: the original issue, it's great, things are working again but -- I am noticing something new though :) (sorry man, I know this is annoying)
So, if I drag (but don't release the button, or don't release it quick enough) I notice it gets stuck in a look on that dragover
handler and keeps swapping lines very quickly, each time initiating a reorder
request
Unsure if the actual network request should be done at dragend
?
from activeadmin_reorderable.
this is a new issue though, want me to open a new one?
from activeadmin_reorderable.
(in the meantime let me try on safari - this was chrome)
from activeadmin_reorderable.
ahh the wonderful world of frontend dev, safari / firefox are fine, chrome is doing machine gun requests 😭
from activeadmin_reorderable.
Ok, kinda hard to replicate but I get the same behaviour in Safari as well -- best bet is horizontal size, especially when the index table that AA generates starts to get compressed (< 900px for this particular screen I'm looking at) -- the rows start to flip between each other and because the network request is there (and not when we release the button) it machine guns the server
I know the previous version only acted on the drag when we released the row, one option might be to update the UI on dragover
but shoot the network request on dragend
?
from activeadmin_reorderable.
@dramalho Done. Give 0.3.2 a try
from activeadmin_reorderable.
Third time's a charm!!! I'll test it now 👏
from activeadmin_reorderable.
Related Issues (10)
- Gem failing when using with nested activeadmin resources
- Support activeadmin belongs_to HOT 1
- Support webpacker / Rails 6 HOT 6
- Transfer ownership
- Upbrading from v0.1.2 to v0.1.5 breaks member route path generation
- undefined method `insert_at'
- reordering is not working
- No Mixin Named light-button HOT 2
- Live update of position column on reordering HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from activeadmin_reorderable.