-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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
[Lens] Drag within dimension group to reorder #67226
Comments
Pinging @elastic/kibana-app (Team:KibanaApp) |
Moving some comments from Slack @wylieconlon started off the conversation showing a POC of "swapping" and "replacing", but there's not currently an example of "reordering". The discussion continued into a when to do these operations topic.
I think we're all pretty much on the same page about what happens within the dimension. That it is always just a re-order. At least for now and at least in its simplest implementation. |
Discussed offline
|
The next step is to build a prototype to see how to solve the technical difficulties (rewrite Lens to use EUI drag/drop, extend our own solution to support reordering, or do we use both at the same time) |
We cannot easily (or moderately easy) use EUI drag and drop for the purposes we need. The limitations come from react-beautiful-dnd (rbd) and not EUI, so they cannot be fixed unless we modify the library internally, which we probably don’t want to do. Our custom implementation and react-beautiful-dnd cannot co-exist together, because react-beautiful-dnd doesn’t allow to propagate any events outside of it – so eg. once we have elements from EUI and our custom ones, our custom draggables cannot be thrown to EUI ones and vice versa. To use eui dnd, we would require to completely rewrite all the functionalities we have written in custom way and that would a be a big effort. One problem I see and I cannot find a solution for is that parts of lens application live in different route so they cannot easily share context – with our custom implementation, we handle that with having a If we somehow overcome the problem of context across the routes, I think that right now all the functionalities we have, could be done on EUI dnd. Probably we would need to think about hiding some animations that rbd does by default and maybe for that we would need some hacking. However, I don’t see the way of creating the ones we are planning to do (like the custom drops appearing when we hover over droppable element) to swap or replace. |
This is a smaller scope of work than dragging between two different dimension groups (#51739).
For example, the user should be able to rearrange columns within the data table by dragging within this section:
The text was updated successfully, but these errors were encountered: