microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
163.1k stars 28.82k forks source link

Adding new cell sometimes overlaps with existing cell and causes adjacent cell to shrink #165273

Open hbsmith opened 1 year ago

hbsmith commented 1 year ago

Environment data

Version: 1.72.2 Commit: d045a5eda657f4d7b676dedbfa7aab8207f8a075 Date: 2022-10-12T22:16:30.254Z (2 wks ago) Electron: 19.0.17 Chromium: 102.0.5005.167 Node.js: 16.14.2 V8: 10.2.154.15-electron.0 OS: Darwin x64 21.6.0 Sandboxed: No

Expected behaviour

When I add a cell above or below the current cell, it will automatically shift other cells up/down and not visually affect other cells otherwise. I expect the new cell to behave like any other cell.

Actual behaviour

Nov-02-2022 10-07-43 gif

Steps to reproduce:

[NOTE: Self-contained, minimal reproducing code samples are extremely helpful and will expedite addressing your issue]

  1. Simply adding cells via a, b, or the GUI randomly seems to cause this issue. I can't figure out a more reliable way to repro.

Logs

I don't think the logs are related to the issue based on the timestamp, but I have a lot of messages like this:

Output for Jupyter in the Output panel (ViewOutput, change the drop-down the upper-right of the Output panel to Jupyter)

``` info 17:02:48.727: Cancel all remaining cells true || Error || undefined ```

VSCodeTriageBot commented 1 year ago

Thanks for creating this issue! It looks like you may be using an old version of VS Code, the latest stable release is 1.73.0. Please try upgrading to the latest version and checking whether this issue remains.

Happy Coding!

roblourens commented 1 year ago

I'm a little confused by the size of the new editor. Can you share your settings.json and any extensions that you think might be relevant? Also the cell below "Real network" looks like it might have another line of text that's cut off, or maybe that's an artifact of the gif?

hbsmith commented 1 year ago

Hi @roblourens, thanks for the reply. Can you clarify what you mean by "size of the new editor"?

My extensions:

``` alexcvzz.vscode-sqlite-0.14.1 github.vscode-pull-request-github-0.52.0 james-yu.latex-workshop-8.29.0 julialang.language-julia-1.38.2 leafvmaple.octave-0.1.1 lsp-wl.lsp-wl-client-0.1.11 mechatroner.rainbow-csv-3.2.0 mechatroner.rainbow-csv-3.3.0 ms-python.isort-2022.3.12991021 ms-python.isort-2022.5.13061128 ms-python.python-2022.16.1 ms-python.vscode-pylance-2022.10.41 ms-python.vscode-pylance-2022.11.10 ms-python.vscode-pylance-2022.11.11 ms-toolsai.jupyter-2022.9.1202862440 ms-toolsai.jupyter-keymap-1.0.0 ms-toolsai.jupyter-renderers-1.0.10 ms-toolsai.vscode-jupyter-cell-tags-0.1.6 ms-toolsai.vscode-jupyter-slideshow-0.1.5 ms-vscode-remote.remote-containers-0.255.4 ms-vscode-remote.remote-containers-0.262.3 ms-vscode-remote.remote-ssh-0.90.1 ms-vscode-remote.remote-ssh-edit-0.84.0 ms-vscode-remote.remote-wsl-0.72.0 ms-vscode-remote.vscode-remote-extensionpack-0.21.0 ms-vscode.cpptools-1.12.4-darwin-x64 msrvida.vscode-sanddance-4.0.1 msrvida.vscode-sanddance-4.0.2 paulosilva.vsc-octave-debugger-0.5.4 pustelto.bracketeer-1.3.1 shigma.vscode-wl-1.7.3 singularitti.vscode-julia-formatter-0.6.3 toasty-technologies.octave-0.0.3 ```

My settings.json:

``` { "python.pythonPath": "/usr/local/opt/python/bin/python3.7", "julia.enableTelemetry": true, "workbench.colorTheme": "Monokai", "latex-workshop.view.pdf.viewer": "external", "editor.minimap.maxColumn": 30, "window.openFoldersInNewWindow": "on", "diffEditor.renderSideBySide": true, "git.enableSmartCommit": true, "files.autoSave": "afterDelay", "julia.enableCrashReporter": true, "markdown.preview.linkify": false, "terminal.integrated.commandsToSkipShell": [ "language-julia.interrupt" ], "jupyter.askForKernelRestart": false, "jupyter.alwaysTrustNotebooks": true, "workbench.editorAssociations": { "*.ipynb": "jupyter-notebook" }, "python.showStartPage": false, "terminal.integrated.inheritEnv": false, "editor.largeFileOptimizations": false, "julia.lint.run": false, "python.defaultInterpreterPath": "/usr/local/bin/python3", "security.workspace.trust.untrustedFiles": "open", "notebook.cellToolbarLocation": { "default": "hidden", "jupyter-notebook": "hidden" }, "julia.symbolCacheDownload": true, "julia.focusPlotNavigator": true, "bracket-pair-colorizer-2.colors": [ "White", "Salmon", "LawnGreen", "DarkOrange", "Cornsilk" ], "notebook.showCellStatusBar": "visibleAfterExecute", "notebook.consolidatedRunButton": true, "jupyter.codeLenses": "jupyter.runallcellsabove, jupyter.debugcell", "files.associations": { "*.ipynb": "python" }, "notebook.globalToolbarShowLabel": false, "python.languageServer": "Jedi", "terminal.integrated.enableMultiLinePasteWarning": false, "window.openFilesInNewWindow": "default", "security.workspace.trust.enabled": false, "notebook.markup.fontSize": 17 } ```

Also the cell below "Real network" looks like it might have another line of text that's cut off, or maybe that's an artifact of the gif?

You're absolutely right, and this is another symptom of this weird behavior--adding a new cell sometimes causes an adjacent cell to shrink like that. It's still scrollable but in order to get it to resize back to normal, it has to be run again.

roblourens commented 1 year ago

Can you clarify what you mean by "size of the new editor"?

When you click to add a new cell, the editor that shows up is way too tall. I don't know what's giving it that size. I played with the layout settings you have but don't see an issue.

Do you see this in every notebook or is it just in one particular notebook or spot in that notebook?

Also, we have actually made some changes to the layout flow, could you download the latest VS Code Insiders and try this again? Thanks

hbsmith commented 1 year ago

Yeah, the size of the new cell in the gif is one part of this overall issue.

It just seems to randomly happen across all my notebooks at unpredictable times/locations in the notebooks. Most of time, in any given notebook, adding new cells works as expected and the cell size isn't weirdly large or overlapping like that. But every once in a while when I add a new cell it has this weird behavior. And then it seems to go away when I run the cell. But I encounter this problem in almost every notebook, after I've been working for a while (sorry I can't be more specific).