-
-
Notifications
You must be signed in to change notification settings - Fork 84
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
Fix buggy drag and drop #82
Conversation
Please note that I changed to Dragula as per @datitisev's request. The functionality on mobile remains the same, but there is no animation as shown above. |
@KyrneDev @datitisev are there plans to make additional changes in animation to this, or is this ready for review? |
Imma play around with it. Regarding animation - that's not important here, and I see the sortablejs implementation as an unintended feature more than the focus of the PR. |
FYI - you removed the dist files instead of resetting them to a previous commit. That is fine, but you got me confused as to why the dist folder didn't exist. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, one thing I forgot to add. We probably want to expose sortablejs to window - so other extensions can take advantage of it or lazy load their own. |
How would we do that? webpack/importing/exporting JS is still a minefield for me |
With |
I'm not seeing a benefit here. If another extensions needs Unless we also have a way for extension to conditionally add javascript dependencies only when it's not already registered, there won't be any benefit from a bundle size perspective, and I'm not seeing any other possible benefit. |
@clarkwinkelmann I mentioned lazy-loading because they can still request a JS file after building - it'll just need to be in the extension's assets folder or use an external CDN. See https://github.com/FriendsOfFlarum/drafts/blob/aece8dfe3f0b294f17807258b229f16857a0957a/js/src/forum/components/ScheduleDraftModal.js for an example. |
Switch to the SortableJs library to fix the buggy tags drag-and-drop admin UI.
Switch to the SortableJs library to fix the buggy tags drag-and-drop admin UI.
The current Tags drag and drop in admin is really buggy and hard to use. It is almost impossible to use on mobile. This updates the sortable library to something more modern which makes it much, much easier to use (and has a nice little animation).
Before:
Mobile (totally unusable):
New:
Mobile: