Description
In working on C2LC-274, I noticed that the border of dragged commands differs depending on whether or not the command has already been selected. If the command has already been selected, the dragged command will have a dashed border. If the command was not previously selected, it will be dragged without a dashed border, and the original command will only be selected once the dragged command is released.
I pointed this out in the chat, @@Sepideh Shahi and Lisa proposed that a dragged command icon have a solid border, the same as if it were focused. Unfortunately, I can’t find a way to change the style of the element being dragged, it’s a generated image based on the exact styles at the moment before onDragStart is called.
There are libraries that offer more control , such as [react-dnd|
https://react-dnd.github.io/react-dnd/docs/overview] and the more accessible react-beautiful-dnd.
I am filing this ticket as work to consider for the future, as it seems to large in scope to take on as part of C2LC-274. I am filing this with regard to the current problem, but perhaps we can consider this as part of a larger refactor of drag and drop, perhaps to allow rearranging items within the program block editor.