-
Notifications
You must be signed in to change notification settings - Fork 398
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
Empty cells of of an empty .dib notebook are deleted with first save #2803
Comments
This happens because the dub format merges consecutive blocks with the same language |
I installed the last version of the polyglot notebook extension and VS Code, the problem still occurs. |
With dib files it is by design. What is the scenario you are trying to implement with empty cells? Ipynb would support that . |
I don't try to implement something with empty cells.
That's a bug I saw, usually by leaving empty cells at the end of the file, and seeing them either kept or removed, therefore creating an inconsistent behavior.
On a more general note, I know minor bugs like this one are often overlooked, especially when it's related to cache, or happening during the first 5 seconds.
But I prefer to report them, as they can hide more complex issues.
Personally I don't suffer a lot from this bug.
|
But with dib is by design, it is not a bug, but worth some decent documentation to explain the file format and the implications |
Yes, I understand the intended behavior is to delete empty cells. So I would like empty cells to be deleted everytime. |
What should I do? |
I am not sure I understand what you mean. Opening an issue to document file format sounds a good idea to me. the second part of your suggestion less clear. Dib will collapse empty fragment by design, I am not clear what is the scenario that needs to create a set of empty code cells all for the same kernel and persist them. What will the user do with that dib file? |
I agree.
I agree.
There is some kind of bug cache, because sometimes when I open a notebook, there are empty cells. This is a bug. Here is a shorter version of the gif from #2803 (comment) where I open the notebook, and we can see empty cells. When I open a .dib notebook, there should be no empty cells, right? Here is a shorter description of the bug:
|
Have you opened , linked this in the vscode repository? we do not control that part of api. |
@rebornix do you have any suggestion? |
I did not open another issue. I use VS Code only for notebooks, therefore I post my issues here. |
@marckruzik Setting aside the cache/display issue for a moment, which would you say is preferable?
|
I think this is more of an emergent behavior than by design. It's the way the code happens to work, but the decision wasn't discussed heavily, and I can certainly see it as being unintuitive. |
The interface allows to create empty cells, and to configure them.
I am going to explain the kind of situation which confused me. Example:
Other confusion:
I say this, because when working with markdown (and copy-paste), it's easy to leave a character return or a space. So I was not understanding why the empty cells were disappearing sometimes (and sometimes not). Other confusion:
Conclusion
I can add that I don't know any code or word editing software which actually deletes your empty lines or empty paragraphs, moreover without warning you. So I think the polyglot extension should preserve empty cells. |
Describe the bug
Screenshots
If applicable, add screenshots to help explain your problem.
Please complete the following:
Which version of .NET Interactive are you using? (In a notebook, run the
#!about
magic command. ):EDIT 2023-03-09: I installed the last version of the polyglot notebook extension and VS Code, the problem still occurs.
Version: 1.0.415202+b72e199d0d854bd532a8103ce626a5aab4a71c07
The text was updated successfully, but these errors were encountered: