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
fix (Whiteboard): Paste shape #8636
Conversation
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.
@sprocketc Copying shapes with command-shift-C works nicely on a mac! 👍 🚢
Could be good to mention this shortcut in the docs. I wouldn't know this would work otherwise. Fwiw I ignored this PR for awhile since it didn't have any reviewers requested and wasn't sure if you wanted it reviewed |
@logseq-cldwalker That's true, but we are going to change this behavior soon, because that's not what most users would expect. |
This fix allows copy/pasting objects instead of references using
Ctrl+Shift+C
andCtrl+V
(see https://discord.com/channels/725182569297215569/1075712494150111324/1075712494150111324)I tried to add a test but couldn't make it work consistently, but I made some minor improvements to the test in the process.
There is a bigger issue here, which is the way copy/paste and dnd behaves. Copying the reference by default when we use
Ctrl+C
might not be expected in whiteboards context, and should be re-evaluated in my opinion. Dragging and dropping links does not create an iFrame object. Also,usePaste.ts
is almost 500 lines of code and is responsible for pasting and dropping. We need to refactor it soon and add more tests to eliminate similar issues.