Allow code snippets drag and drop into existing notebook cells
As per suggestion in this PR comment, in addition to dropping a snippet into a notebook as a new cell, users could also benefit from dropping it into existing notebook cells (it might be related to how the notebook widget listens to dragover events).
This task still can be accomplished with the code snippets insert button.
Could I work on this issue?
After doing some research on the notebook drop handler code, it looks like this issue cannot be resolved without losing the feature of dropping a snippet as a new notebook cell. Dragging objects into notebooks allows dropping notebook cells or plain texts. Code snippets wraps their drag items in a notebook cell so that when dropped, it is added as a new cell populated with the snippet. When dropped on a File Editor, that widget gets the cell content. In order to add a snippet to an existing notebook cell, the drag item needs to be a plain text, although when dispatching the with text only data, there is no way to drop it with the new cell wrapper, so it looks to me it is an either/or solution - unless it is implemented upstream (Drop of plain text within a notebook but not inside any cell should create a new cell with the drag content). Code snippets already allows adding snippets to existing cells with the insert button, filling this gap. @ajbozarth @marthacryan any ideas? If this is a confirmed limitation, we can close this issue or raise it upstream.
You might need to add a signal to implement this - if you're not familiar with signals, this documentation might be useful: https://jupyterlab.github.io/lumino/signaling/classes/signal.html