Avoid using system clipboard in Notebook widget#18474
Conversation
|
Thanks for making a pull request to jupyterlab! |
Yes, I think we should. |
|
OK I added the tests. |
|
Owee, I'm MrMeeseeks, Look at me. There seem to be a conflict, please backport manually. Here are approximate instructions:
And apply the correct labels and milestones. Congratulations — you did some good work! Hopefully your backport PR will be tested by the continuous integration and merged soon! Remember to remove the If these instructions are inaccurate, feel free to suggest an improvement. |
…otebook widget) (#18475) Co-authored-by: Nicolas Brichet <32258950+brichet@users.noreply.github.com>
This PR removed the use of system clipboard from the Notebook widget.
References
Related to #18136, and opened as WIP to help debugging.
Code changes
When a clipboard interaction (
copy,cutorpaste) in Notebook involves cells, the Notebook is aware of the interaction, and can (i) store the copied cells locally (oncopyorcutinteraction) or (ii) compare the previous copied cell to the pasted one (onpasteinteraction).This allows to emit a signal when cells are pasted, whether the pasted cells come from the same Notebook or not, and if they were copied or cut.
Before this PR, to store the copied/cut cells or to compare the pasted cells, the Notebook was using the system clipboard as the last copied cells.
After this PR, when a clipboard interaction happens, the Notebook is aware of the cells involved in the interaction, and does not need the system clipboard.
User-facing changes
None
Backwards-incompatible changes
None