10/UI/DataTable-Ordering touch screen drag and drop 44136 #9114
+240
−37
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
https://mantis.ilias.de/view.php?id=44136
Issue
Drag and drop of ordering table doesn't work at all on touchscreens and in Webkit/Safari desktop.
Changes
Desktop
Mobile
Outlook / Discussion
Settle animation on desktop
I know we aren't big into UI animations, but I think in this case the little settle at the end of the drag on desktop can really help to make the UX feel just a little bit lighter and less disorienting. I would like to add this for mobile as well, if that is okay with you all.
I am not too happy with the setTimeout solution. Does anyone know a more elegant way? I suspect that a smarter solution could be done, but that could quickly grow to something that shouldn't be burried in a single UI component... maybe a small reusable animation state handler that grabs animation timing and keyframes from CSS variables and can catch edge cases like interruptions gracefully.
For now, the worst that can happen is that the animation is not triggered because the animation class was never removed if you start another drag before setTimeout could ran.
Mobile design has yet to be merged
The design for the mobile view is currently WIP in this PR: #9015