dotnet / interactive

.NET Interactive combines the power of .NET with many other languages to create notebooks, REPLs, and embedded coding experiences. Share code, explore data, write, and learn across your apps in ways you couldn't before.
MIT License
2.85k stars 381 forks source link

Polyglot Notebook: [DevExE2E] The execution result of "Output" doesn't change after setting value in JavaScript when using split view #3031

Open v-hozha1 opened 1 year ago

v-hozha1 commented 1 year ago

Describe the bug

Using extension Polyglot Notebook in VS Code insider. The execution result of "Output" doesn't change after setting value in JavaScript.

Detailed Repro Build info: VSCodeSetup-x64-1.79.0 + dotnet-interactive-vscode-1.0.4309011.vsix VSCode Link: https://code.visualstudio.com/download Version: 1.79.0 (system setup) Commit: b380da4ef1ee00e224a15c1d4d9793e27c2b6302 Date: 2023-06-07T14:26:35.552Z Electron: 22.5.5 Chromium: 108.0.5359.215 Node.js: 16.17.1 V8: 10.8.168.25-electron.0 OS: Windows_NT x64 10.0.20348

dotnet-interactive-vscode-1.0.4309011.vsix https://dev.azure.com/dnceng/internal/_build/results?buildId=2197700&view=artifacts&pathAsName=false&type=publishedArtifacts

sdk info: dotnet-sdk-7.0.302-win-x64

Note: 1.It's not a regression issue. It also repro on VSCodeUserSetup-x64-1.78.1 + dotnet-interactive-vscode-1.0.4259021.vsix.

Steps: Start with an empty text file open in VSCode 2.Ctrl+Shift+P => "Polyglot Notebook: Create new blank notebook" 3.Select "Create as .dib" ->Select "C#" -> Specify the code in cell-> execution var x=123;

  1. Add a new code cell below as html. -> Specify the code in cell-> execution
    The value is not yet set.
  2. Add a new code cell below as javascript. -> Specify the code in cell-> execution

    !share --from csharp x

    document.getElementById("output").innerText = The value is ${x}.; console.log(The value is ${x}.);

Expected Results: After executing Step5, the Output should be shown as "The value is 123" in step4. image

Actual Results: The execution result of "Output" doesn't change after setting value in JavaScript. image

OutputValue

Please complete the following:

Which version of .NET Interactive are you using? (In a notebook, run the #!about magic command. ):

colombod commented 1 year ago

does it repro even when you don't use split view but only a single view for the notebook?

colombod commented 1 year ago

this is vscode insiders 1.80.0

image
v-hozha1 commented 1 year ago

@colombod This issue only repro in split view. It doesn't repro when using a single view. image

colombod commented 1 year ago

Can we do something in labelling this bugs? Split view is not a common scenario for notebooks and might be prioritised differently if the bug repro was clear about being used as split view or not