-
Notifications
You must be signed in to change notification settings - Fork 15
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
ENH MutliLinkField sorting #166
ENH MutliLinkField sorting #166
Conversation
494f23f
to
4c279ee
Compare
4c9c78d
to
36cca91
Compare
7b79a59
to
3af272f
Compare
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.
I took this after rebasing so I don't have the scroll popping issue. Screencast.from.16-01-24.10.00.44.webmThere are two issues here. FlickeringI think we shouldn't bother trying to show the loading component here because that flickering is just very visually distracting and doesn't have any clear benefit. At some point that decision looks like it was made for elemental as well, because elemental doesn't show the loading component when sorting. Briefly rendered in the wrong orderVery briefly after letting go of the item I'm dragging, it pops back into its original position, and then pops into its new position after loading. We should immediately render it in its new position after dropping, and only pop it back to its original position if something goes wrong with the network request to save the new sort order. |
Also needs rebase please |
6b5f197
to
9d53967
Compare
9d53967
to
9fd3f4d
Compare
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.
The actual sorting works really well now - I like that it's constrained to the parent and the vertical axis.
But now when I add new links, they don't appear until I refresh the page:
Screencast from 17-01-24 15:03:47.webm
9fd3f4d
to
b8ec1e1
Compare
b8ec1e1
to
0a29c4a
Compare
0a29c4a
to
343c3d2
Compare
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.
Looks great, works well locally.
Issue #139
react-dnd -> dndkit
Most recent version of react-dnd is 16 which was released in Aug 2022 (we're still using version 5 on elemental), it failed to work at all in our setup
I've opted to use https://docs.dndkit.com/ instead which seems to work well and had its last release in Nov 2023
Screen jumping on sort
The screen jumps on sort, though it also does this on anything that causes a re-render e.g. link edit. I've created a new issue for this. #169
Hover/focus styling
Styling for the LinkField hover/active/focus states is generally poor, I've created a new issue to tidy this up #168
Design review
Design team has reviewed and approved with understanding the screen jumping and hover/focus styling will be handled separately