-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Improved notebook cell drag images #13791
Conversation
Signed-off-by: Jonah Iden <jonah.iden@typefox.io>
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.
I'm wondering whether we should call NotebookCellListView.dragGhost?.remove()
on onDrop
as well. Otherwise the element stays in the body
indefinitely, right?
Aside from that, looks pretty great. Good idea using the markdown renderer to produce "pseudo" editors during dragging.
Signed-off-by: Jonah Iden <jonah.iden@typefox.io>
…outside of the notebook editor Signed-off-by: Jonah Iden <jonah.iden@typefox.io>
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.
I've managed to break the markdown rendering by including ```
in the first line of the cell source:
I think it would be alright to just run replaceAll('```', '')
on the lines
value. It probably doesn't matter if it had any significance in the input text.
Aside from that, I've noticed that scrolling in the notebook doesn't work while dragging a cell, but that's unrelated to the PR.
Signed-off-by: Jonah Iden <jonah.iden@typefox.io>
@msujew thanks, good catch. fixed it the way you suggested for. Not super happy with that though since in python iirc you use ``` to indicate multi line strings. The scrolling seems to be general theia problem. Same thing happens in the file explorer and other places as soon as you drag anything. If there is not already an issue for that we should probably reate one |
@jonah-iden AFAIK python uses |
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.
Looks good to me, thanks 👍
What it does
This improves the rendering of drag images for notebook cells and aligns to more how they look in vscode.
How to test
Open notebook and try dragging a cell.
Code and mardown cells have different drag image renderers
Follow-ups
Review checklist
Reminder for reviewers